Last9 MCP Server
@last9
Last9 MCP Server
Overview
What is Last9 MCP Server?
Last9 MCP Server connects AI assistants like Claude, Cursor, and Windsurf directly to production observability data — logs, metrics, traces, exceptions, database queries, alerts, and deployments. It lets AI agents stop guessing and read actual production signals.
How to use Last9 MCP Server?
Two modes: hosted (HTTP transport, no binary install) and self-hosted (STDIO, requires a refresh token). For hosted, configure your MCP client with the URL https://app.last9.io/api/v4/organizations/<org_slug>/mcp and authenticate via OAuth in your browser. For self-hosted, install via Homebrew, NPM, or binary download, set LAST9_REFRESH_TOKEN, and configure the client with the command and environment variables.
Key features of Last9 MCP Server
- Service health tools: throughput, error rate, latency, dependency graph
- Database observability: slow queries, query patterns, server metrics
- Prometheus / PromQL range and instant queries
- Logs: JSON pipeline queries, raw log lines, attribute discovery
- Traces: JSON pipeline queries, trace IDs, attribute filtering
- Change events and alert configurations and states
- Custom dashboards: list, get, create, update, delete
- Fuzzy name resolution for entity names
Use cases of Last9 MCP Server
- Troubleshoot production incidents by querying logs, traces, and metrics
- Correlate deployments and changes with alert firing or performance degradation
- Identify slow database queries and their impact on services
- Use AI assistants to explore observability data without switching dashboards
FAQ from Last9 MCP Server
What do I need to use the hosted Last9 MCP Server?
You need a Last9 account and your organization slug (found in your Last9 URL). No binary or token to install — OAuth happens in your browser.
Can I run Last9 MCP Server locally?
Yes, in self-hosted STDIO mode. Install via Homebrew, NPM, or binary download, and set LAST9_REFRESH_TOKEN (requires admin permissions) in environment variables.
What data can the AI assistant access through Last9 MCP Server?
The assistant can access service performance, database queries, Prometheus metrics, logs, traces, exceptions, change events (deployments, config changes), alert configurations and states, and custom dashboards.
How does the server handle large log or trace results?
Results are chunked rather than truncated. The default limit for logs is 5000 entries, configurable via the environment variable LAST9_MAX_GET_LOGS_ENTRIES.
What transport modes does Last9 MCP Server support?
It supports HTTP transport (for hosted mode with OAuth) and STDIO transport (for self-hosted mode requiring a refresh token).