OTEL MCP Server
Query and analyze distributed traces from Jaeger, supporting service discovery, trace inspection, performance analysis, and error finding.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OTEL MCP Server show me the slowest traces from the payment service"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OTEL MCP Server
Agentic: An MCP-native observability surface that lets agents query their own execution history.
Human Centric: 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
/docsSelf-Telemetry: The server traces itself to Jaeger for debugging
Related MCP server: poly-observability-mcp
Installation
Using uvx (Recommended)
Run directly without installing:
# Run MCP server
uvx otel-mcp
# Run REST API
uvx --from otel-mcp otel-mcp-apiUsing pip
pip install otel-mcp
# Then run
otel-mcp # MCP server
otel-mcp-api # REST APIFrom Source
git clone https://github.com/ryanm101/otel-mcp.git
cd otel-mcp
uv sync
uv run otel-mcpQuick Start
1. Start Jaeger
docker-compose up -d
# Jaeger UI at http://localhost:166862. Run the MCP Server
uvx otel-mcp
# Or with environment variables:
JAEGER_URL=http://jaeger:16686 uvx otel-mcp3. Or Run the REST API
uvx --from otel-mcp otel-mcp-api
# OpenAPI docs at http://localhost:8000/docsMCP 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
# Self-telemetry (optional)
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=otel-mcp
# OTEL_SDK_DISABLED=true # Disable self-telemetryMCP Tools
Service Discovery
Tool | Description |
| List all services in Jaeger |
| List operations for a service |
Trace Inspection
Tool | Description |
| Search traces with filters (service, operation, duration, errors) |
| Get complete trace by ID with all spans |
| Find traces containing errors |
Performance Analysis
Tool | Description |
| Find slowest traces |
| Get latency percentiles (p50/p95/p99) and error rates |
REST API Endpoints
Endpoint | Method | Description |
| GET | Health check |
| GET | List services |
| GET | List operations |
| GET | Search traces |
| GET | Get trace by ID |
| GET | Find error traces |
| GET | Find slow traces |
Development
Run Tests
uv run pytest tests/ -vRun with Coverage
uv run pytest tests/ --cov=otel_mcp --cov-report=term-missingLint and Type Check
uv run ruff check src/
uv run mypy src/Adding a New Backend
Create
backends/tempo.pyimplementingBaseBackendAdd backend type to
config.pyUpdate
_create_backend()inserver.pyandapi.py
License
Apache-2.0
Available Tools
7 toolsfind_errorsB
Find traces containing errors.
Args: service_name: Service name (required for Jaeger) start_time: Start time in ISO 8601 format end_time: End time in ISO 8601 format limit: Maximum error traces to return (default: 20)
Returns: JSON string with error traces and error details
Inputs: service_name (required), limit, end_time, start_time. Returns: result
get_operation_statsB
Get performance statistics for a service or operation.
Args: service_name: Service name (required for Jaeger) operation_name: Filter by specific operation start_time: Start time in ISO 8601 format end_time: End time in ISO 8601 format
Returns: JSON string with latency percentiles and error rates
Inputs: service_name (required), end_time, start_time, operation_name. Returns: result
get_slow_tracesA
Find slowest traces for a service.
Args: service_name: Service name (required for Jaeger) operation_name: Filter by operation name min_duration_ms: Minimum duration threshold (default: 1000ms) limit: Maximum traces to return (default: 10)
Returns: JSON string with slowest traces sorted by duration
Inputs: service_name (required), limit, operation_name, min_duration_ms. Returns: result
get_traceB
Get complete trace details by ID.
Args: trace_id: Trace identifier
Returns: JSON string with full trace data including all spans
Inputs: trace_id (required). Returns: result
list_operationsC
List all operations for a specific service.
Args: service_name: Name of the service
Returns: JSON string with list of operations
Inputs: service_name (required). Returns: result
list_servicesB
List all available services in Jaeger.
Returns: JSON string with list of services
Inputs: no named parameters. Returns: result
search_tracesB
Search for traces with filters.
Args: service_name: Service name (required for Jaeger) operation_name: Filter by operation name start_time: Start time in ISO 8601 format end_time: End time in ISO 8601 format min_duration_ms: Minimum trace duration in milliseconds max_duration_ms: Maximum trace duration in milliseconds has_error: Filter traces with errors limit: Maximum traces to return (default: 20, max: 100)
Returns: JSON string with trace summaries
Inputs: service_name (required), limit, end_time, has_error, +4 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
find_errors and search_traces with has_error overlap significantly, as do get_slow_traces and search_traces with duration filters. While get_trace, get_operation_stats, list_services, and list_operations are clearly distinct, the overlapping search/filter tools could cause misselection.
All tool names follow a consistent verb_noun pattern (get_, find_, list_, search_). The convention is predictable and readable throughout.
Seven tools are well-scoped for an observability server covering trace retrieval, error finding, performance analysis, and service discovery. Each tool appears to earn its place without excessive overlap or missing essentials.
The surface covers the full trace lifecycle: discovery (list_services, list_operations), retrieval (get_trace, search_traces), error analysis (find_errors), and performance stats (get_operation_stats, get_slow_traces). No obvious gaps for a read-only OTEL/Jaeger server.
Maintenance
Related MCP Connectors
Cloud hosted Okahu MCP server that helps you manage genAI trace data
MCP observability. Query live traffic, errors, duration, and alerts from your AI agent.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides read-only access to Jaeger distributed tracing data through the Model Context Protocol. Enables Claude and other MCP-capable agents to search traces, inspect spans, and analyze service dependencies directly within conversations.1557 PyPI2MIT
- AlicenseNot gradedqualityDmaintenanceUnified MCP server for observability and monitoring, providing tools to query metrics, logs, and traces through Prometheus, Grafana, Loki, and Jaeger.2Mozilla Public 2.0
- AlicenseAqualityDmaintenanceEnables querying logs, traces, and metrics from multiple OpenObserve instances via MCP tools, with parallel execution, batching, and caching.643 npm11MIT
- AlicenseNot gradedqualityDmaintenanceEnables to interact with Jaeger distributed tracing system through the MCP protocol. Supports querying traces, services, and operations via natural language.91 npm19MIT