bamboo-mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +366 -0
- package/dist/bamboo-client.d.ts +71 -0
- package/dist/bamboo-client.js +363 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +44 -0
- package/dist/tools/branches.d.ts +3 -0
- package/dist/tools/branches.js +65 -0
- package/dist/tools/builds.d.ts +3 -0
- package/dist/tools/builds.js +221 -0
- package/dist/tools/deployments.d.ts +3 -0
- package/dist/tools/deployments.js +147 -0
- package/dist/tools/plans.d.ts +3 -0
- package/dist/tools/plans.js +152 -0
- package/dist/tools/projects.d.ts +3 -0
- package/dist/tools/projects.js +64 -0
- package/dist/tools/queue.d.ts +3 -0
- package/dist/tools/queue.js +55 -0
- package/dist/tools/server.d.ts +3 -0
- package/dist/tools/server.js +52 -0
- package/dist/types.d.ts +238 -0
- package/dist/types.js +2 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
# Bamboo MCP Server - CI/CD Operations for Any Prompt
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/bamboo-mcp-server)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://modelcontextprotocol.io/)
|
|
7
|
+
|
|
8
|
+
A Model Context Protocol (MCP) server that brings Atlassian Bamboo CI/CD operations directly into AI assistants like Claude Code and Cursor.
|
|
9
|
+
|
|
10
|
+
## ❌ Without Bamboo MCP
|
|
11
|
+
|
|
12
|
+
Working with Bamboo CI/CD requires constant context switching:
|
|
13
|
+
|
|
14
|
+
- ❌ Switching to browser to check build status
|
|
15
|
+
- ❌ Manually navigating through Bamboo UI to find logs
|
|
16
|
+
- ❌ Copy-pasting build keys and deployment IDs
|
|
17
|
+
- ❌ No AI assistance for CI/CD troubleshooting
|
|
18
|
+
|
|
19
|
+
## ✅ With Bamboo MCP
|
|
20
|
+
|
|
21
|
+
Bamboo MCP brings your CI/CD operations directly into your AI workflow:
|
|
22
|
+
|
|
23
|
+
```txt
|
|
24
|
+
What's the status of the latest build for project MY-PROJECT?
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```txt
|
|
28
|
+
Show me the deployment logs for deployment result 2661941325
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```txt
|
|
32
|
+
Trigger a build for plan PROJ-PLAN with variable ENV=staging
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
No tab-switching, no manual navigation — just ask and get instant CI/CD insights.
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
- **24 tools** covering all major Bamboo operations
|
|
40
|
+
- **Build logs** with actual content (not just URLs)
|
|
41
|
+
- **Deployment logs** with full output
|
|
42
|
+
- **Proxy support** for corporate environments
|
|
43
|
+
- **TypeScript** with full type safety
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
### Prerequisites
|
|
48
|
+
|
|
49
|
+
- Node.js 18+
|
|
50
|
+
- Bamboo personal access token ([how to create](#creating-a-bamboo-token))
|
|
51
|
+
|
|
52
|
+
### From Source
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
git clone https://github.com/norus/atlassian-bamboo-mcp.git
|
|
56
|
+
cd atlassian-bamboo-mcp
|
|
57
|
+
npm install
|
|
58
|
+
npm run build
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### From npm
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install -g bamboo-mcp-server
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Configuration
|
|
68
|
+
|
|
69
|
+
The server requires these environment variables:
|
|
70
|
+
|
|
71
|
+
| Variable | Required | Description |
|
|
72
|
+
|----------|----------|-------------|
|
|
73
|
+
| `BAMBOO_URL` | Yes | Base URL of your Bamboo server |
|
|
74
|
+
| `BAMBOO_TOKEN` | Yes | Personal access token |
|
|
75
|
+
| `BAMBOO_PROXY` | No | Proxy URL (e.g., `http://proxy:8080`) |
|
|
76
|
+
|
|
77
|
+
### Creating a Bamboo Token
|
|
78
|
+
|
|
79
|
+
1. Log into Bamboo
|
|
80
|
+
2. Go to **Profile** → **Personal access tokens**
|
|
81
|
+
3. Click **Create token**
|
|
82
|
+
4. Give it a name and appropriate permissions
|
|
83
|
+
5. Copy the token (you won't see it again)
|
|
84
|
+
|
|
85
|
+
## Setup
|
|
86
|
+
|
|
87
|
+
<details>
|
|
88
|
+
<summary><b>Claude Code</b></summary>
|
|
89
|
+
|
|
90
|
+
Run this command:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
claude mcp add bamboo -- node /path/to/bamboo-mcp-server/dist/index.js
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Or add to `~/.claude/settings.json`:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"mcpServers": {
|
|
101
|
+
"bamboo": {
|
|
102
|
+
"command": "node",
|
|
103
|
+
"args": ["/path/to/bamboo-mcp-server/dist/index.js"],
|
|
104
|
+
"env": {
|
|
105
|
+
"BAMBOO_URL": "https://bamboo.example.com",
|
|
106
|
+
"BAMBOO_TOKEN": "your-token"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
</details>
|
|
114
|
+
|
|
115
|
+
<details>
|
|
116
|
+
<summary><b>Claude Desktop</b></summary>
|
|
117
|
+
|
|
118
|
+
Add to your config file:
|
|
119
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
120
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"mcpServers": {
|
|
125
|
+
"bamboo": {
|
|
126
|
+
"command": "node",
|
|
127
|
+
"args": ["/path/to/bamboo-mcp-server/dist/index.js"],
|
|
128
|
+
"env": {
|
|
129
|
+
"BAMBOO_URL": "https://bamboo.example.com",
|
|
130
|
+
"BAMBOO_TOKEN": "your-token",
|
|
131
|
+
"BAMBOO_PROXY": "http://proxy:8080"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
</details>
|
|
139
|
+
|
|
140
|
+
<details>
|
|
141
|
+
<summary><b>Cursor</b></summary>
|
|
142
|
+
|
|
143
|
+
Add to `~/.cursor/mcp.json`:
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"mcpServers": {
|
|
148
|
+
"bamboo": {
|
|
149
|
+
"command": "node",
|
|
150
|
+
"args": ["/path/to/bamboo-mcp-server/dist/index.js"],
|
|
151
|
+
"env": {
|
|
152
|
+
"BAMBOO_URL": "https://bamboo.example.com",
|
|
153
|
+
"BAMBOO_TOKEN": "your-token"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
</details>
|
|
161
|
+
|
|
162
|
+
<details>
|
|
163
|
+
<summary><b>npx</b></summary>
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
BAMBOO_URL="https://bamboo.example.com" \
|
|
167
|
+
BAMBOO_TOKEN="your-token" \
|
|
168
|
+
npx bamboo-mcp-server
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
</details>
|
|
172
|
+
|
|
173
|
+
<details>
|
|
174
|
+
<summary><b>Docker</b></summary>
|
|
175
|
+
|
|
176
|
+
#### Build the image
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
docker build -t bamboo-mcp-server .
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
#### Run with Docker
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
docker run -i --rm \
|
|
186
|
+
-e BAMBOO_URL="https://bamboo.example.com" \
|
|
187
|
+
-e BAMBOO_TOKEN="your-token" \
|
|
188
|
+
bamboo-mcp-server
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### Use with Claude Desktop
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"mcpServers": {
|
|
196
|
+
"bamboo": {
|
|
197
|
+
"command": "docker",
|
|
198
|
+
"args": [
|
|
199
|
+
"run", "-i", "--rm",
|
|
200
|
+
"-e", "BAMBOO_URL=https://bamboo.example.com",
|
|
201
|
+
"-e", "BAMBOO_TOKEN=your-token",
|
|
202
|
+
"bamboo-mcp-server"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
#### Docker Compose
|
|
210
|
+
|
|
211
|
+
```yaml
|
|
212
|
+
services:
|
|
213
|
+
bamboo-mcp:
|
|
214
|
+
build: .
|
|
215
|
+
environment:
|
|
216
|
+
- BAMBOO_URL=https://bamboo.example.com
|
|
217
|
+
- BAMBOO_TOKEN=${BAMBOO_TOKEN}
|
|
218
|
+
stdin_open: true
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
</details>
|
|
222
|
+
|
|
223
|
+
## Available Tools
|
|
224
|
+
|
|
225
|
+
### Server (2)
|
|
226
|
+
|
|
227
|
+
| Tool | Description |
|
|
228
|
+
|------|-------------|
|
|
229
|
+
| `bamboo_server_info` | Get Bamboo server version and state |
|
|
230
|
+
| `bamboo_health_check` | Check server health status |
|
|
231
|
+
|
|
232
|
+
### Projects (2)
|
|
233
|
+
|
|
234
|
+
| Tool | Description |
|
|
235
|
+
|------|-------------|
|
|
236
|
+
| `bamboo_list_projects` | List all projects |
|
|
237
|
+
| `bamboo_get_project` | Get project details by key |
|
|
238
|
+
|
|
239
|
+
### Plans (5)
|
|
240
|
+
|
|
241
|
+
| Tool | Description |
|
|
242
|
+
|------|-------------|
|
|
243
|
+
| `bamboo_list_plans` | List all build plans |
|
|
244
|
+
| `bamboo_get_plan` | Get plan details by key |
|
|
245
|
+
| `bamboo_search_plans` | Search plans by name |
|
|
246
|
+
| `bamboo_enable_plan` | Enable a build plan |
|
|
247
|
+
| `bamboo_disable_plan` | Disable a build plan |
|
|
248
|
+
|
|
249
|
+
### Branches (2)
|
|
250
|
+
|
|
251
|
+
| Tool | Description |
|
|
252
|
+
|------|-------------|
|
|
253
|
+
| `bamboo_list_plan_branches` | List branches for a plan |
|
|
254
|
+
| `bamboo_get_plan_branch` | Get branch details |
|
|
255
|
+
|
|
256
|
+
### Builds (7)
|
|
257
|
+
|
|
258
|
+
| Tool | Description |
|
|
259
|
+
|------|-------------|
|
|
260
|
+
| `bamboo_trigger_build` | Trigger a build (supports variables) |
|
|
261
|
+
| `bamboo_stop_build` | Stop a running build |
|
|
262
|
+
| `bamboo_get_build_result` | Get specific build result |
|
|
263
|
+
| `bamboo_get_latest_result` | Get latest build result |
|
|
264
|
+
| `bamboo_list_build_results` | List build results with filters |
|
|
265
|
+
| `bamboo_get_build_logs` | Get build log file URLs |
|
|
266
|
+
| `bamboo_get_build_result_logs` | Get build logs with actual content |
|
|
267
|
+
|
|
268
|
+
### Queue (2)
|
|
269
|
+
|
|
270
|
+
| Tool | Description |
|
|
271
|
+
|------|-------------|
|
|
272
|
+
| `bamboo_get_build_queue` | Get current build queue |
|
|
273
|
+
| `bamboo_get_deployment_queue` | Get deployment queue status |
|
|
274
|
+
|
|
275
|
+
### Deployments (5)
|
|
276
|
+
|
|
277
|
+
| Tool | Description |
|
|
278
|
+
|------|-------------|
|
|
279
|
+
| `bamboo_list_deployment_projects` | List deployment projects |
|
|
280
|
+
| `bamboo_get_deployment_project` | Get deployment project details |
|
|
281
|
+
| `bamboo_get_deployment_results` | Get deployment results for environment |
|
|
282
|
+
| `bamboo_get_deployment_result` | Get deployment result with logs |
|
|
283
|
+
| `bamboo_trigger_deployment` | Trigger a deployment |
|
|
284
|
+
|
|
285
|
+
## Example Prompts
|
|
286
|
+
|
|
287
|
+
```txt
|
|
288
|
+
Show me all failed builds in the last 24 hours
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
```txt
|
|
292
|
+
What's blocking the deployment queue?
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
```txt
|
|
296
|
+
Get the logs for build PROJ-PLAN-123 and tell me why it failed
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
```txt
|
|
300
|
+
Trigger a build for MY-PROJECT with variable DEPLOY_ENV=staging
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
```txt
|
|
304
|
+
List all branches for plan MY-PLAN and their build status
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Development
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
# Install dependencies
|
|
311
|
+
npm install
|
|
312
|
+
|
|
313
|
+
# Build
|
|
314
|
+
npm run build
|
|
315
|
+
|
|
316
|
+
# Run locally
|
|
317
|
+
BAMBOO_URL="https://bamboo.example.com" \
|
|
318
|
+
BAMBOO_TOKEN="your-token" \
|
|
319
|
+
node dist/index.js
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
## Troubleshooting
|
|
323
|
+
|
|
324
|
+
<details>
|
|
325
|
+
<summary><b>Connection refused / timeout</b></summary>
|
|
326
|
+
|
|
327
|
+
- Verify `BAMBOO_URL` is correct and accessible
|
|
328
|
+
- If behind a proxy, set `BAMBOO_PROXY`
|
|
329
|
+
- Check if your token has expired
|
|
330
|
+
|
|
331
|
+
</details>
|
|
332
|
+
|
|
333
|
+
<details>
|
|
334
|
+
<summary><b>401 Unauthorized</b></summary>
|
|
335
|
+
|
|
336
|
+
- Verify your `BAMBOO_TOKEN` is correct
|
|
337
|
+
- Ensure the token hasn't expired
|
|
338
|
+
- Check token permissions in Bamboo
|
|
339
|
+
|
|
340
|
+
</details>
|
|
341
|
+
|
|
342
|
+
<details>
|
|
343
|
+
<summary><b>Tool not found in Claude</b></summary>
|
|
344
|
+
|
|
345
|
+
- Restart Claude Code/Desktop after config changes
|
|
346
|
+
- Verify the path to `dist/index.js` is absolute
|
|
347
|
+
- Check Claude's MCP logs for errors
|
|
348
|
+
|
|
349
|
+
</details>
|
|
350
|
+
|
|
351
|
+
## Security
|
|
352
|
+
|
|
353
|
+
- **No hardcoded secrets** — all credentials via environment variables
|
|
354
|
+
- **Input validation** — Zod schemas on all tool inputs
|
|
355
|
+
- **Proxy support** — works in corporate environments
|
|
356
|
+
- **Read-heavy** — most operations are read-only
|
|
357
|
+
|
|
358
|
+
For security issues, please report via GitHub Security tab.
|
|
359
|
+
|
|
360
|
+
## License
|
|
361
|
+
|
|
362
|
+
MIT
|
|
363
|
+
|
|
364
|
+
## Contributing
|
|
365
|
+
|
|
366
|
+
Contributions welcome! Please read our contributing guidelines before submitting PRs.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { BambooClientConfig } from './types.js';
|
|
2
|
+
export declare class BambooClient {
|
|
3
|
+
private baseUrl;
|
|
4
|
+
private token;
|
|
5
|
+
private proxyAgent?;
|
|
6
|
+
constructor(config: BambooClientConfig);
|
|
7
|
+
private request;
|
|
8
|
+
getServerInfo(): Promise<unknown>;
|
|
9
|
+
healthCheck(): Promise<unknown>;
|
|
10
|
+
listProjects(params?: {
|
|
11
|
+
expand?: string;
|
|
12
|
+
startIndex?: number;
|
|
13
|
+
maxResults?: number;
|
|
14
|
+
}): Promise<unknown>;
|
|
15
|
+
getProject(projectKey: string, expand?: string): Promise<unknown>;
|
|
16
|
+
listPlans(params?: {
|
|
17
|
+
expand?: string;
|
|
18
|
+
startIndex?: number;
|
|
19
|
+
maxResults?: number;
|
|
20
|
+
}): Promise<unknown>;
|
|
21
|
+
getPlan(planKey: string, expand?: string): Promise<unknown>;
|
|
22
|
+
searchPlans(name: string, params?: {
|
|
23
|
+
fuzzy?: boolean;
|
|
24
|
+
startIndex?: number;
|
|
25
|
+
maxResults?: number;
|
|
26
|
+
}): Promise<unknown>;
|
|
27
|
+
enablePlan(planKey: string): Promise<unknown>;
|
|
28
|
+
disablePlan(planKey: string): Promise<unknown>;
|
|
29
|
+
listPlanBranches(planKey: string, params?: {
|
|
30
|
+
enabledOnly?: boolean;
|
|
31
|
+
startIndex?: number;
|
|
32
|
+
maxResults?: number;
|
|
33
|
+
}): Promise<unknown>;
|
|
34
|
+
getPlanBranch(planKey: string, branchName: string): Promise<unknown>;
|
|
35
|
+
triggerBuild(planKey: string, params?: {
|
|
36
|
+
stage?: string;
|
|
37
|
+
executeAllStages?: boolean;
|
|
38
|
+
customRevision?: string;
|
|
39
|
+
variables?: Record<string, string>;
|
|
40
|
+
}): Promise<unknown>;
|
|
41
|
+
stopBuild(planKey: string): Promise<unknown>;
|
|
42
|
+
getBuildResult(buildKey: string, expand?: string): Promise<unknown>;
|
|
43
|
+
getLatestBuildResult(planKey: string, expand?: string): Promise<unknown>;
|
|
44
|
+
listBuildResults(params?: {
|
|
45
|
+
projectKey?: string;
|
|
46
|
+
planKey?: string;
|
|
47
|
+
buildState?: string;
|
|
48
|
+
startIndex?: number;
|
|
49
|
+
maxResults?: number;
|
|
50
|
+
expand?: string;
|
|
51
|
+
includeAllStates?: boolean;
|
|
52
|
+
}): Promise<unknown>;
|
|
53
|
+
getBuildLogs(buildKey: string, jobKey?: string): Promise<unknown>;
|
|
54
|
+
getBuildResultWithLogs(buildKey: string, params?: {
|
|
55
|
+
maxLogLines?: number;
|
|
56
|
+
}): Promise<unknown>;
|
|
57
|
+
getBuildQueue(expand?: string): Promise<unknown>;
|
|
58
|
+
getDeploymentQueue(): Promise<unknown>;
|
|
59
|
+
listDeploymentProjects(): Promise<unknown>;
|
|
60
|
+
getDeploymentProject(projectId: string | number): Promise<unknown>;
|
|
61
|
+
triggerDeployment(versionId: string | number, environmentId: string | number): Promise<unknown>;
|
|
62
|
+
getDeploymentResults(environmentId: string | number, params?: {
|
|
63
|
+
startIndex?: number;
|
|
64
|
+
maxResults?: number;
|
|
65
|
+
}): Promise<unknown>;
|
|
66
|
+
getDeploymentResult(deploymentResultId: string | number, params?: {
|
|
67
|
+
includeLogs?: boolean;
|
|
68
|
+
maxLogLines?: number;
|
|
69
|
+
}): Promise<unknown>;
|
|
70
|
+
}
|
|
71
|
+
export declare function createBambooClientFromEnv(): BambooClient;
|