A Model Context Protocol server implementation for Last9 that enables AI agents to seamlessly bring real-time production context — logs, metrics, and traces — into your local environment to auto-fix code faster.
21 stars5 watching0 forks

Last9 MCP Server

last9 mcp demo

A Model Context Protocol server implementation for Last9 that enables AI agents to seamlessly bring real-time production context — logs, metrics, and traces — into your local environment to auto-fix code faster.

Status

Works with Claude desktop app, or Cursor, Windsurf, and VSCode (Github Copilot) IDEs. Implements two MCP tools:

  • get_exceptions: Get list of execeptions
  • get_servicegraph: Get Service graph for an endpoint from the exception

Installation

You can install the Last9 Observability MCP server using either:

Homebrew

# Add the Last9 tap
brew tap last9/tap

# Install the Last9 MCP CLI
brew install last9-mcp

NPM

# Install globally
npm install -g @last9/mcp-server

# Or run directly with npx
npx @last9/mcp-server

Configuration

Environment Variables

The service requires the following environment variables:

  • LAST9_AUTH_TOKEN: Authentication token for Last9 MCP server (required)
  • LAST9_BASE_URL: Last9 API URL (required)

Signup at Last9 and get your env variable keys here.

Usage with Claude Desktop

Configure the Claude app to use the MCP server:

  1. Open the Claude Desktop app
  2. Go to Settings, then Developer, click Edit Config
  3. Open the claude_desktop_config.json file
  4. Copy and paste the server config to your existing file, then save
  5. Restart Claude
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "last9": {
      "command": "/opt/homebrew/bin/last9-mcp",
      "env": {
        "LAST9_AUTH_TOKEN": "your_auth_token",
        "LAST9_BASE_URL": "https://otlp.last9.io"
      }
    }
  }
}

Usage with Cursor

Configure Cursor to use the MCP server:

  1. Navigate to Settings, then Cursor Settings
  2. Select MCP on the left
  3. Click Add new global MCP server at the top right
  4. Copy and paste the server config to your existing file, then save
  5. Restart Cursor
{
  "mcpServers": {
    "last9": {
      "command": "/opt/homebrew/bin/last9-mcp",
      "env": {
        "LAST9_AUTH_TOKEN": "your_auth_token",
        "LAST9_BASE_URL": "https://otlp.last9.io"
      }
    }
  }
}

Usage with Windsurf

Configure Cursor to use the MCP server:

  1. Open Windsurf
  2. Go to Settings, then Developer
  3. Click Edit Config
  4. Open the windsurf_config.json file
  5. Copy and paste the server config to your existing file, then save
  6. Restart Windsurf
{
  "mcpServers": {
    "last9": {
      "command": "/opt/homebrew/bin/last9-mcp",
      "env": {
        "LAST9_AUTH_TOKEN": "your_auth_token",
        "LAST9_BASE_URL": "https://otlp.last9.io"
      }
    }
  }
}

Features

exceptions
servicegraph
observability
telemetry
monitoring

Category

Monitoring