# Downtrace MCP server

> Lets an AI agent discover and manage Node.js backend performance regressions, findings, and alerts.

- Repository: https://github.com/RadW2020/downtrace-agent
- Page: https://hostedmcp.org/servers/radw2020/downtrace
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.4.0

## Install

### Claude Code

```sh
claude mcp add --env 'DOWNTRACE_URL=<DOWNTRACE_URL>' --env 'DOWNTRACE_TOKEN=<YOUR_DOWNTRACE_TOKEN>' downtrace -- npx -y @downtrace/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "downtrace": {
      "command": "npx",
      "args": [
        "-y",
        "@downtrace/mcp"
      ],
      "env": {
        "DOWNTRACE_URL": "<DOWNTRACE_URL>",
        "DOWNTRACE_TOKEN": "<YOUR_DOWNTRACE_TOKEN>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "downtrace": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@downtrace/mcp"
      ],
      "env": {
        "DOWNTRACE_URL": "<DOWNTRACE_URL>",
        "DOWNTRACE_TOKEN": "<YOUR_DOWNTRACE_TOKEN>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"downtrace","type":"stdio","command":"npx","args":["-y","@downtrace/mcp"],"env":{"DOWNTRACE_URL":"<DOWNTRACE_URL>","DOWNTRACE_TOKEN":"<YOUR_DOWNTRACE_TOKEN>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "downtrace": {
      "command": "npx",
      "args": [
        "-y",
        "@downtrace/mcp"
      ],
      "env": {
        "DOWNTRACE_URL": "<DOWNTRACE_URL>",
        "DOWNTRACE_TOKEN": "<YOUR_DOWNTRACE_TOKEN>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add downtrace --env 'DOWNTRACE_URL=<DOWNTRACE_URL>' --env 'DOWNTRACE_TOKEN=<YOUR_DOWNTRACE_TOKEN>' -- npx -y @downtrace/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.downtrace]
command = "npx"
args = ["-y", "@downtrace/mcp"]

[mcp_servers.downtrace.env]
DOWNTRACE_URL = "<DOWNTRACE_URL>"
DOWNTRACE_TOKEN = "<YOUR_DOWNTRACE_TOKEN>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'DOWNTRACE_URL=<DOWNTRACE_URL>' -e 'DOWNTRACE_TOKEN=<YOUR_DOWNTRACE_TOKEN>' downtrace npx -- -y @downtrace/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "downtrace": {
      "command": "npx",
      "args": [
        "-y",
        "@downtrace/mcp"
      ],
      "env": {
        "DOWNTRACE_URL": "<DOWNTRACE_URL>",
        "DOWNTRACE_TOKEN": "<YOUR_DOWNTRACE_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DOWNTRACE_URL` | yes | no | The address of your Downtrace |
| `DOWNTRACE_TOKEN` | no | yes | An access credential of the project, of level operate; without it the server is read-only |

## Tools (10)

- `project_brief`
- `read_credential`
- `list_projects`
- `project_status`
- `changes_since`
- `read_report`
- `compare_windows`
- `verify_recovery`
- `read_history`
- `read_captured_requests`

## FAQ

### What does Downtrace do?

Downtrace identifies when changes break the performance of your Node.js backend, such as causing slow queries or increased outgoing calls.

### How do I authenticate with the MCP server?

You can use a DOWNTRACE_TOKEN environment variable or run 'npx @downtrace/agent login --project <slug>' to store credentials locally in credentials.json.
