# tracehub-mcp [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/mcpsmiths/tracehub-mcp  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/tracehub-mcp

## Description
Query OpenTelemetry traces from LLM apps across Jaeger, Tempo, Traceloop, Datadog, and Sentry.

## Tools
Capabilities this server exposes over MCP:

- **search_traces** — Search traces with simple params or advanced filters
- **search_spans_tool** — Search individual spans (not grouped into traces)
- **get_trace** — Get complete trace details by trace ID
- **triage_trace** — Synthesize a likely-root-cause diagnosis for a trace (critical path, latency ranking, error chain)
- **correlate_trace** — Find the corresponding trace in a second, independently-configured backend
- **get_llm_usage** — Aggregate token usage metrics
- **list_services** — List available services
- **find_errors** — Find traces with errors
- **list_llm_models** — Discover models in use, with usage stats
- **get_llm_model_stats** — Latency/token percentiles + finish reasons for one model
- **get_llm_expensive_traces** — Find highest token-usage traces
- **get_llm_slow_traces** — Find slowest traces by duration
- **list_llm_tools_tool** — Discover LLM tool/function calls (`traceloop.span.kind == tool`)
- **list_sessions** — Group spans by `gen_ai.conversation.id
- **get_session_stats** — Detailed stats for one conversation ID
- **compare_time_windows** — Diff aggregated usage between two time ranges
- **investigate_cost_spike** — Compare cost between a recent window and a baseline, ranked by model/service
- **investigate_error_spike** — Compare error rate between a recent window and a baseline, ranked by service/model/error type
- **get_prompt_version_stats** — Group spans by `gen_ai.prompt.name`/`.version

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

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

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

## Documentation

## What tracehub-mcp does

tracehub-mcp gives MCP-compatible AI clients access to OpenTelemetry traces generated by LLM and other GenAI applications. It supports Jaeger, Grafana Tempo, Traceloop, Datadog, Sentry, AWS X-Ray, New Relic, and Honeycomb through a common backend interface.

The server treats OpenTelemetry `gen_ai.*` attributes as structured observability data. Agents can inspect prompts, completions, token counts, finish reasons, model usage, tool calls, conversation sessions, latency, and errors alongside ordinary trace and span data.

## How it works

The server runs as a Python package and communicates with an MCP client over its configured transport. A backend type and URL select the trace system to query; authentication and backend-specific settings vary by provider. The same MCP tools are exposed across supported backends, while query behavior follows each backend's API.

Search can operate at either the trace or span level. Trace retrieval returns the complete trace for an ID, while span search returns individual spans without grouping them into traces. Diagnostic tools can rank latency on a critical path, follow an error chain, correlate a trace in a separately configured backend, or synthesize a likely root cause.

## Setup and configuration

The package is available through PyPI. `uvx` can fetch and run it without a separate installation:

```json
{
  "mcpServers": {
    "tracehub-mcp": {
      "command": "uvx",
      "args": ["tracehub-mcp"],
      "env": {
        "BACKEND_TYPE": "jaeger",
        "BACKEND_URL": "http://localhost:16686"
      }
    }
  }
}
```

It can also be started with `pip`, `pipx`, or from source. Claude Code supports adding the server with `claude mcp add` and environment flags. Python 3.11 or newer is supported.

Jaeger can use a bearer token through `BACKEND_API_KEY`; embedded credentials in its URL are rejected. Tempo may be local or Grafana Cloud. Traceloop uses API-key authentication, Datadog requires both an API key and an Application key, and Sentry requires an auth token plus organization slug. AWS X-Ray uses an AWS region and standard AWS credentials. New Relic uses a User API key and account ID. Honeycomb uses a Configuration Key and dataset slug.

## Tools and capabilities

- Search traces with simple parameters or advanced filters, and search ungrouped spans.
- Retrieve full trace details by trace ID and correlate a trace across two configured backends.
- Triage traces using critical-path latency, rankings, and error-chain analysis.
- List services, find error traces, and inspect LLM models, token usage, and finish reasons.
- Identify expensive or slow LLM traces, tool/function calls, prompt versions, and conversation sessions.
- Compare usage across time windows and investigate cost or error-rate spikes by model, service, or error type.

AWS X-Ray has narrower native filtering because OpenTelemetry span attributes are generally stored as unindexed segment metadata. Honeycomb's programmatic Query Data API is identified as an Enterprise-plan feature. New Relic and Honeycomb support was developed without a live account for verification, so provider-specific behavior should be validated in the target environment.

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

