SuperAPI AI Directory

jaeger-mcp

Query Jaeger distributed tracing: list services and operations, search and fetch traces, and view service dependencies.

Open website

About this tool

jaeger-mcp is an MCP server for Jaeger distributed tracing, designed to let Claude or other AI agents that support MCP read tracing data without leaving the conversation. It communicates via the standard Model Context Protocol (stdio) and is compatible with Claude Desktop, Claude Code, Cursor, and any MCP client. All 15 tools are marked read-only (readOnlyHint: true) and do not modify tracing data. Output uses two channels: structured JSON (structuredContent) for programmatic use, and Markdown (content) for human reading. Error messages clearly indicate the environment variables that need to be fixed and suggest the next step. It supports Bearer Token, HTTP Basic authentication, or no authentication (common in internal deployments). The project includes an OpenAPI specification document (openapi.yaml) documenting the underlying Jaeger Query API.

Main capabilities:

  • jaeger_list_services: Lists all service names known to Jaeger, with an output limit of 500 services, and indicates truncation when exceeded.
  • jaeger_list_operations: Returns all operation names for the specified service (such as HTTP route names, gRPC method names), used to discover valid operation names before searching.
  • jaeger_search_traces: The main search tool, supporting filtering by service (required), operation, tags (JSON string, such as {"http.status_code":"500"}), time range (microseconds UTC), minimum/maximum duration (such as "100ms", "1.5s"), and limit count (default 20, maximum 1500). Returns trace summaries, including trace_id, duration_us, span_count, service_count, root_operation, errors_count.
  • jaeger_get_trace: Retrieves full trace details, accepts trace_id (16-32 hex character string), and returns all spans and their tags, service names, parent-child relationships, per-service statistics (span count, total duration, error count), and execution tree (each node lists child span IDs). ErrorsError spans are identified by tags["error"] = "true".
  • jaeger_get_dependencies: Returns the service topology graph, including directed edges (parent→child) and call_count, and the time window can be controlled via lookback_hours (default 24, maximum 720).
  • jaeger_compare_traces: Compares the structural differences between two traces, matches spans by (operationName, serviceName, parentOperation), and reports additions, removals, changes (duration or tag differences), and the number unchanged.
  • jaeger_span_statistics: Aggregates spans by operation name, calculates latency percentiles (p50, p95, p99) and error rates, and fetches up to 100 traces (default 20).
  • jaeger_critical_path: Identifies the longest-duration span chain from root to leaf in a trace (the critical path), and sorts spans by self-time to find performance bottlenecks.
  • jaeger_compare_windows: Compares the aggregated tracing behavior of a service across two time periods, detects performance regressions or improvements, and provides a per-operation difference summary, deviation score, latency percentile changes, and error rate changes.
  • jaeger_detect_anomalies: Scans recent traces of a service, compares them against a historical baseline, detects statistically significant latency spikes or error rate increases, and flags anomalous operations, severity (low to critical), and z-scores.

How to use: It can be run after installation, or used directly with uvx without installation. All configuration is done through environment variables; copy .env.example to .env and fill in the values. In Claude Desktop / Claude Code, add the configuration to the MCP configuration file (claude_desktop_config.json or .claude/mcp.json). After configuration, you can ask Claude questions, for example: "Which services does Jaeger know about?", "Find traces with HTTP 500 errors for order-service in the last hour", "Show the slowest traces for GET /checkout (over 2 seconds)", "What is the cause of the error in trace abcdef1234567890?", "Map the services for the last 7 daysdependency graph", "which services call postgres most frequently?", "compare traces abc123 and def456—which spans changed?", "what is the p95 latency for each operation in order-service?".

In addition, jaeger-mcp can also be used as a Python library in-process, without an MCP server. Available methods include: get_trace(), search_traces(), list_services(), get_dependencies(), compare_traces(), span_statistics(), critical_path(), compare_windows(), detect_anomalies(), predict_degradation(), forecast_capacity(), find_test_traces(), regression_diff(), test_profile(). Domain objects include Span, Trace, TraceSummary, ServiceDep, TraceComparison, SpanIdentity, SpanChange, SpanStatisticsResult, OperationStatResult, CriticalPathOutput, CriticalPathSpan, BottleneckSpan, WindowComparisonOutput, OperationDiff, AnomalyDetectionOutput, OperationAnomaly, all of which have typed fields.

API documentation: The project includes a comprehensive OpenAPI specification in the docs/ directory: Jaeger Query Service API (openapi.yaml) documents the actual Jaeger API endpoints; MCP Tools API (docs/mcp-tools-openapi.yaml) documents MCP tools as conceptual HTTP endpoints. These specifications help in understanding the underlying API calls of each tool, developing alternative integrations, debugging API interactions, generating client libraries or documentation. See docs/README.md for details.

Performance characteristics: All tools use a singlepersistent requests.Session with connection pooling enabled. The session sets trust_env = False to bypass environment proxies (Jaeger is usually an internal service). Requests time out after 30 seconds (configurable via JAEGER_TIMEOUT). Transient HTTP errors (429/5xx) are retried using exponential backoff (configurable via JAEGER_RETRY_ATTEMPTS). list_services and list_operations responses are cached for 120 seconds (configurable via JAEGER_CACHE_TTL). jaeger_search_traces passes limit directly to Jaeger—avoid requesting more traces than needed. jaeger_get_trace fetches the complete trace in one call—large traces (thousands of spans) may be slow. jaeger_get_dependencies aggregates over the full lookback window; on busy clusters, large windows may be slow.

Use cases: Suitable for development, operations, and debugging scenarios that require quickly querying Jaeger trace data, especially suitable for directly performing trace analysis in AI conversations, locating performance bottlenecks, sorting out service dependencies, comparing performance before and after deployment, anomaly detection, etc.

Limitations: All tools are read-only and cannot modify trace data. Some operations (such as fetching large traces, large-window dependency aggregation) may be slow. Service list output is capped at 500. Search limit is a maximum of 1500 traces. Statistical tools fetch at most 100 traces. Dependency lookback window is a maximum of 720 hours. A Jaeger instance must be accessible, and authentication must be configured correctly.