
Jaeger Mcp
io.github.mshegolev由 GitHub 帳號 mshegolev 發布v0.1.1更新於 Oct 24, 2026
Jaeger MCP — search traces, inspect spans, map service dependencies (read-only).
概覽
以唯讀方式存取 Jaeger 分散式追蹤:搜尋追蹤、檢視 span、比較追蹤並繪製服務相依關係。
- 可以做什麼
- 將助理連接到 Jaeger 查詢服務,並提供 15 個唯讀工具。它可以列出服務與操作,依服務、操作、標籤、時間範圍與時長等條件搜尋追蹤,並取得包含 span 樹的完整追蹤細節。它也能計算各操作的延遲與錯誤統計、關鍵路徑、服務相依圖、追蹤比較、時間區間比較、異常偵測、效能退化預測、容量預測,以及將測試執行關聯到其追蹤。
- 適用情境
- 適合在偵錯分散式系統的延遲或錯誤時使用,讓追蹤資料直接出現在對話中,不必切換到 Jaeger 介面。也適用於部署後的效能回歸檢查、服務相依關係查詢,以及把測試執行與其追蹤對應起來。
- 執行需求
- 需要本機 Python 執行環境;可從 PyPI 安裝 jaeger-mcp,或以 uvx 直接執行。需要 JAEGER_URL 指向 Jaeger 查詢服務。選用變數包括 JAEGER_TOKEN、JAEGER_USERNAME、JAEGER_PASSWORD、JAEGER_SSL_VERIFY、JAEGER_TIMEOUT、JAEGER_RETRY_ATTEMPTS 與 JAEGER_CACHE_TTL。需要能連線到 Jaeger 端點的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Jaeger Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
jaeger-mcp
[PyPI version] [Python versions] [License: MIT] [Tests]
MCP server for Jaeger distributed tracing. Give Claude (or any MCP-capable agent) read access to your trace data — search traces, inspect spans, compare traces, compute span statistics, map service dependencies, predict performance issues, and forecast capacity needs — without leaving the conversation.
Why another Jaeger MCP?
The existing Jaeger integrations require a running UI or custom scripts. This server:
- Speaks the standard Model Context Protocol over stdio — works with Claude Desktop, Claude Code, Cursor, and any MCP client.
- Is read-only: all 15 tools carry
readOnlyHint: true— zero risk of modifying trace data. - Returns dual-channel output: structured JSON (
structuredContent) for programmatic use + Markdown (content) for human-readable display. - Has actionable error messages that name the exact env var to fix and suggest a next step.
- Supports Bearer token, HTTP Basic auth, or no auth (common for internal deployments).
- Includes OpenAPI specification documenting the underlying Jaeger Query API (
openapi.yaml).
Tools
Compatibility
Tested against live Jaeger v1.76 (classic /api/* query API) and v2.22 (OTLP-based). Jaeger v2.22 no
longer serves /api/services, /api/services/{service}/operations and the /api/traces search; this
server automatically falls back to /api/v3/* when the v1 endpoint returns 404 and converts the result
back, so all tools work on both. /api/dependencies and /api/traces/{id} are still used where available.
The mcp dependency is pinned <2 (the 2.x SDK renamed FastMCP to MCPServer).
Installation
Or run directly without installing:
Configuration
All configuration is via environment variables:
Copy .env.example to .env and fill in your values.
Claude Desktop / Claude Code setup
Add to your MCP config (claude_desktop_config.json or .claude/mcp.json):
Or with uvx (no install required):
Docker
Example queries
Once configured, ask Claude:
- "What services does Jaeger know about?"
- "Find traces with HTTP 500 errors in
order-servicefrom the last hour" - "Show me the slowest traces (over 2 seconds) for
GET /checkout" - "What caused the error in trace
abcdef1234567890?" - "Map the service dependency graph for the last 7 days"
- "Which services call
postgresmost frequently?" - "Compare trace
abc123against tracedef456— what spans changed?" - "What are the p95 latencies per operation in
order-service?"
Tool usage guide
jaeger_list_services
Returns all service names Jaeger has seen. Start here when you don't know which services are instrumented. Output is capped at 500 services with a truncation hint.
jaeger_list_operations
Returns all operation names for a given service (e.g. HTTP route names, gRPC method names). Use to discover valid operation names before filtering jaeger_search_traces.
jaeger_search_traces
The main search tool. Filters:
service(required) — service name fromjaeger_list_servicesoperation— narrow to a specific endpointtags— JSON string of tag filters, e.g.{"http.status_code":"500"}or{"error":"true"}start/end— time range in microseconds UTCmin_duration/max_duration— duration strings like"100ms","1.5s","2m"limit— default 20, max 1500
Returns trace summaries with trace_id, duration_us, span_count, service_count, root_operation, errors_count.
jaeger_get_trace
Full trace detail. Accepts a trace_id (hex string, 16-32 chars) and returns:
- All spans with tags, service names, parent/child relationships
- Per-service statistics (span count, total duration, error count)
- Execution tree (each node lists its child span IDs)
Error spans are identified by tags["error"] = "true".
jaeger_get_dependencies
Service topology graph. Returns directed edges (parent → child) with call_count. Use lookback_hours (default 24, max 720) to control the window.
jaeger_compare_traces
Structural diff between two traces. Accepts two trace_id hex strings and matches spans by (operationName, serviceName, parentOperation) — not span ID. Reports:
- Added spans — present in trace B but not trace A
- Removed spans — present in trace A but not trace B
- Changed spans — matched but differ in duration or tags (shows deltas)
- Unchanged count — number of identical spans
Use to compare a slow trace against a fast one, or to see what changed between deployments.
jaeger_span_statistics
Per-operation latency percentiles and error rates. Fetches up to limit traces (default 20, max 100) for a service and aggregates all spans by operation name. Reports per operation:
count— total spans observedp50_duration_us,p95_duration_us,p99_duration_us— latency percentileserror_count,error_rate— errors (identified bytags["error"] = "true")
Use to find the slowest or most error-prone operations in a service.
jaeger_critical_path
Identifies the longest-duration span chain from root to leaf in a trace (the critical path) and ranks spans by self-time to find performance bottlenecks.
Reports:
- Critical path spans with operation, service, duration, and percentage-of-total
- Bottleneck spans ranked by exclusive duration (self-time)
Use to answer "Why is this trace so slow?" and "Which operations consume the most CPU/self-time?"
jaeger_compare_windows
Compares aggregate trace behavior between two time periods for a service to detect performance regressions or improvements across deployments.
Reports:
- Per-operation diff summary showing added, removed, faster, slower operations
- Deviation scoring with numeric scores per operation and overall
- Latency percentile changes (p50, p95) and error rate deltas
Use to answer "Did our latest deployment affect performance?" and "Which operations got slower after the database upgrade?"
jaeger_detect_anomalies
Scans for statistically significant latency spikes or error-rate increases in a service's recent traces compared to historical baselines.
Reports:
- Flagged operations with anomaly type (latency or error_rate)
- Severity classification (low to critical) with z-scores
- Current vs baseline values for affected metrics
Use to proactively identify performance degradations and reliability issues before they impact users.
Library facade (in-process use)
jaeger-mcp can also be used as a Python library without an MCP server:
Available methods: 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: Span, Trace, TraceSummary, ServiceDep, TraceComparison, SpanIdentity, SpanChange, SpanStatisticsResult, OperationStatResult, CriticalPathOutput, CriticalPathSpan, BottleneckSpan, WindowComparisonOutput, OperationDiff, AnomalyDetectionOutput, OperationAnomaly — all with typed fields.
API Documentation
This project includes comprehensive OpenAPI specifications 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 the MCP tools as conceptual HTTP endpoints
These specifications are useful for:
- Understanding the underlying API calls made by each tool
- Developing alternative integrations
- Debugging API interactions
- Generating client libraries or documentation
See docs/README.md for more details on both specifications.
Performance characteristics
- All tools use a single persistent
requests.Sessionwith connection pooling. - The session has
trust_env = Falseto bypass environment proxies (Jaeger is typically an internal service). - Requests time out after 30 seconds (configurable via
JAEGER_TIMEOUT). - Transient HTTP errors (429/5xx) are retried with exponential backoff (configurable via
JAEGER_RETRY_ATTEMPTS). list_servicesandlist_operationsresponses are cached for 120 seconds (configurable viaJAEGER_CACHE_TTL).jaeger_search_tracespasseslimitdirectly to Jaeger — avoid requesting more traces than needed.jaeger_get_tracefetches the full trace in one call — large traces (thousands of spans) may be slow.jaeger_get_dependenciesaggregates over the full lookback window; large windows may be slow on busy clusters.
Development
License
MIT — see LICENSE.
來源:README.md,提交 e8e71a1
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分


