Back to MCP directory
publicPublicdnsLocal runtime

last9_last9-mcp-server

Last9 MCP Server是一个实现Model Context Protocol的服务,为AI代理提供实时生产环境上下文(日志、指标、追踪数据),帮助快速自动修复代码。支持多种IDE和工具,提供异常查询、服务依赖图、日志过滤等功能。

article

README

🚀 最后9 MCP 服务器

最后9 MCP 服务器是为 Last9 实现的 Model Context Protocol 服务器。它能让 AI 代理无缝地将实时生产上下文(日志、指标和跟踪)带入本地环境,从而更快地自动修复代码。

last9 mcp 演示

🚀 快速开始

状态

本服务器与 Claude 桌面应用程序兼容,也可用于 Cursor 和 Windsurf。

工具文档

使用工具

最后9 MCP 服务器
  • 命令last9-mcp
  • 环境变量
    • LAST9_AUTH_TOKEN:可在 OTLP 集成页面 获取。
    • LAST9_BASE_URL:OTLP 监听地址,例如:http://localhost:1234(默认情况)。
    • LAST9_REFRESH_TOKEN:在 API 访问页面 获取具有写入权限的刷新令牌。
  • 示例
last9-mcp --auth_token=your_auth_token --base_url=http://localhost:1234 --refresh_token=your_refresh_token

安装

使用 Homebrew 安装

brew install last9/mcp/last9-mcp

配置使用

配置使用 Claude 桌面应用程序

  1. 打开 Claude 桌面应用程序。
  2. 转到设置,然后进入开发者选项。
  3. 点击编辑配置文件。
  4. 打开 claude_desktop_config.json 文件。
  5. 将以下内容粘贴到现有文件中并保存:
{
  "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>"
      }
    }
  }
}
  1. 重启 Claude 应用程序。

配置使用 Cursor

  1. 在 Cursor 中,转到设置。
  2. 点击左侧的“MCP”。
  3. 点击右上角的“添加新的全局 MCP 服务器”。
  4. 将以下内容粘贴到现有文件中并保存:
{
  "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>"
      }
    }
  }
}
  1. 重启 Cursor。

配置使用 Windsurf

  1. 打开 Windsurf 应用程序。
  2. 转到设置,然后进入开发者选项。
  3. 点击编辑配置文件。
  4. 打开 windsurf_config.json 文件。
  5. 将以下内容粘贴到现有文件中并保存:
{
  "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>"
      }
    }
  }
}
  1. 重启 Windsurf。

⚠️ 重要提示

  • 所有 <...> 部分都需要替换为实际值。
  • 确保安装完成后正确配置环境变量,并验证 MCP 服务器是否正常运行。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client