Seamlessly bring real-time production context—logs, metrics, and traces—into your local environment to auto-fix code faster.
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.
Works with Claude desktop app, or Cursor, Windsurf, and VSCode (Github Copilot) IDEs. Implements the following MCP tools:
get_exceptions
: Get the 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 PlaneRetrieves 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.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.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.Gets drop rules for logs, which determine what logs get filtered out from reaching Last9.
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:
conjunction
(string, required): The logical conjunction between filters.
Valid values:
You can install the Last9 Observability MCP server using either:
# Add the Last9 tap
brew tap last9/tap
# Install the Last9 MCP CLI
brew install last9-mcp
# Install globally
npm install -g @last9/mcp-server
# Or run directly with npx
npx @last9/mcp-server
The Last9 MCP server requires the following environment variables:
LAST9_BASE_URL
: (required) Last9 API URL from
OTel integrationLAST9_AUTH_TOKEN
: (required) Authentication token for Last9 MCP server from
OTel integrationLAST9_REFRESH_TOKEN
: (required) Refresh Token with Write permissions, needed
for accessing control plane APIs from
API AccessConfigure the Claude app to use the MCP server:
claude_desktop_config.json
file{
"mcpServers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_BASE_URL": "<last9_otlp_host>",
"LAST9_AUTH_TOKEN": "<last9_otlp_auth_token>",
"LAST9_REFRESH_TOKEN": "<last9_write_refresh_token>"
}
}
}
}
Configure Cursor to use the MCP server:
{
"mcpServers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_BASE_URL": "<last9_otlp_host>",
"LAST9_AUTH_TOKEN": "<last9_otlp_auth_token>",
"LAST9_REFRESH_TOKEN": "<last9_write_refresh_token>"
}
}
}
}
Configure Windsurf to use the MCP server:
windsurf_config.json
file{
"mcpServers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_BASE_URL": "<last9_otlp_host>",
"LAST9_AUTH_TOKEN": "<last9_otlp_auth_token>",
"LAST9_REFRESH_TOKEN": "<last9_write_refresh_token>"
}
}
}
}
Note: MCP support in VS Code is available starting v1.99 and is currently in preview. For advanced configuration options and alternative setup methods, view the VS Code MCP documentation.
{
"mcp": {
"servers": {
"last9": {
"type": "stdio",
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_BASE_URL": "<last9_otlp_host>",
"LAST9_AUTH_TOKEN": "<last9_otlp_auth_token>",
"LAST9_REFRESH_TOKEN": "<last9_write_refresh_token>"
}
}
}
}
}
GitLab API, enabling project management
Create crafted UI components inspired by the best 21st.dev design engineers.
ALAPI MCP Tools,Call hundreds of API interfaces via MCP
APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.
MCP to interface with multiple blockchains, staking, DeFi, swap, bridging, wallet management, DCA, Limit Orders, Coin Lookup, Tracking and more.
Enable AI agents to interact with the Atla API for state-of-the-art LLMJ evaluation.
Get prescriptive CDK advice, explain CDK Nag rules, check suppressions, generate Bedrock Agent schemas, and discover AWS Solutions Constructs patterns.
Query and analyze your Axiom logs, traces, and all other event data in natural language
Bring the full power of BrowserStack’s Test Platform to your AI tools, making testing faster and easier for every developer and tester on your team.
Flag features, manage company data, and control feature access using Bucket