Cover image
Try Now
2025-04-03

Espejo de https: //github.com/last9/last9-mcp-server

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

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 the following MCP tools:

  • get_exceptions: Get list of exceptions.
  • get_service_graph: Get service graph for an endpoint from the exception.
  • get_logs: Get logs filtered by service name and/or severity level.
  • get_drop_rules: Get drop rules for logs that determine what logs get filtered out at Last9 Control Plane
  • add_drop_rule: Create a drop rule for logs at Last9 Control Plane

Tools Documentation

get_exceptions

Retrieves server-side exceptions over a specified time range.

Parameters:

  • limit (integer, optional): Maximum number of exceptions to return. Default: 20.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS).
  • end_time_iso (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS).
  • span_name (string, optional): Name of the span to filter by.

get_service_graph

Gets the upstream and downstream services for a given span name, along with the throughput for each service.

Parameters:

  • span_name (string, required): Name of the span to get dependencies for.
  • lookback_minutes (integer, optional): Number of minutes to look back. Default: 60.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS).

get_logs

Gets logs filtered by optional service name and/or severity level within a specified time range.

Parameters:

  • service (string, optional): Name of the service to get logs for.
  • severity (string, optional): Severity of the logs to get.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS).
  • end_time_iso (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS).
  • limit (integer, optional): Maximum number of logs to return. Default: 20.

get_drop_rules

Gets drop rules for logs, which determine what logs get filtered out from reaching Last9.

add_drop_rule

Adds a new drop rule to filter out specific logs at Last9 Control Plane

Parameters:

  • name (string, required): Name of the drop rule.
  • filters (array, required): List of filter conditions to apply. Each filter has:
    • key (string, required): The key to filter on. Only attributes and resource.attributes keys are supported. For resource attributes, use format: resource.attributes[key_name] and for log attributes, use format: attributes[key_name] Double quotes in key names must be escaped.
    • value (string, required): The value to filter against.
    • operator (string, required): The operator used for filtering. Valid values:
      • "equals"
      • "not_equals"
    • conjunction (string, required): The logical conjunction between filters. Valid values:
      • "and"

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)

  • LAST9_REFRESH_TOKEN: Refresh Token with Write permissions. Needed for accessing control plane APIs (required).

  • Signup at Last9 and setup one of the integrations.

  • Obtain LAST9_BASE_URL and LAST9_AUTH_TOKEN from here.

  • The Write Refresh Token can be obtained from API Access page.

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": "<last9_otlp_host>",
        "LAST9_REFRESH_TOKEN": "<refresh_token_from_last9_dashboard>"
      }
    }
  }
}

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": "<auth_token>",
        "LAST9_BASE_URL": "<last9_otlp_host>",
        "LAST9_REFRESH_TOKEN": "<write_refresh_token>"
      }
    }
  }
}

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": "<auth_token>",
        "LAST9_BASE_URL": "<last9_otlp_host>",
        "LAST9_REFRESH_TOKEN": "<refresh_token>"
      }
    }
  }
}

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • https://reddgr.com
  • Delivers concise Python code and interprets non-English comments

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • 1Panel-dev
  • 🔥 1Panel proporciona una interfaz web intuitiva y un servidor MCP para administrar sitios web, archivos, contenedores, bases de datos y LLM en un servidor de Linux.

  • Mintplex-Labs
  • La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.

  • GeyserMC
  • Una biblioteca para la comunicación con un cliente/servidor de Minecraft.

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

    Reviews

    1 (1)
    Avatar
    user_ZGaoz4f1
    2025-04-17

    I have been using the last9_last9-mcp-server from MCP-Mirror, and I must say it has significantly improved my server management tasks. The setup was straightforward and the user interface is intuitive. The documentation provided was clear, making the whole experience seamless. Highly recommend for anyone looking for a robust server management solution! Check it out at: https://github.com/MCP-Mirror/last9_last9-mcp-server