# last9/last9-mcp-server [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/last9/last9-mcp-server  
**GitHub Stars:** 60  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/last9-last9-mcp-server

## Description
Seamlessly bring real-time production context—logs, metrics, and traces—into your local environment to auto-fix code faster

## Tools
Capabilities this server exposes over MCP:

- **start_time_iso**
- **end_time_iso**
- **time_iso**
- **lookback_minutes**
- **limit**
- **service_name**
- **span_name**
- **env**
- **sort_by**
- **request_count**
- **throughput_rpm**
- **http_4xx_count**
- **http_5xx_count**
- **grpc_error_count**
- **prod**
- **baseline_start_time_iso**
- **baseline_end_time_iso**
- **datasource**
- **max_services**
- **max_operations**
- **db_system**
- **postgresql**
- **mysql**
- **mongodb**
- **redis**
- **host**
- **net_peer_name**
- **min_duration_ms**
- **aerospike**
- **query**
- **match_query**
- **label**
- **logjson_query**
- **index**
- **severity_filters**
- **body_filters**
- **region**
- **pipeline**
- **name**
- **filters**
- **key**
- **value**
- **operator**
- **equals**
- **not_equals**
- **conjunction**
- **and**
- **tracejson_query**
- **trace_id**
- **tag_name**
- **get_trace_attributes**
- **resource_department**
- **comparison_mode**
- **latency**
- **errors**
- **time**
- **environment**
- **deployment.environment**
- **operation**
- **candidate_attributes**
- **latency_threshold_ms**
- **minimum_cohort_size**
- **minimum_value_support**
- **selected_span_id**
- **max_spans**
- **event_name**
- **available_event_names**
- **alert_group_name**
- **alert_group_type**
- **data_source_name**
- **team**
- **tier**
- **label_key**
- **label_value**
- **metadata.labels**
- **search_term**
- **rule_name**
- **severity**
- **rule_type**
- **static**

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

**Requires environment variables:** `LAST9_REFRESH_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What last9/last9-mcp-server MCP server does

last9/last9-mcp-server MCP server exposes Last9 observability data to MCP-compatible AI assistants. The README describes access to logs, metrics, traces, exceptions, database queries, alerts, dashboards, investigations, and deployments. The documented capabilities focus on service health, database observability, and Prometheus queries.

Service-oriented tools provide ranked service and environment summaries, available environments, detailed performance measurements, operation groupings, dependency relationships, and comparisons between a current time window and an equal-duration baseline. Results can include request counts, throughput, HTTP and gRPC errors, latency percentiles, Apdex, availability, and error rates. Exception queries support service and span filters.

Database tools derive their results from OpenTelemetry trace spans. They can discover databases, identify slow query executions, aggregate query patterns, and retrieve server-side database metrics where available. Supported database systems include PostgreSQL, MySQL, MongoDB, Redis, and Aerospike, along with other systems represented by an OpenTelemetry `db_system` attribute.

## How it works

The hosted deployment uses an organization-specific Last9 MCP URL under `app.last9.io`. MCP clients connect over HTTP, then complete OAuth in the browser. The organization slug is part of the URL, so the client must be configured with the correct Last9 organization endpoint.

For clients without HTTP transport support, last9/last9-mcp-server can run locally over STDIO. The local process uses a Last9 refresh token to authenticate. Administrators create that token from Last9 API Access with Write permissions. The server can also query Prometheus with range queries, instant queries, and label-value lookups.

## Setup and configuration

Hosted setup requires no local binary. Add the organization MCP URL to a supported client, connect, and authenticate. The README gives configurations for Claude Code, Cursor, VS Code, Windsurf, and Claude Web/Desktop. Claude organization administrators are required for the custom connector setup.

The local package can be installed through Homebrew or npm. The documented npm command is:

```bash
npx -y @last9/mcp-server@latest
```

Configure the process with `LAST9_REFRESH_TOKEN`. Optional settings select a datasource, override the API host, restrict exposed toolsets, control log request limits, enable server-side log search, and adjust internal telemetry. The `LAST9_TOOLSETS` setting accepts toolset names such as `logs`, `traces`, `metrics`, `alerts`, `dashboards`, `investigate`, and `all`.

## Tools and capabilities

The available inputs cover time windows, lookback duration, service and span filters, environments, sorting, result limits, database systems, hosts, peer names, minimum query duration, and PromQL queries. Service summaries expose request and error measurements. Database queries include execution duration and can provide trace IDs for deeper trace investigation. Prometheus tools support both time-range and point-in-time queries.

## Limitations and notes

Database performance coverage depends on OpenTelemetry trace data and the attributes emitted by the instrumented systems. Server-side database metrics vary by database system. Only administrators can create the refresh token needed for local STDIO operation. The hosted connection requires an MCP client with HTTP support and browser authentication.

The server can expose all tools by default, but toolsets may be restricted through configuration. Log and trace retrieval has configurable limits and chunking behavior, so large requests may require tuning rather than returning an unbounded result set.

_Full upstream README: https://allmcps.com/mcp/last9-last9-mcp-server/readme_

