Tracehub MCP
Queries OpenTelemetry traces from eight observability backends for LLM and GenAI apps
Tracehub MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted
- Runs
- Locally
- Version
- 0.13.2
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a 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-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.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>"
}
}
}
}Add to claude_desktop_config.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.
Add to ~/.cursor/mcp.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.
Add to ~/.copilot/mcp-config.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.
Add with the CLI
Run in a terminal
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-mcpOr add to config.toml
Add to ~/.codex/config.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>" }Add to your client's MCP settings (most use this shape)
{
"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>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.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
Antigravity
Add to ~/.gemini/config/mcp_config.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 (formerly Windsurf)
Add to ~/.config/devin/mcp_config.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
Add to cline_mcp_settings.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
Add to Zed settings.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
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "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.
Junie
Add to ~/.junie/mcp/mcp.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
Add to ~/.kiro/settings/mcp.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.
Using several servers? Build one config file with the MCP config generator.
Configuration
BACKEND_TYPEWhich observability backend to query.RequiredBACKEND_URLBackend API endpoint, e.g. http://localhost:16686 for Jaeger, https://api.datadoghq.com for Datadog, https://api.newrelic.com/graphql for New Relic, or https://api.honeycomb.io for Honeycomb. For the X-Ray backend this is decorative only (e.g. https://xray.us-east-1.amazonaws.com) - never dereferenced for a live request.RequiredBACKEND_API_KEYAPI key or auth token. Required for Traceloop, Datadog, Sentry, New Relic, and Honeycomb; not used by Jaeger, Tempo, or X-Ray. For New Relic this must be a User API key, not an Ingest or License key; for Honeycomb this must be a Configuration Key, not an Ingest or Management key.BACKEND_AWS_REGIONAWS region, e.g. us-east-1. Required for the X-Ray backend only - X-Ray authenticates via boto3's standard AWS credential chain, not BACKEND_API_KEY.BACKEND_NEWRELIC_ACCOUNT_IDNew Relic account ID, required for the New Relic backend only - NerdGraph queries are user-scoped, not account-scoped, so this identifies which account's data to read.BACKEND_HONEYCOMB_DATASETHoneycomb dataset slug, required for the Honeycomb backend only - the Query Data API is dataset-scoped.BACKEND_APP_KEYDatadog Application key, required in addition to BACKEND_API_KEY for the Datadog backend only.BACKEND_TEMPO_INSTANCE_IDGrafana Cloud stack/instance ID, used with BACKEND_API_KEY for Basic Auth (Tempo backend only, required for Grafana Cloud-hosted Tempo, not needed for self-hosted Tempo).BACKEND_SENTRY_ORGSentry organization slug, required for the Sentry backend only.BACKEND_SENTRY_PROJECTSentry project slug, optional for the Sentry backend - narrows queries to one project.BACKEND_ENVIRONMENTSComma-separated environments for the Traceloop backend only.BACKEND_TIMEOUTRequest timeout in seconds.BACKEND_MAX_RESPONSE_BYTESCeiling on the decoded size of any single backend response, in bytes (1 to 1073741824). An oversized body is refused before it is buffered or parsed.LOG_LEVELLogging level.MAX_TRACES_PER_QUERYMaximum traces validated per query (1-1000).SLOW_REQUEST_THRESHOLD_MSLogs a WARNING for any backend request slower than this, independent of LOG_LEVEL. Unset disables slow-request logging.QUERY_CACHE_TTL_SECONDSCache backend query results for this many seconds with in-flight request coalescing; finite, > 0 and at most 86400 (one day). Unset disables the cache.QUERY_CACHE_MAX_ENTRIESUpper bound on the number of cached query results held at once (1-100000); the least-recently-used entry is evicted first.OTEL_EXPORTER_OTLP_ENDPOINTEnables opt-in OTel self-instrumentation of tool calls when set. Unset means zero overhead - no TracerProvider is configured and no middleware is registered.OTEL_SERVICE_NAMEService name reported in self-instrumentation spans, only used when OTEL_EXPORTER_OTLP_ENDPOINT is set.MCP_INCLUDE_ARGS_IN_SPANSInclude tool call arguments/results as OTel span attributes when self-instrumentation is enabled. Off by default since they may contain sensitive data.
About Tracehub MCP
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.
What it does
- 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
Pricing
Open source
Open-source Python package; your backend may have its own costs
Tracehub MCP 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.


