Last9 MCP Server

Logs, traces, metrics and alerting data from Last9.

By defaultCan write
With our presetRead-only

Labels are provisional (from the project README/docs, checked Nov 3, 2026). Not yet tested in our sandbox.

Read-only switch

LAST9_MCP_READ_ONLY=true (alias LAST9_READ_ONLY). LAST9_TOOLSETS narrows tools further.

Preset

Read-onlyRead-only switch from the vendor's docs. Not sandbox-tested yet.
What the preset changes
  • Pins @0.22.0: the read-only switch needs 0.20.0 or later.
  • Set LAST9_READ_ONLY=true
  • Set LAST9_MCP_READ_ONLY=true
  • Set LAST9_ALLOW_WRITE_TOOLS=
  • Set LAST9_MCP_ALLOW_WRITE_TOOLS=
  • Added --allow-write-tools=
  • Added --read-only
  • The server also reads a .env file from the folder it starts in, and a JSON settings file named by LAST9_CONFIG or -config. Command-line flags beat both, so we write --read-only and an empty --allow-write-tools= as arguments too. The env values cover a client that drops arguments. If your client drops empty env values, check that no .env in the server's working folder sets LAST9_READ_ONLY=false or LAST9_ALLOW_WRITE_TOOLS.

Claude Code

.mcp.json
{
  "mcpServers": {
    "last9": {
      "command": "npx",
Removed:       "args": ["-y", "@last9/mcp-server"]
      "args": ["-y", "@last9/mcp-server@0.22.0", "--read-only", "--allow-write-tools="],
      "env": {
        "LAST9_READ_ONLY": "true",
        "LAST9_MCP_READ_ONLY": "true",
        "LAST9_ALLOW_WRITE_TOOLS": "",
        "LAST9_MCP_ALLOW_WRITE_TOOLS": ""
      }
    }
  }
}

Optional third layer: add "deny": ["mcp__last9__<write tool>"] under permissions in .claude/settings.json.

Codex

~/.codex/config.toml
# Generated by redpresets.dev on 2026-11-03. Unverified preset. Also use a read-only credential. Not a security guarantee.

[mcp_servers.last9]
command = "npx"
Removed: args = ["-y", "@last9/mcp-server"]
args = ["-y", "@last9/mcp-server@0.22.0", "--read-only", "--allow-write-tools="]
default_tools_approval_mode = "writes"

[mcp_servers.last9.env]
LAST9_READ_ONLY = "true"
LAST9_MCP_READ_ONLY = "true"
LAST9_ALLOW_WRITE_TOOLS = ""
LAST9_MCP_ALLOW_WRITE_TOOLS = ""

default_tools_approval_mode = "writes" asks before any tool the server does not mark read-only.

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "last9": {
      "type": "stdio",
      "command": "npx",
Removed:       "args": ["-y", "@last9/mcp-server"]
      "args": ["-y", "@last9/mcp-server@0.22.0", "--read-only", "--allow-write-tools="],
      "env": {
        "LAST9_READ_ONLY": "true",
        "LAST9_MCP_READ_ONLY": "true",
        "LAST9_ALLOW_WRITE_TOOLS": "",
        "LAST9_MCP_ALLOW_WRITE_TOOLS": ""
      }
    }
  }
}

Don't add write tools to mcpAllowlist in .cursor/permissions.json. Leave them on approval. Cursor's docs say the allowlist is not a security boundary.

Lines marked + are what we added to the vendor's install command. Struck-through lines marked − are what they replaced; Copy leaves those out.

Credential layer

Use a read-only Last9 token.

Gotchas

  • The server reads a .env file from its working folder and a JSON settings file named by LAST9_CONFIG or -config. Either could turn writes back on. Command-line flags win over both, so the preset passes --read-only and an empty --allow-write-tools= as arguments, and sets all four env variables for clients that drop arguments. Some clients drop empty env values; if yours does, check the folder for a .env.
  • LAST9_API_HOST sends every call, with your token, to the host it names. We don't apply a config that sets it; set it yourself only if you run your own Last9 endpoint.

Facts

Vendor
Last9 official
Source
last9/last9-mcp-server
License
Apache-2.0
GitHub stars
63
Latest release
v0.20.1 (Oct 27, 2026)
Last push
Oct 27, 2026
Status
Active
Last checked
Nov 3, 2026

Sources

Spotted something wrong? Labels change when vendors change. Suggest a correction

Read-only alternatives in Observability