MCP Directory

How to add Last9 MCP Server to Windsurf

Connect AI to Last9 production observability: logs, metrics, traces, exceptions and alerts. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

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

Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the Last9 MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5Last9 MCP Server's tools become available to Cascade.

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 Windsurf

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 + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Last9 MCP Server config there under the "mcpServers" key and restart the client.

Is Last9 MCP Server safe to use with Windsurf?

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