MCP server for querying OpenTelemetry traces across multiple observability backends (Jaeger, Tempo, Traceloop, Datadog, and more) for LLM application debugging. Fork of traceloop/opentelemetry-mcp-server.
- ✓Open-source license (Apache-2.0)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add tracehub-mcp -- uvx tracehub-mcp{
"mcpServers": {
"tracehub-mcp": {
"command": "uvx",
"args": ["tracehub-mcp"],
"env": {
"BACKEND_URL": "<backend_url>",
"BACKEND_API_KEY": "<backend_api_key>"
}
}
}
}BACKEND_URLBACKEND_API_KEYMCP Servers overview
<!-- mcp-name: io.github.mcpsmiths/tracehub-mcp -->
# tracehub-mcp
[](https://github.com/mcpsmiths/tracehub-mcp/actions/workflows/ci.yml)
[](https://codecov.io/gh/mcpsmiths/tracehub-mcp)
[](https://pypi.org/project/tracehub-mcp/)
[](https://www.python.org/downloads/)
[](LICENSE)
[](https://glama.ai/mcp/servers/mcpsmiths/tracehub-mcp)
Also listed on the [official MCP registry](https://registry.modelcontextprotocol.io/v0/servers?search=tracehub) as `io.github.mcpsmiths/tracehub-mcp`.
**Give your AI assistant a direct line into your observability backend.** tracehub-mcp is an MCP (Model Context Protocol) server that lets Claude, Cursor, Windsurf, Gemini CLI, or any MCP client query OpenTelemetry traces from your LLM/GenAI application and reason about them — find expensive calls, debug errors, compare model performance, track token usage — without you copy-pasting trace JSON into a chat window.
It speaks OpenTelemetry's `gen_ai.*` semantic conventions natively, so it understands prompts, completions, token usage, and finish reasons as first-class concepts, not just generic span attributes.
tracehub-mcp started as a fork of [traceloop/opentelemetry-mcp-server](https://github.com/traceloop/opentelemetry-mcp-server) (Apache 2.0) — full attribution and fork history are in [NOTICE](NOTICE). It's grown into a 5-backend, security-hardened server maintained independently under [mcpsmiths](https://github.com/mcpsmiths); see [What's Different From Upstream](#whats-different-from-upstream) below for the parts that are new here.
---
## Table of Contents
- [Quick Start](#quick-start)
- [Supported Backends](#supported-backends)
- [What's Different From Upstream](#whats-different-from-upstream)
- [Installation](#installation)
- [Configuration](#configuration)
- [Security Considerations](#security-considerations)
- [MCP Client Setup](#mcp-client-setup)
- [Tools Reference](#tools-reference)
- [Generic Filter System](#generic-filter-system)
- [Example Queries](#example-queries)
- [Common Workflows](#common-workflows)
- [Development](#development)
- [Troubleshooting](#troubleshooting)
- [Roadmap](#roadmap)
- [License](#license)
- [Support](#support)
---
## Quick Start
tracehub-mcp is on PyPI. No install step needed — `uvx` fetches and runs it in one shot:
```json
// claude_desktop_config.json
{
"mcpServers": {
"tracehub-mcp": {
"command": "uvx",
"args": ["tracehub-mcp"],
"env": {
"BACKEND_TYPE": "jaeger",
"BACKEND_URL": "http://localhost:16686"
}
}
}
}
```
Or from Claude Code directly:
```bash
claude mcp add tracehub-mcp -e BACKEND_TYPE=jaeger -e BACKEND_URL=http://localhost:16686 -- uvx tracehub-mcp
```
**That's it.** Ask your assistant: _"Show me traces with errors from the last hour."_
See [MCP Client Setup](#mcp-client-setup) for Cursor, Windsurf, VS Code, and Gemini CLI, and [Installation](#installation) for `pip`/`pipx`/from-source alternatives.
---
## Supported Backends
- **[Jaeger](https://www.jaegertracing.io/)** — local/self-hosted, the most common open-source trace backend. No auth required.
- **[Grafana Tempo](https://grafana.com/oss/tempo/)** — local or Grafana Cloud, TraceQL-native search.
- **[Traceloop](https://www.traceloop.com/)** — cloud LLM observability platform, API-key auth.
- **[Datadog](https://www.datadoghq.com/)** — cloud APM, requires an API key *and* an Application key.
- **[Sentry](https://sentry.io/)** — cloud or self-hosted, requires an auth token and an organization slug.
All five implement the same `BaseBackend` interface, so every MCP tool works identically regardless of which one you point the server at. See [Configuration](#configuration) for per-backend setup.
---
## What's Different From Upstream
Upstream `opentelemetry-mcp-server` shipped Jaeger, Tempo, and Traceloop. tracehub-mcp adds **Datadog and Sentry** as full backends — not thin wrappers, but complete implementations of every tool (search, span search, trace hydration, service discovery, health checks). Along the way, all five backends — including the three inherited from upstream — were hardened to a consistent bar:
- **HTTPS-only enforcement** on cloud backends. Datadog and Sentry both refuse to start against a plain `http://` URL, because their auth is a bearer token / API+App key pair that has no business going out over plaintext.
- **Query-injection-safe escaping.** Every value spliced into a Datadog span-search query or a Sentry Discover query is escaped and exact-quoted; field *names* (which are less obviously untrusted, since they come from the MCP tool's `filters` parameter) are validated against an allowlist pattern before being spliced into the query string, closing off structural injection through a crafted field name.
- **Bounded pagination** on every backend that paginates via cursor (Datadog, Sentry) — a search stops at the requested `limit` or when the backend stops returning a continuation cursor, whichever comes first, so a single tool call can't degrade into an unbounded crawl.
- **Exact-ID re-verification.** Where a backend's search API can return neighbors instead of an exact match (notably Datadog's trace reconstruction from grouped spans), every result is re-checked against the exact ID that was asked for before being returned.
- **No fabricated data on malformed responses, in the backends we built.** Datadog and Sentry reject a span outright — rather than substituting a placeholder like `now()` for a missing timestamp or a literal `"unknown"` for a missing `service_name`/`operation_name` — since a fabricated value would silently corrupt trace ordering, duration aggregation, and any tool that groups by service or operation. (The three backends inherited from upstream — Jaeger, Tempo, Traceloop — predate this discipline and haven't been retrofitted; that's deliberate scope discipline, not an oversight, mirroring this project's own precedent of not reaching into shared/inherited code without full regression coverage for it.)
All of this is backed by **458 passing tests (2 skipped, zero regressions)**, a clean `ruff check` and `mypy --strict` run, and two rounds of adversarial CodeRabbit review on the new backends.
---
## Installation
tracehub-mcp is [on PyPI](https://pypi.org/project/tracehub-mcp/). Pick whichever of these your workflow already uses — they're equivalent.
### Option 1: `uvx` (no install step)
```bash
uvx tracehub-mcp --backend jaeger --url http://localhost:16686
```
This is what the [Quick Start](#quick-start) config above uses — `uv` fetches the package and runs the `tracehub-mcp` entry point in one shot, nothing left behind on disk between runs.
### Option 2: `pip` / `pipx`
```bash
pipx install tracehub-mcp
# or: pip install tracehub-mcp
tracehub-mcp --backend jaeger --url http://localhost:16686
```
### Option 3: Clone and run from source
```bash
git clone https://github.com/mcpsmiths/tracehub-mcp.git
cd tracehub-mcp
uv sync
uv run tracehub-mcp --backend jaeger --url http://localhost:16686
```
Use this if you're developing locally, want to pin to a specific commit, or want the dev tooling installed (`uv sync --group dev`).
### Option 4: Docker
```bash
docker run --rm -p 8000:8000 \
-e BACKEND_TYPE=jaeger -e BACKEND_URL=http://host.docker.internal:16686 \
ghcr.io/mcpsmiths/tracehub-mcp:latest
```
Runs HTTP transport by default (the image's `CMD`); clients connect to `http://localhost:8000/mcp`. This is also the form to use for MCP clients whose config takes a `command`/`args` pair pointing at `docker` directly (Cursor, Windsurf) instead of a local binary.
**Prerequisites:** Python 3.11+, plus [uv](https://github.com/astral-sh/uv) for Options 1 and 3; Docker for Option 4.
---
## Configuration
Configuration comes from environment variables, CLI flags, or both. **Precedence: CLI arguments > environment variables > defaults.**
```bash
# .env (see .env.example)
BACKEND_TYPE=jaeger
BACKEND_URL=http://localhost:16686
```
```bash
# Equivalent via CLI flags
tracehub-mcp --backend jaeger --url http://localhost:16686
```
### All Configuration Options
| Variable | Type | Default | Description |
| ------------------------ | ------- | -------- | ---------------------------------------------------------------------|
| `BACKEND_TYPE` | string | `jaeger` | Backend type: `jaeger`, `tempo`, `traceloop`, `datadog`, or `sentry` |
| `BACKEND_URL` | URL | - | Backend API endpoint (required) |
| `BACKEND_API_KEY` | string | - | API key/auth token (required for Traceloop, Datadog, and Sentry) |
| `BACKEND_APP_KEY` | string | - | Application key (Datadog only, in addition to `BACKEND_API_KEY`) |
| `BACKEND_TEMPO_INSTANCE_ID` | string | - | Grafana Cloud stack/instance ID (Tempo only, enables Basic Auth in addition to `BACKEND_API_KEY`) |
| `BACKEND_SENTRY_ORG` | string | - | Organization slug (required for Sentry) |
| `BACKEND_SENTRY_PROJECT` | string | - | Project slug (optional for Sentry, narrows queries to one project) |
| `BACKEND_ENVIRONMENTS` | string | `prd` | Comma-separated environments (Traceloop only) |
| `BACKEND_TIMEOUT` | float | `30` | Request timeout in seconds |
| `LOG_LEVEL` | string | `INFO` | Logging level: `DEBUG`, `INFOWhat people ask about tracehub-mcp
What is mcpsmiths/tracehub-mcp?
+
mcpsmiths/tracehub-mcp is mcp servers for the Claude AI ecosystem. MCP server for querying OpenTelemetry traces across multiple observability backends (Jaeger, Tempo, Traceloop, Datadog, and more) for LLM application debugging. Fork of traceloop/opentelemetry-mcp-server. It has 0 GitHub stars and its last recorded update is dated 2026-09-13.
How do I install tracehub-mcp?
+
You can install tracehub-mcp by cloning the repository (https://github.com/mcpsmiths/tracehub-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is mcpsmiths/tracehub-mcp safe to use?
+
Our security agent has analyzed mcpsmiths/tracehub-mcp and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains mcpsmiths/tracehub-mcp?
+
mcpsmiths/tracehub-mcp is maintained by mcpsmiths. The last recorded GitHub activity is dated 2026-09-13, with 5 open issues.
Are there alternatives to tracehub-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy tracehub-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/mcpsmiths-tracehub-mcp)<a href="https://claudewave.com/repo/mcpsmiths-tracehub-mcp"><img src="https://claudewave.com/api/badge/mcpsmiths-tracehub-mcp" alt="Featured on ClaudeWave: mcpsmiths/tracehub-mcp" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
The fastest path to AI-powered full stack observability, even for lean teams.