# Tracehub MCP

> Tracehub MCP is an open-source MCP server for developer tools. Queries OpenTelemetry traces from eight observability backends for LLM and GenAI apps. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/mcpsmiths/tracehub-mcp
- **MCP Registry name:** io.github.mcpsmiths/tracehub-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-23

## About

Debugging an LLM application usually means pasting trace JSON into a chat. This server lets the assistant query the tracing backend directly and reason about the results, with native understanding of the gen_ai.* OpenTelemetry conventions: prompts, completions, token usage and finish reasons.

One backend is selected per run with BACKEND_TYPE: Jaeger, Grafana Tempo, Traceloop, Datadog, Sentry, AWS X-Ray, New Relic or Honeycomb. Each needs its own settings, for example a Datadog API and application key, a Sentry organisation slug, an AWS region for X-Ray or a dataset for Honeycomb. The README flags New Relic and Honeycomb as built without a live account to verify against, and notes Honeycomb's query API is documented as Enterprise-only.

It began as a fork of the Apache 2.0 Traceloop server and adds Datadog and Sentry, plus HTTPS-only enforcement on cloud backends, escaped query values, bounded pagination and re-verification of exact IDs. A response-size ceiling refuses oversized backend replies before parsing. The README reports 458 passing tests.

## Features

- **Eight trace backends:** Supports Jaeger, Tempo, Traceloop, Datadog, Sentry, X-Ray, New Relic and Honeycomb.
- **GenAI semantics:** Reads gen_ai.* attributes such as prompts, token usage and finish reasons.
- **HTTPS on cloud backends:** Datadog and Sentry refuse plain http URLs.
- **Query-injection hardening:** Escapes values and validates field names before building backend queries.
- **Bounded pagination:** Stops at the requested limit rather than crawling without end.
- **Response size cap:** Refuses oversized backend responses before parsing them.

## Good for

- Find errored LLM calls from the last hour
- Compare token usage and latency across models
- Debug a failing agent run from its trace
- Query traces in an existing Datadog or Sentry setup from an assistant

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add tracehub-mcp --env BACKEND_TYPE='<BACKEND_TYPE>' --env BACKEND_URL='<BACKEND_URL>' --env BACKEND_API_KEY='<BACKEND_API_KEY>' --env BACKEND_APP_KEY='<BACKEND_APP_KEY>' -- uvx tracehub-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add tracehub-mcp --env BACKEND_TYPE='<BACKEND_TYPE>' --env BACKEND_URL='<BACKEND_URL>' --env BACKEND_API_KEY='<BACKEND_API_KEY>' --env BACKEND_APP_KEY='<BACKEND_APP_KEY>' -- uvx tracehub-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.tracehub-mcp]
command = "uvx"
args = ["tracehub-mcp"]
env = { BACKEND_TYPE = "<BACKEND_TYPE>", BACKEND_URL = "<BACKEND_URL>", BACKEND_API_KEY = "<BACKEND_API_KEY>", BACKEND_APP_KEY = "<BACKEND_APP_KEY>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e BACKEND_TYPE='<BACKEND_TYPE>' -e BACKEND_URL='<BACKEND_URL>' -e BACKEND_API_KEY='<BACKEND_API_KEY>' -e BACKEND_APP_KEY='<BACKEND_APP_KEY>' tracehub-mcp uvx -- tracehub-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": [
        "tracehub-mcp"
      ],
      "env": {
        "BACKEND_TYPE": "<BACKEND_TYPE>",
        "BACKEND_URL": "<BACKEND_URL>",
        "BACKEND_API_KEY": "<BACKEND_API_KEY>",
        "BACKEND_APP_KEY": "<BACKEND_APP_KEY>"
      }
    }
  }
}
```

## FAQ

### How do I pick a backend?

Set BACKEND_TYPE and BACKEND_URL, plus the credentials that backend needs.

### Which are less verified?

The README says New Relic and Honeycomb were built without a live account to test against.

### How do I run Tracehub MCP?

With uvx tracehub-mcp from PyPI, or pip or pipx.

### Where does Tracehub MCP come from?

A fork of traceloop/opentelemetry-mcp-server, which is Apache 2.0.

### Is Tracehub MCP free?

Yes. Tracehub MCP is open source, so you can use and self-host it for free.

### How do I add Tracehub MCP to Claude Code?

Run this command in your terminal: claude mcp add tracehub-mcp --env BACKEND_TYPE='<BACKEND_TYPE>' --env BACKEND_URL='<BACKEND_URL>' --env BACKEND_API_KEY='<BACKEND_API_KEY>' --env BACKEND_APP_KEY='<BACKEND_APP_KEY>' -- uvx tracehub-mcp

### What are the best alternatives to Tracehub MCP?

The closest alternatives to Tracehub MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/tracehub-mcp
