Last9 MCP Server
Logs, traces, metrics and alerting data from Last9.
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
- 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-onlyand 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 setsLAST9_READ_ONLY=falseor LAST9_ALLOW_WRITE_TOOLS.
Claude Code
{
"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
# 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
{
"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
.envfile from its working folder and a JSON settings file named byLAST9_CONFIGor-config. Either could turn writes back on. Command-line flags win over both, so the preset passes--read-onlyand 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_HOSTsends 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
- README: LAST9_MCP_READ_ONLY, LAST9_TOOLSETS · checked Oct 27, 2026
- v0.22.0 main.go calls godotenv.Load(); internal/toolsets/filter.go reads LAST9_READ_ONLY before LAST9_MCP_READ_ONLY and LAST9_ALLOW_WRITE_TOOLS before LAST9_MCP_ALLOW_WRITE_TOOLS; empty values are skipped · checked Nov 3, 2026
- godotenv.Load does not replace a variable that is already set (currentEnv check) · checked Nov 3, 2026
Spotted something wrong? Labels change when vendors change. Suggest a correction
Read-only alternatives in Observability
Query dashboards, Prometheus, Loki, alerts, incidents and OnCall in Grafana.
Query OpenTelemetry traces from Jaeger, Tempo or Traceloop backends.
PromQL queries, metric and target discovery against a Prometheus server.