Last9 MCP Server

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.
- View demo
- Read our announcement blog post
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 Planeadd_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.lookback_minutes(integer, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.start_time_iso(string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.end_time_iso(string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.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, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.start_time_iso(string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.
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.lookback_minutes(integer, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.start_time_iso(string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.end_time_iso(string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.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_URLandLAST9_AUTH_TOKENfrom 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:
- Open the Claude Desktop app
- Go to Settings, then Developer, click Edit Config
- Open the
claude_desktop_config.jsonfile - Copy and paste the server config to your existing file, then save
- 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:
- Navigate to Settings, then Cursor Settings
- Select MCP on the left
- Click Add new global MCP server at the top right
- Copy and paste the server config to your existing file, then save
- 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 Windsurf to use the MCP server:
- Open Windsurf
- Go to Settings, then Developer
- Click Edit Config
- Open the
windsurf_config.jsonfile - Copy and paste the server config to your existing file, then save
- 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>"
}
}
}
}
Usage with VS Code
Prerequisites:
- VS Code version 1.99 or later
Configure VS Code to use the MCP server:
- Create
.vscode/mcp.jsonin your workspace or add to VS Code user settings with the following configuration:
{
"servers": {
"last9": {
"type": "stdio",
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_AUTH_TOKEN": "<auth_token>",
"LAST9_BASE_URL": "<last9_otlp_host>",
"LAST9_REFRESH_TOKEN": "<write_refresh_token>"
}
}
}
}
- Open Chat view (⌃⌘I on macOS, Ctrl+Alt+I on Windows/Linux)
- Select “Agent” mode from dropdown
- The Last9 MCP server will now be available in VS Code
Note: Replace placeholder values (<auth_token>, <last9_otlp_host>, and <write_refresh_token>) with your actual Last9 credentials.
For advanced configuration options and alternative setup methods, see the official VS Code MCP documentation.
Last9 MCP Server
Project Details
- last9/last9-mcp-server
- @last9/mcp-server
- Last Updated: 4/20/2025
Categories
Recomended MCP Servers
An MCP server that enables communication with users through Telegram. This server provides a tool to ask questions...
MCP for https://votars.ai
A full implementation of Ethers as an AI tool for the model context protocol
A Unity MCP server that allows MCP clients like Claude Desktop or Cursor to perform Unity Editor actions.
Serper MCP Server supporting search and webpage scraping
council of models for decision
大家好!我是功能丰富的 MCP 服务,旨在打破设备与服务的隔阂,为用户带来便捷体验。 天气工具和气象平台联动,快速为用户推送全球实时天气,助力大家规划出行。控制浏览器工具模拟人工操作,自动搜索、浏览网页,大幅节省时间。摄像头工具调用本地摄像头拍照、录像,实现人脸识别,保障家庭安防。 为实现工具协同,我搭建了稳定框架,开发者可以基于现有服务进行拓展
A Model Context Protocol server for retrieving and analyzing issues from Sentry.io
MCP Implementation for HubSpot
A Model Context Protocol (MCP) server to provide git tools for LLM Agents
Python and TypeScript library for integrating the Stripe API into agentic workflows
MCP Memory Server with PostgreSQL and pgvector for long-term memory capabilities





