Last9 MCP服务器是一款用于集成和管理Last9平台的应用程序。它支持开发者通过命令行接口(CLI)或集成开发环境(IDE)与Last9服务进行交互,实现日志、跟踪和性能监控等功能。
Last9 MCP服务器能让开发者轻松与Last9服务交互,开启日志、跟踪和性能监控之旅。
在终端中运行以下命令:
brew install last9/mcp-server
使用Node.js包管理器安装:
# 全局安装
npm install -g @last9/mcp-server
# 或直接运行
npx @last9/mcp-server
服务需要以下环境变量:
LAST9_AUTH_TOKEN:Last9 MCP服务器的认证令牌(必需)LAST9_BASE_URL:Last9 API URL(必需)LAST9_REFRESH_TOKEN:具有写入权限的刷新令牌。用于访问控制平面API(必需)LAST9_BASE_URL和LAST9_AUTH_TOKENLAST9_REFRESH_TOKEN配置Claude应用程序以使用MCP服务器:
claude_desktop_config.json文件。code ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_AUTH_TOKEN": "" ,
"LAST9_BASE_URL": "" ,
"LAST9_REFRESH_TOKEN": ""
}
}
}
}
配置Cursor以使用MCP服务器:
{
"mcpServers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_AUTH_TOKEN": "" ,
"LAST9_BASE_URL": "" ,
"LAST9_REFRESH_TOKEN": ""
}
}
}
}
配置Windsurf以使用MCP服务器:
windsurf_config.json文件。{
"mcpServers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_AUTH_TOKEN": "" ,
"LAST9_BASE_URL": "" ,
"LAST9_REFRESH_TOKEN": ""
}
}
}
}
配置Visual Studio Code以使用MCP服务器:
settings.json。{
"mcp.servers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_AUTH_TOKEN": "" ,
"LAST9_BASE_URL": "" ,
"LAST9_REFRESH_TOKEN": ""
}
}
}
}
通过以上步骤,您已经成功配置了Last9 MCP服务器,并可以在支持的IDE中使用其功能。