get_exceptionsLABSCO SUMMARY
Your agent stops guessing at production and reads the actual signal.
The incident-correlation path is where this earns its place: get_change_events lines up deployments and rollbacks against get_alerts and the trace waterfall, so an agent debugging an outage can tie 'what's firing' to 'what changed' rather than speculating. The database tools are a quiet strength too — they come straight from OpenTelemetry spans, so slow-query analysis with trace IDs works with no extra instrumentation if you already run OTel.
What it is
Last9's official server connecting an AI assistant to your production observability data: tools across APM and services, logs, traces, database performance, alerts and change events, and dashboards, grouped into toolsets you can narrow. It runs as a hosted OAuth endpoint with no binary to install.
What you get
- Service performance: get_service_environments (run first — other APM tools need its env), get_service_performance_details for throughput, error rate, p50/p90/p95 and apdex, get_service_dependency_graph, and get_apm_service_deviations comparing a window against a baseline
- Logs: get_logs for full JSON-pipeline queries with aggregations, get_service_logs for raw lines filterable by severity, and get_log_attributes / get_log_attributes_for_pipeline to discover the fields that actually exist
- Traces: get_traces for broad queries, get_service_traces by exact trace ID, get_trace_waterfall to render one trace as a parent/child waterfall with self-time, and get_trace_attribute_deviations to rank what differs between slow and fast cohorts
- Database performance from OpenTelemetry spans, no extra instrumentation: get_databases, get_database_slow_queries with trace IDs to drill in, get_database_queries for patterns, and get_database_server_metrics
- get_exceptions returns server-side exceptions with service and span filters
- Incident correlation: get_change_events for deployments, config changes and rollbacks, get_alerts for what is firing, get_alert_config and get_alert_rule_state for history, and get_notification_channels
- Dashboards read with get_dashboard and get_dashboard_snapshot for a shareable frozen view
- did_you_mean suggests the closest entity names when a lookup comes up empty — the server calls it automatically before most tools
- Large log and trace results are chunked rather than truncated, and reference manuals are exposed as MCP resources rather than always-on tool text
Requirements
A Last9 account. The fastest path is the hosted server at https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcp over HTTP with OAuth in your browser — no binary, no tokens to manage; find your org slug in your Last9 URL. The @last9/mcp-server package runs it locally. LAST9_TOOLSETS narrows what is exposed to named packs (logs, traces, metrics, alerts, dashboards, investigate, all), and LAST9_MAX_GET_LOGS_ENTRIES caps chunked log requests at its default of 5000.
Setup effort
One command, then sign in — claude mcp add --transport http last9 https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcp, then approve the OAuth sign-in
USE CASES
Debugging a production incident
Check what changed recently and what is firing, then follow the failing service's traces into a single waterfall to see where the time and errors went.
Finding why a service got slower
Compare the service's current window against a baseline for regressions, then rank the trace attributes that differ between slow and fast requests to narrow the cause.
Chasing a slow database
Discover the databases, pull the actual slowest query executions with their trace IDs, and read the server-side metrics from the DB host — no extra instrumentation if you run OTel.
Reading logs around an error
Discover which log fields exist for the pipeline, run a filtered query across them, and pull the raw service log lines around the failure.
43 tools
Listed in project docs. Your client may show a different list.
get_service_summaryget_service_environmentsget_service_performance_detailsget_service_operations_summaryget_service_dependency_graphget_apm_service_deviationsget_databasesget_database_slow_queriesget_database_queriesget_database_server_metricslist_datasourcesprometheus_range_queryprometheus_instant_queryprometheus_label_valuesprometheus_labelsget_logsget_service_logsget_log_attributesget_log_attributes_for_pipelineget_drop_rulesadd_drop_ruleget_tracesget_service_tracesget_trace_attributesget_trace_attributes_for_pipelineget_trace_attribute_valuesget_trace_attribute_deviationsget_trace_waterfallget_change_eventsget_alert_configget_alertsget_alert_rule_stateget_notification_channelslist_dashboardsget_dashboardcreate_dashboardupdate_dashboarddelete_dashboardlist_dashboard_snapshotsget_dashboard_snapshotdelete_dashboard_snapshotdid_you_meanBEFORE YOU INSTALL
What to know first
Tools you get
43 tools named in the project's documentation.
Requires
A client that can reach a remote MCP server over HTTP
INSTALLATION
Connect your client
Server setup
Claude Code
claude mcp add --transport http last9 https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcpMCP Clients
Cursor
{
"mcpServers": {
"last9": {
"type": "http",
"url": "https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcp"
}
}
}VS Code
{
"servers": {
"last9": {
"type": "http",
"url": "https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcp"
}
}
}Windsurf
{
"mcpServers": {
"last9": {
"serverUrl": "https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcp"
}
}
}Claude.ai, Claude Desktop
Settings > Connectors > Add custom connector — name it last9, paste https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcp
Codex
codex mcp add last9 --url https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcpChatGPT
Settings → Connectors → Advanced settings → Developer Mode → Create, Connector URL https://app.last9.io/api/v4/organizations/<YOUR_ORG_SLUG>/mcp
Any MCP client — Homebrew
Install it with Homebrew
brew install last9/tap/last9-mcpGet a refresh token and add the server
LAST9_REFRESH_TOKEN comes from API Access (https://app.last9.io/settings/api-access). Only admins can create tokens: click Generate Token with Write permissions, then copy it.
{
"mcpServers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_REFRESH_TOKEN": "<YOUR_LAST9_REFRESH_TOKEN>"
}
}
}
}Any MCP client — npx
LAST9_REFRESH_TOKEN comes from API Access (https://app.last9.io/settings/api-access). Only admins can create tokens: click Generate Token with Write permissions, then copy it.
{
"mcpServers": {
"last9": {
"command": "npx",
"args": [
"-y",
"@last9/mcp-server@latest"
],
"env": {
"LAST9_REFRESH_TOKEN": "<YOUR_LAST9_REFRESH_TOKEN>"
}
}
}
}