|
| 1 | +# jaeger_mcp |
| 2 | + |
| 3 | +This extension implements a Model Context Protocol (MCP) server for Jaeger, enabling LLM-based assistants to query and analyze distributed traces efficiently. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The MCP server provides a structured way for AI agents to interact with Jaeger's trace data using progressive disclosure: |
| 8 | +- **Search** → Find traces matching specific criteria |
| 9 | +- **Map** → Visualize trace structure without loading full attribute data |
| 10 | +- **Diagnose** → Identify critical execution paths that contributed to latency or errors |
| 11 | +- **Inspect** → Load full details only for specific, suspicious spans |
| 12 | + |
| 13 | +This approach prevents context-window exhaustion in LLMs and enables more efficient trace analysis. |
| 14 | + |
| 15 | +**Note:** The current implementation uses Streamable HTTP transport only. MCP stdio transport is not supported. |
| 16 | + |
| 17 | +## Status |
| 18 | + |
| 19 | +✅ **Phase 1: Foundation (Complete)** - Extension scaffold, lifecycle management, and MCP SDK integration |
| 20 | + |
| 21 | +Future phases will add: |
| 22 | +- Phase 2: Basic MCP tools (search, span details, errors) |
| 23 | +- Phase 3: Advanced tools (topology, critical path) |
| 24 | +- Phase 4: Documentation and observability |
| 25 | + |
| 26 | +See [ADR-002](../../../../docs/adr/002-mcp-server.md) for full design details. |
| 27 | + |
| 28 | +## Configuration |
| 29 | + |
| 30 | +```yaml |
| 31 | +extensions: |
| 32 | + jaeger_mcp: |
| 33 | + # HTTP endpoint for MCP protocol (Streamable HTTP transport) |
| 34 | + http: |
| 35 | + endpoint: "0.0.0.0:16687" |
| 36 | + |
| 37 | + # Server identification for MCP protocol |
| 38 | + server_name: "jaeger" |
| 39 | + # server_version will default to the build version |
| 40 | + |
| 41 | + # Limits |
| 42 | + max_span_details_per_request: 20 |
| 43 | + max_search_results: 100 |
| 44 | +``` |
| 45 | +
|
| 46 | +## Dependencies |
| 47 | +
|
| 48 | +This extension depends on the [jaeger_query](../jaegerquery/) extension to access trace data. The `jaeger_query` extension must be configured in the service extensions list. |
| 49 | + |
| 50 | +## Development Status |
| 51 | + |
| 52 | +Phase 1 implements: |
| 53 | +- ✅ Extension directory structure |
| 54 | +- ✅ Configuration validation |
| 55 | +- ✅ Factory implementation |
| 56 | +- ✅ Server lifecycle management |
| 57 | +- ✅ MCP SDK integration |
| 58 | +- ✅ Streamable HTTP transport |
| 59 | +- ✅ Basic health tool (placeholder for Phase 2) |
0 commit comments