OTEL MCP Server
An MCP (Model Context Protocol) server for Jaeger trace analysis during development. Query and analyze distributed traces with AI assistance for debugging and performance optimization.
Features
- Service Discovery: List services and operations in your Jaeger instance
- Trace Inspection: Search, filter, and inspect traces with full span details
- Performance Analysis: Find slow traces, get latency percentiles, error rates
- REST API: FastAPI endpoints with OpenAPI documentation at
/docs - Self-Telemetry: The server traces itself to Jaeger for debugging
Installation
Using uvx (Recommended)
Run directly without installing:
# Run MCP server
uvx otel-mcp
# Run REST API
uvx --from otel-mcp otel-mcp-api
Using pip
pip install otel-mcp
# Then run
otel-mcp # MCP server
otel-mcp-api # REST API
From Source
git clone https://github.com/ryanm101/otel-mcp.git
cd otel-mcp
uv sync
uv run otel-mcp
Quick Start
1. Start Jaeger
docker-compose up -d
# Jaeger UI at http://localhost:16686
2. Run the MCP Server
uvx otel-mcp
# Or with environment variables:
JAEGER_URL=http://jaeger:16686 uvx otel-mcp
3. Or Run the REST API
uvx --from otel-mcp otel-mcp-api
# OpenAPI docs at http://localhost:8000/docs
MCP Client Configuration
Add to your MCP client config (e.g., Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"otel-mcp": {
"command": "uvx",
"args": ["otel-mcp"],
"env": {
"JAEGER_URL": "http://localhost:16686"
}
}
}
}
Configuration
Create a .env file (see .env.example):
JAEGER_URL=http://localhost:16686
JAEGER_TIMEOUT=30
LOG_LEVEL=INFO
# Debug logging (writes to file in working directory)
# DEBUG_LOG_FILE=otel-mcp.log
# Self-telemetry (optional)
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=otel-mcp
# OTEL_SDK_DISABLED=true # Disable self-telemetry
MCP Tools
Service Discovery
| Tool | Description |
|---|---|
list_services |
List all services in Jaeger |
list_operations |
List operations for a service |
Trace Inspection
| Tool | Description |
|---|---|
search_traces |
Search traces with filters (service, operation, duration, errors) |
get_trace |
Get complete trace by ID with all spans |
find_errors |
Find traces containing errors |
Performance Analysis
| Tool | Description |
|---|---|
get_slow_traces |
Find slowest traces |
get_operation_stats |
Get latency percentiles (p50/p95/p99) and error rates |
REST API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/services |
GET | List services |
/services/{name}/operations |
GET | List operations |
/traces |
GET | Search traces |
/traces/{trace_id} |
GET | Get trace by ID |
/traces/errors |
GET | Find error traces |
/traces/slow |
GET | Find slow traces |
Development
Run Tests
uv run pytest tests/ -v
Run with Coverage
uv run pytest tests/ --cov=otel_mcp --cov-report=term-missing
Lint and Type Check
uv run ruff check src/
uv run mypy src/
Adding a New Backend
- Create
backends/tempo.pyimplementingBaseBackend - Add backend type to
config.py - Update
_create_backend()inserver.pyandapi.py
License
Apache-2.0
Metadata
Release files for otel-mcp 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| otel_mcp-0.1.4.tar.gz | 131.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| otel_mcp-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 149.4 kB
Release files / otel_mcp-0.1.4.tar.gz
| Download URL | otel_mcp-0.1.4.tar.gz |
|---|---|
| Size | 131.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52f8c40ac6e20f772d7e1a192c0c0662435dea19ea8c3ffcb787b20f8667d1b7
|
|
BLAKE2b-256 checksum How to use checksums |
8f04e2d415d73144d96b0cbc5e6003decf3e1e8bffb0d75e6e6c2115c903064d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.
Transparency logRelease files / otel_mcp-0.1.4-py3-none-any.whl
| Download URL | otel_mcp-0.1.4-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
987b6d0795c1b50e9f389bf6553f6cdeb62f241e28a3ae45eee88ef08f09900e
|
|
BLAKE2b-256 checksum How to use checksums |
cdf1f5c7537f846c89cbc66ccafbb5072f6f44b92d53bd3442dc88d7d08adef0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.
Transparency logSecurity for otel-mcp 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for otel_mcp-0.1.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.