MCP Directory

How to add Last9 MCP Server to Cursor

Connect AI to Last9 production observability: logs, metrics, traces, exceptions and alerts. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 15, 2026 · 90 · stdio · apikey · official

Cursor config for Last9 MCP Server

npx -y @last9/mcp-server@latest
{
  "mcpServers": {
    "last9-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@last9/mcp-server@latest"
      ],
      "env": {
        "LAST9_REFRESH_TOKEN": "<your-refresh-token>"
      }
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Last9 MCP Server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Last9 MCP Server's tools to confirm it's connected.

Before you start

  • A Last9 account (app.last9.io) with admin access — only admins can generate API tokens
  • For self-hosted stdio: a Last9 refresh/access token from Settings → API Access (app.last9.io/settings/api-access), generated with Write permission, set as LAST9_REFRESH_TOKEN
  • For self-hosted: the binary via Homebrew (brew install last9/tap/last9-mcp), npm (npm install -g @last9/mcp-server@latest), or a GitHub release download (macOS/Linux/Windows, x64/ARM64)
  • For hosted HTTP: your Last9 org slug from the app URL and an MCP client that supports OAuth (Claude, Cursor, VS Code 1.99+, Windsurf)

What Last9 MCP Server can do in Cursor

get_service_summary

High-level health summary for a service

get_exceptions

List server-side exceptions for a service/time range

get_logs

Query logs across the platform

get_service_logs

Fetch logs scoped to a specific service

get_traces

Retrieve distributed traces

prometheus_range_query

Run a PromQL range query over metrics

prometheus_instant_query

Run a PromQL instant query

get_database_slow_queries

Surface slow database queries

Security

The refresh token authenticates to your full Last9 org telemetry, so store it securely and prefer the hosted OAuth endpoint where no static token is stored locally. Limit LAST9_MAX_GET_LOGS_ENTRIES to avoid pulling excessive log volume into the model context.

Last9 MCP Server + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Last9 MCP Server config there under the "mcpServers" key and restart the client.

Is Last9 MCP Server safe to use with Cursor?

The refresh token authenticates to your full Last9 org telemetry, so store it securely and prefer the hosted OAuth endpoint where no static token is stored locally. Limit LAST9_MAX_GET_LOGS_ENTRIES to avoid pulling excessive log volume into the model context.

How do I authenticate?

Either use the hosted HTTP transport with OAuth (no token to manage), or self-host the stdio binary with a LAST9_REFRESH_TOKEN. Only Last9 admins can generate the token from Settings → API Access.

Do I need to install anything for the hosted version?

No. The hosted HTTP transport requires no binary and no token — you add the org-scoped MCP URL and authenticate via OAuth in your client.

Which MCP clients are supported?

Claude (Code/Desktop/Web), Cursor, VS Code 1.99+, and Windsurf are documented as supported clients.

View repo Full Last9 MCP Server page