Last9

by last9

27 stars
Not rated
GitHub

About

Integrates with Last9's observability platform to enable exception retrieval and service dependency analysis for efficient troubleshooting within monitoring environments.

Details

Author
last9
Repository
last9/last9-mcp-server
GitHub stars
27
License
Apache License 2.0
Categories
Developer Tools, Infrastructure, Other, AI, Design, Search, Frontend
Tags
#analytics, #visualization

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Last9
    Command (node, npx, python, etc.) /opt/homebrew/bin/last9-mcp
    Environment
    • LAST9_REFRESH_TOKEN <your_refresh_token>

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Homebrew:

brew install last9/tap/last9-mcp

NPM:

npm install -g @last9/mcp-server@latest

Homebrew:

json
{
"mcpServers": {
"last9": {
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_REFRESH_TOKEN": "<your_refresh_token>"
}
}
}
}

NPM:

json
{
"mcpServers": {
"last9": {
"command": "npx",
"args": ["-y", "@last9/mcp-server@latest"],
"env": {
"LAST9_REFRESH_TOKEN": "<your_refresh_token>"
}
}
}
}

Where to paste this:

| Client | Location |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| Claude Web/Desktop | Settings > Developer > Edit Config (claude_desktop_config.json) |
| Cursor | Settings > Cursor Settings > MCP > Add New Global MCP Server |
| Windsurf | Settings > Cascade > MCP Marketplace > gear icon (mcp_config.json) |
| VS Code | Wrap in { "mcp": { "servers": { ... } } } in settings.jsondetails |

<details>
<summary>VS Code STDIO config</summary>

json
{
"mcp": {
"servers": {
"last9": {
"type": "stdio",
"command": "/opt/homebrew/bin/last9-mcp",
"env": {
"LAST9_REFRESH_TOKEN": "<your_refresh_token>"
}
}
}
}
}

For NPM: use "command": "npx" and add "args": ["-y", "@last9/mcp-server@latest"].

</details>

<details>
<summary>Windows</summary>

After downloading from GitHub Releases, extract and point to the full path:

json
{
"mcpServers": {
"last9": {
"command": "C:\\Users\\<user>\\AppData\\Local\\Programs\\last9-mcp-server.exe",
"env": {
"LAST9_REFRESH_TOKEN": "<your_refresh_token>"
}
}
}
}
``

The NPM route is easier on Windows — no path management.

</details>

| Variable | Default | Description |
| ---------------------------- | -------------------- | ----------- |
|
LAST9_REFRESH_TOKEN | (required) | Refresh token from API Access |
|
LAST9_DATASOURCE | org default | Datasource/cluster name — useful when you have multiple Levitate clusters |
|
LAST9_API_HOST | app.last9.io | Override the API host |
|
LAST9_TOOLSETS | all tools | Comma-separated toolsets to expose (logs, traces, metrics, alerts, dashboards, investigate, all). Alias: LAST9_MCP_TOOLSETS |
|
LAST9_MAX_GET_LOGS_ENTRIES | 5000 | Max entries for chunked get_logs requests |
|
LAST9_DEBUG_CHUNKING | false | Set true to log chunk-planning details for get_logs, get_service_logs, get_traces |
|
LAST9_DISABLE_TELEMETRY | true | Set false to enable internal OTel tracing |
|
OTEL_SDK_DISABLED | — | Standard OTel env var. Overrides LAST9_DISABLE_TELEMETRY |
|
OTEL_EXPORTER_OTLP_ENDPOINT| — | OTLP collector endpoint (only when telemetry is enabled) |
|
OTEL_EXPORTER_OTLP_HEADERS | — | OTLP auth headers (only when telemetry is enabled) |

---

- start_time_iso / end_time_iso (string, optional)

> All other APM tools require an env value. Use "" if this returns empty.

- search_term (string, optional): Free-text search across name, group, data source, tags.
-
rule_name (string, optional)
-
severity (string, optional)
-
rule_type (string, optional): static or anomaly.
-
alert_group_name / alert_group_type / data_source_name (string, optional)
-
tags` (array, optional): All must match (AND logic).

get_service_summary

Ranked fleet (service, env) rows: interval request_count, throughput_rpm, HTTP 4xx/5xx counts, and gRPC error counts.

get_service_environments

Available environments for your services. Run this first — other APM tools need env from here.

get_service_performance_details

Full breakdown: throughput, error rate, p50/p90/p95/avg/max, apdex, availability.

get_service_operations_summary

Operations grouped by HTTP endpoints, DB calls, messaging, HTTP clients.

get_service_dependency_graph

Dependency map with throughput, latency, and error rates for upstream/downstream/infra.

get_apm_service_deviations

Compare a current window against an equal-duration baseline: regressions/improvements, Apdex reconciliation, and a terminal outcome (fleet or single service).

get_exceptions

Server-side exceptions with service and span filters.

get_databases

Discover all databases across your infrastructure: DB type, host, throughput (queries/min), p95 latency, error rate, number of dependent services.

get_database_slow_queries

The actual slowest query executions, ordered by duration, with trace IDs for drilling into full traces.

get_database_queries

Query patterns and aggregates: how often a query runs, average/p95 duration, error rate.

get_database_server_metrics

Server-side metrics from the DB host itself (CPU, connections, buffer hit rates — depends on your DB system).

prometheus_range_query

PromQL range queries over any metric.

prometheus_instant_query

Instant queries; use rollup functions like avg_over_time, sum_over_time.

prometheus_label_values

Label values for a given series.

prometheus_labels

All labels available for a series.

get_logs

Full JSON pipeline log queries (aggregations, filters, field extraction).

get_service_logs

Raw log lines for a service, filterable by severity and body content.

get_log_attributes

Global catalog of attributes in the log schema for a time window.

get_log_attributes_for_pipeline

Log fields actually present for an in-progress pipeline (scoped discovery), each with its exact filter_field.

get_drop_rules

Log drop rules from Last9 Control Plane.

add_drop_rule

Create a new drop rule to cut log volume at the source.

get_traces

JSON pipeline trace queries for broad searches and aggregations.

get_service_traces

Traces by exact trace ID or service name. Use this when you have a trace ID — it's faster.

get_trace_attributes

Global catalog of attributes in the trace schema.

get_trace_attributes_for_pipeline

Attributes actually present for an in-progress pipeline (scoped discovery), each with its exact filter_field.

get_trace_attribute_values

Distinct values for a trace attribute, optionally scoped to a pipeline.

get_trace_attribute_deviations

Ranks attribute values that differ between two bounded span cohorts (slow vs fast, error vs non-error, or two time windows).

get_trace_waterfall

One exact trace as a parent/child waterfall with interval-union self-time, slowest spans, and graph warnings.

get_change_events

Deployments, config changes, rollbacks. Correlate incidents with what changed.

get_alert_config

Alert rule configurations — searchable by name, severity, type, tags.

get_alerts

Currently firing alerts within a time window.

get_alert_rule_state

Historical firing state (1/0) per alert rule over a time range, grouped by rule_id.

get_notification_channels

Configured notification channels (Slack, PagerDuty, email, etc.).

list_dashboards

All custom dashboards in your org: IDs, names, and metadata.

get_dashboard

Full dashboard definition by ID, including panels and queries.

create_dashboard

Create a new custom dashboard with panels, queries, and metadata.

update_dashboard

Update an existing dashboard by ID.

delete_dashboard

Delete a custom dashboard by ID.

list_dashboard_snapshots

Frozen point-in-time snapshots for a dashboard (metadata only).

get_dashboard_snapshot

Full frozen snapshot including panel data for RCA / shareable views.

delete_dashboard_snapshot

Delete a frozen snapshot by ID.

did_you_mean

When the agent isn't sure about an entity name, this returns the closest matches from your catalog.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "last9": {
            "env": {
                "LAST9_REFRESH_TOKEN": "<your_refresh_token>"
            },
            "args": [],
            "command": "/opt/homebrew/bin/last9-mcp"
        }
    }
}

Linux

{
    "env": {
        "LAST9_REFRESH_TOKEN": "<your_refresh_token>"
    },
    "args": [],
    "command": "/opt/homebrew/bin/last9-mcp"
}

Macos

{
    "env": {
        "LAST9_REFRESH_TOKEN": "<your_refresh_token>"
    },
    "args": [],
    "command": "/opt/homebrew/bin/last9-mcp"
}

Windows

{
    "env": {
        "LAST9_REFRESH_TOKEN": "<your_refresh_token>"
    },
    "args": [],
    "command": "C:\\Users\\<user>\\AppData\\Local\\Programs\\last9-mcp-server.exe"
}

Last9 MCP Server

last9 mcp demo

Your AI agent doesn't know what's broken in production. This fixes that.

Last9 MCP Server connects Claude, Cursor, Windsurf, and any other MCP-capable AI assistant directly to your production observability data — logs, metrics, traces, exceptions, database queries, alerts, and deployments. The agent stops guessing and starts reading the actual signal.

- Watch the demo
- Announcement post

---

Start in 30 seconds (Hosted)

No binary to install. No tokens to manage. One URL, OAuth in your browser, done.

Find your org slug in your Last9 URL: app.last9.io/<org_slug>/...

Claude Code

claude mcp add --transport http last9 https://app.last9.io/api/v4/organizations/<org_slug>/mcp

Type /mcp, select last9, authenticate. That's it.

Cursor

Settings > MCP > Add New MCP Server:

{
  "mcpServers": {
    "last9": {
      "type": "http",
      "url": "https://app.last9.io/api/v4/organizations/<org_slug>/mcp"
    }
  }
}

Click Connect, complete OAuth.

VS Code

Requires v1.99+. Open Command Palette → MCP: Add Server, paste the URL, authenticate.

Or directly in settings.json:

{
  "mcp": {
    "servers": {
      "last9": {
        "type": "http",
        "url": "https://app.last9.io/api/v4/organizations/<org_slug>/mcp"
      }
    }
  }
}

Windsurf

Settings > Cascade > Open MCP Marketplace > gear icon (mcp_config.json):

{
  "mcpServers": {
    "last9": {
      "serverUrl": "https://app.last9.io/api/v4/organizations/<org_slug>/mcp"
    }
  }
}

Claude Web/Desktop

Settings > Connectors > Add custom connector. Name it last9, paste the URL, authenticate.

> Requires admin access to your Claude organization.

---

Self-Hosted (STDIO)

Use this when your MCP client doesn't support HTTP transport, or when you need the server running locally.

Install

Homebrew:

brew install last9/tap/last9-mcp

NPM:

```bash
npm install -g @last9/mcp-server@latest

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.