|
1 | | -# jaeger-mcp-server |
2 | | -MCP Server for Jaeger |
| 1 | +# Jaeger MCP Server |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +MCP Server for [Jaeger](https://www.jaegertracing.io/). |
| 8 | + |
| 9 | + |
| 10 | +## Prerequisites |
| 11 | +- Node.js 18+ |
| 12 | + |
| 13 | + |
| 14 | +## Quick Start |
| 15 | + |
| 16 | +This MCP server (using `STDIO` transport) can be added to any MCP Client |
| 17 | +like VS Code, Claude, Cursor, Windsurf Github Copilot via the `jaeger-mcp-server` NPM package. |
| 18 | + |
| 19 | +### VS Code |
| 20 | + |
| 21 | +```json |
| 22 | +{ |
| 23 | + "servers": { |
| 24 | + "jaeger-mcp-server": { |
| 25 | + "command": "npx", |
| 26 | + "args": ["-y", "jaeger-mcp-server"], |
| 27 | + "envFile": "${workspaceFolder}/.env" |
| 28 | + } |
| 29 | + } |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | +### Claude Desktop |
| 34 | +```json |
| 35 | +{ |
| 36 | + "mcpServers": { |
| 37 | + "jaeger-mcp-server": { |
| 38 | + "command": "npx", |
| 39 | + "args": ["-y", "jaeger-mcp-server"], |
| 40 | + "env": { |
| 41 | + "JAEGER_URL": "<YOUR_JAEGER_HTTP_URL>" |
| 42 | + } |
| 43 | + } |
| 44 | + } |
| 45 | +} |
| 46 | +``` |
| 47 | + |
| 48 | + |
| 49 | +## Configuration |
| 50 | + |
| 51 | +### Environment Variables |
| 52 | + |
| 53 | +- `JAEGER_URL`: HTTP URL of the Jaeger instance to access. |
| 54 | +- `JAEGER_AUTHORIZATION_HEADER`: `Authorization` HTTP header to be added into the requests for querying traces over Jaeger API (for ex. `Basic <Basic Auth Header>`) |
| 55 | + |
| 56 | + |
| 57 | +## Components |
| 58 | + |
| 59 | +### Tools |
| 60 | + |
| 61 | +- `get-operations`: Gets the operations as JSON array of object with `name` and `spanKind` properties. |
| 62 | + Supports the following input parameters: |
| 63 | + - `service`: |
| 64 | + - `Mandatory`: `true` |
| 65 | + - `Type`: `string` |
| 66 | + - `Description`: Filters operations by service name |
| 67 | + - `spanKind`: |
| 68 | + - `Mandatory`: `false` |
| 69 | + - `Type`: `string` |
| 70 | + - `Description`: Filters operations by OpenTelemetry span kind (`server`, `client`, `producer`, `consumer`, `internal`) |
| 71 | +- `get-services`: Gets the service names as JSON array of string. |
| 72 | + No input parameter supported. |
| 73 | +- `get-trace`: Gets the spans by the given trace by ID as JSON array of object in the OpenTelemetry resource spans format. |
| 74 | + - `traceId`: |
| 75 | + - `Mandatory`: `true` |
| 76 | + - `Type`: `string` |
| 77 | + - `Description`: Filters spans by OpenTelemetry compatible trace id in 32-character hexadecimal string format |
| 78 | + - `startTime`: |
| 79 | + - `Mandatory`: `false` |
| 80 | + - `Type`: `string` |
| 81 | + - `Description`: The start time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) |
| 82 | + - `endTime`: |
| 83 | + - `Mandatory`: `false` |
| 84 | + - `Type`: `string` |
| 85 | + - `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) |
| 86 | +- `get-traces`: Searches the spans as JSON array of object in the OpenTelemetry resource spans format. |
| 87 | + - `serviceName`: |
| 88 | + - `Mandatory`: `true` |
| 89 | + - `Type`: `string` |
| 90 | + - `Description`: Filters spans by OpenTelemetry compatible trace id in 32-character hexadecimal string format |
| 91 | + - `operationName`: |
| 92 | + - `Mandatory`: `false` |
| 93 | + - `Type`: `string` |
| 94 | + - `Description`: The start time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) |
| 95 | + - `startTimeMin`: |
| 96 | + - `Mandatory`: `true` |
| 97 | + - `Type`: `string` |
| 98 | + - `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) |
| 99 | + - `startTimeMax`: |
| 100 | + - `Mandatory`: `true` |
| 101 | + - `Type`: `string` |
| 102 | + - `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) |
| 103 | + - `durationMin`: |
| 104 | + - `Mandatory`: `false` |
| 105 | + - `Type`: `string` |
| 106 | + - `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) |
| 107 | + - `durationMax`: |
| 108 | + - `Mandatory`: `false` |
| 109 | + - `Type`: `string` |
| 110 | + - `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) |
| 111 | + - `searchDepth`: |
| 112 | + - `Mandatory`: `false` |
| 113 | + - `Type`: `number` |
| 114 | + - `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) |
| 115 | + |
| 116 | +### Resources |
| 117 | + |
| 118 | +N/A |
| 119 | + |
| 120 | + |
| 121 | +## Roadmap |
| 122 | + |
| 123 | +- Migrate to the Jaeger's `gRPC/Protobuf` (Stable) API from `HTTP JSON` (internal) API for better search capabilities. |
| 124 | +- Support more tools which are not directly available over Jaeger API (orchestrating and pipelining multiple API endpoints) |
| 125 | + |
| 126 | + |
| 127 | +## Issues and Feedback |
| 128 | + |
| 129 | +[](https://github.com/serkan-ozal/jaeger-mcp-server/issues?q=is%3Aopen+is%3Aissue) |
| 130 | +[](https://github.com/serkan-ozal/jaeger-mcp-server/issues?q=is%3Aissue+is%3Aclosed) |
| 131 | + |
| 132 | +Please use [GitHub Issues](https://github.com/serkan-ozal/jaeger-mcp-server/issues) for any bug report, feature request and support. |
| 133 | + |
| 134 | + |
| 135 | +## Contribution |
| 136 | + |
| 137 | +[](https://github.com/serkan-ozal/jaeger-mcp-server/pulls?q=is%3Aopen+is%3Apr) |
| 138 | +[](https://github.com/serkan-ozal/jaeger-mcp-server/pulls?q=is%3Apr+is%3Aclosed) |
| 139 | +[]() |
| 140 | + |
| 141 | +If you would like to contribute, please |
| 142 | +- Fork the repository on GitHub and clone your fork. |
| 143 | +- Create a branch for your changes and make your changes on it. |
| 144 | +- Send a pull request by explaining clearly what is your contribution. |
| 145 | + |
| 146 | +> Tip: |
| 147 | +> Please check the existing pull requests for similar contributions and |
| 148 | +> consider submit an issue to discuss the proposed feature before writing code. |
| 149 | +
|
| 150 | +## License |
| 151 | + |
| 152 | +Licensed under [MIT](LICENSE). |
0 commit comments