Skip to content

Commit 54baa89

Browse files
authored
Initial Jaeger MCP server implementation (#1)
1 parent bdc3740 commit 54baa89

File tree

18 files changed

+7028
-2
lines changed

18 files changed

+7028
-2
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: NPM Build
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- "master"
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v4
15+
- name: Set up NodeJS
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "18"
19+
cache: "npm"
20+
- name: NPM Install
21+
run: npm install
22+
- name: NPM Lint
23+
run: npm run lint:check
24+
- name: NPM Build
25+
run: npm run build

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: NPM Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version_scale:
7+
type: choice
8+
description: "Version scale"
9+
required: true
10+
default: "patch"
11+
options:
12+
- patch
13+
- minor
14+
- major
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
token: ${{ secrets.GH_ACCESS_TOKEN }}
23+
- name: Configure Git User
24+
run: |
25+
git config --global user.email "[email protected]"
26+
git config --global user.name "GitHub Action"
27+
- name: Setup NodeJS
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: "18"
31+
registry-url: https://registry.npmjs.org
32+
- name: NPM Install
33+
run: npm install
34+
- name: NPM Lint Check
35+
run: npm run lint:check
36+
- name: NPM Build
37+
run: npm run build
38+
- name: NPM Publish
39+
run: npm run release:${{ github.event.inputs.version_scale }}
40+
env:
41+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
42+
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 4,
4+
"semi": true,
5+
"singleQuote": true
6+
}

README.md

Lines changed: 152 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,152 @@
1-
# jaeger-mcp-server
2-
MCP Server for Jaeger
1+
# Jaeger MCP Server
2+
3+
![Build Status](https://github.com/serkan-ozal/jaeger-mcp-server/actions/workflows/build.yml/badge.svg)
4+
![NPM Version](https://badge.fury.io/js/jaeger-mcp-server.svg)
5+
![License](https://img.shields.io/badge/license-MIT-blue)
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+
[![Issues](https://img.shields.io/github/issues/serkan-ozal/jaeger-mcp-server.svg)](https://github.com/serkan-ozal/jaeger-mcp-server/issues?q=is%3Aopen+is%3Aissue)
130+
[![Closed issues](https://img.shields.io/github/issues-closed/serkan-ozal/jaeger-mcp-server.svg)](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+
[![Pull requests](https://img.shields.io/github/issues-pr/serkan-ozal/jaeger-mcp-server.svg)](https://github.com/serkan-ozal/jaeger-mcp-server/pulls?q=is%3Aopen+is%3Apr)
138+
[![Closed pull requests](https://img.shields.io/github/issues-pr-closed/serkan-ozal/jaeger-mcp-server.svg)](https://github.com/serkan-ozal/jaeger-mcp-server/pulls?q=is%3Apr+is%3Aclosed)
139+
[![Contributors](https://img.shields.io/github/contributors/serkan-ozal/jaeger-mcp-server.svg)]()
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

Comments
 (0)