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

**Category:** 📊 Monitoring  
**Repository:** https://github.com/last9/last9-mcp-server  
**GitHub Stars:** 63  
**npm Downloads (last month):** 746  
**Views:** 5  
**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:

- **add_panel** — `panel` (full panel object; `version` defaults to 1), optional `index` (0-based insert position, default append).
- **update_panel** — `panel_id`, `fields` (top-level panel keys to replace; `null` removes a key; `id` cannot change).
- **remove_panel** — `panel_id`.
- **move_panel** — `panel_id`, `index` (0-based position after the move).
- **set_title** — `title` (the dashboard name).
- **set_variable** — `variable`; replaces the variable with the same `target`, otherwise appends it.

## 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 connects MCP clients with Last9 observability data and dashboard configuration. The Last9 service covers production signals such as logs, metrics, traces, exceptions, database queries, alerts, and deployments. The MCP interface can also modify dashboard structure through focused tools for panels, titles, and variables.

Dashboard changes include inserting a complete panel object, replacing selected top-level fields on an existing panel, deleting a panel, moving a panel to a zero-based position, setting the dashboard name, and replacing or appending a dashboard variable based on its target.

## How it works

The hosted deployment uses a streamable HTTP endpoint under the organization’s Last9 URL. Replace `<org_slug>` in `https://app.last9.io/api/v4/organizations/<org_slug>/mcp` with the organization slug from the Last9 application URL, then authenticate through OAuth in the MCP client.

A local STDIO deployment runs either the Homebrew binary, the npm package, or a downloaded platform binary. Local authentication uses a Last9 refresh token. Only administrators can create that token, and the setup flow requires a token with Write permissions.

The server supports toolset selection and a read-only mode for local operation. Read-only mode exposes only tools marked as read-only; write tools can be selectively allowed when needed. Toolset filtering and read-only filtering are applied together.

## Setup and configuration

For hosted use, configure the HTTP URL in Claude Code, Cursor, Windsurf, VS Code, or Claude Web/Desktop, then complete OAuth. VS Code’s hosted setup requires version 1.99 or newer. Claude organization connectors require administrator access.

For local use, install with Homebrew using `brew install last9/tap/last9-mcp`, install the npm package globally, run it with `npx -y @last9/mcp-server@latest`, or download a release binary. The required environment variable is `LAST9_REFRESH_TOKEN`. `LAST9_DATASOURCE` selects a datasource or Levitate cluster, while `LAST9_API_HOST` changes the API host.

`LAST9_TOOLSETS` limits exposed tool groups, including `logs`, `traces`, `metrics`, `alerts`, `dashboards`, `profiles`, `grafana`, and `investigate`. `LAST9_MCP_READ_ONLY=true` enables read-only operation, and `LAST9_MCP_ALLOW_WRITE_TOOLS` can allow selected write tools in that mode. The server also supports log-entry limits, server-side log search, chunking diagnostics, and optional OpenTelemetry settings.

## Tools and capabilities

- Add a dashboard panel at a chosen zero-based position or append it.
- Update selected top-level fields on a panel without changing its ID.
- Remove a panel by ID.
- Move a panel to a specified zero-based index.
- Set the dashboard title.
- Replace a variable with the same target or append a new variable.

The panel version defaults to `1` when adding a panel. Setting a field to `null` removes that top-level field during an update, and panel IDs cannot be changed.

## Limitations and notes

Hosted setup requires an organization slug and OAuth access. Local setup requires an administrator-created refresh token with Write permissions. Earlier Node.js releases should not be used for npm installation; the documented supported lines are Node.js 22.23.4+, 24.22.1+, or 26.12.1+. Read-only mode hides unannotated tools as well as tools that can change or delete resources.

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

