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.
@@ -0,0 +1,52 @@
1
+ export function registerServerTools(server, client) {
2
+ // Get server info
3
+ server.tool('bamboo_server_info', 'Get Bamboo server information including version, edition, and state', {}, async () => {
4
+ try {
5
+ const info = await client.getServerInfo();
6
+ return {
7
+ content: [
8
+ {
9
+ type: 'text',
10
+ text: JSON.stringify(info, null, 2),
11
+ },
12
+ ],
13
+ };
14
+ }
15
+ catch (error) {
16
+ return {
17
+ content: [
18
+ {
19
+ type: 'text',
20
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`,
21
+ },
22
+ ],
23
+ isError: true,
24
+ };
25
+ }
26
+ });
27
+ // Health check
28
+ server.tool('bamboo_health_check', 'Check Bamboo server health status', {}, async () => {
29
+ try {
30
+ const health = await client.healthCheck();
31
+ return {
32
+ content: [
33
+ {
34
+ type: 'text',
35
+ text: JSON.stringify(health, null, 2),
36
+ },
37
+ ],
38
+ };
39
+ }
40
+ catch (error) {
41
+ return {
42
+ content: [
43
+ {
44
+ type: 'text',
45
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`,
46
+ },
47
+ ],
48
+ isError: true,
49
+ };
50
+ }
51
+ });
52
+ }
@@ -0,0 +1,238 @@
1
+ export interface BambooServerInfo {
2
+ version: string;
3
+ edition: string;
4
+ buildDate: string;
5
+ buildNumber: string;
6
+ state: string;
7
+ }
8
+ export interface BambooHealthCheck {
9
+ status: string;
10
+ checks?: Record<string, {
11
+ status: string;
12
+ message?: string;
13
+ }>;
14
+ }
15
+ export interface BambooProject {
16
+ key: string;
17
+ name: string;
18
+ description?: string;
19
+ link: {
20
+ href: string;
21
+ rel: string;
22
+ };
23
+ }
24
+ export interface BambooProjectList {
25
+ projects: {
26
+ size: number;
27
+ 'start-index': number;
28
+ 'max-result': number;
29
+ project: BambooProject[];
30
+ };
31
+ }
32
+ export interface BambooPlan {
33
+ key: string;
34
+ name: string;
35
+ shortName: string;
36
+ shortKey: string;
37
+ type: string;
38
+ enabled: boolean;
39
+ link: {
40
+ href: string;
41
+ rel: string;
42
+ };
43
+ projectKey?: string;
44
+ projectName?: string;
45
+ description?: string;
46
+ isBuilding?: boolean;
47
+ isActive?: boolean;
48
+ averageBuildTimeInSeconds?: number;
49
+ }
50
+ export interface BambooPlanList {
51
+ plans: {
52
+ size: number;
53
+ 'start-index': number;
54
+ 'max-result': number;
55
+ plan: BambooPlan[];
56
+ };
57
+ }
58
+ export interface BambooPlanBranch {
59
+ key: string;
60
+ name: string;
61
+ shortName: string;
62
+ shortKey: string;
63
+ enabled: boolean;
64
+ link: {
65
+ href: string;
66
+ rel: string;
67
+ };
68
+ }
69
+ export interface BambooPlanBranchList {
70
+ branches: {
71
+ size: number;
72
+ 'start-index': number;
73
+ 'max-result': number;
74
+ branch: BambooPlanBranch[];
75
+ };
76
+ }
77
+ export interface BambooBuildResult {
78
+ key: string;
79
+ buildNumber: number;
80
+ buildState: string;
81
+ buildResultKey: string;
82
+ lifeCycleState: string;
83
+ state: string;
84
+ successful: boolean;
85
+ finished: boolean;
86
+ buildStartedTime?: string;
87
+ buildCompletedTime?: string;
88
+ buildDurationInSeconds?: number;
89
+ buildRelativeTime?: string;
90
+ buildReason?: string;
91
+ reasonSummary?: string;
92
+ link: {
93
+ href: string;
94
+ rel: string;
95
+ };
96
+ plan?: {
97
+ key: string;
98
+ name: string;
99
+ shortName: string;
100
+ };
101
+ vcsRevisionKey?: string;
102
+ changes?: {
103
+ size: number;
104
+ change?: Array<{
105
+ changesetId: string;
106
+ author: string;
107
+ date: string;
108
+ comment: string;
109
+ }>;
110
+ };
111
+ artifacts?: {
112
+ size: number;
113
+ artifact?: Array<{
114
+ name: string;
115
+ link: {
116
+ href: string;
117
+ };
118
+ }>;
119
+ };
120
+ testResults?: {
121
+ all: number;
122
+ successful: number;
123
+ failed: number;
124
+ skipped: number;
125
+ quarantined: number;
126
+ };
127
+ }
128
+ export interface BambooBuildResultList {
129
+ results: {
130
+ size: number;
131
+ 'start-index': number;
132
+ 'max-result': number;
133
+ result: BambooBuildResult[];
134
+ };
135
+ }
136
+ export interface BambooBuildQueue {
137
+ queuedBuilds: {
138
+ size: number;
139
+ 'start-index': number;
140
+ 'max-result': number;
141
+ queuedBuild?: Array<{
142
+ triggerReason: string;
143
+ buildNumber: number;
144
+ planKey: string;
145
+ buildResultKey: string;
146
+ link: {
147
+ href: string;
148
+ };
149
+ }>;
150
+ };
151
+ }
152
+ export interface BambooDeploymentQueue {
153
+ queuedDeployments: {
154
+ size: number;
155
+ 'start-index': number;
156
+ 'max-result': number;
157
+ queuedDeployment?: Array<{
158
+ deploymentResultId: number;
159
+ deploymentVersionName: string;
160
+ environmentId: number;
161
+ environmentName: string;
162
+ }>;
163
+ };
164
+ }
165
+ export interface BambooDeploymentProject {
166
+ id: number;
167
+ oid: string;
168
+ key: {
169
+ key: string;
170
+ };
171
+ name: string;
172
+ description?: string;
173
+ planKey: {
174
+ key: string;
175
+ };
176
+ environments: Array<{
177
+ id: number;
178
+ key: {
179
+ key: string;
180
+ };
181
+ name: string;
182
+ description?: string;
183
+ deploymentProjectId: number;
184
+ }>;
185
+ }
186
+ export interface BambooDeploymentProjectList {
187
+ size: number;
188
+ 'start-index': number;
189
+ 'max-result': number;
190
+ deploymentProject?: BambooDeploymentProject[];
191
+ }
192
+ export interface BambooDeploymentResult {
193
+ deploymentVersion: {
194
+ id: number;
195
+ name: string;
196
+ creationDate: string;
197
+ };
198
+ deploymentVersionName: string;
199
+ id: number;
200
+ deploymentState: string;
201
+ lifeCycleState: string;
202
+ startedDate?: string;
203
+ finishedDate?: string;
204
+ reasonSummary?: string;
205
+ key: {
206
+ key: string;
207
+ };
208
+ environment?: {
209
+ id: number;
210
+ key: {
211
+ key: string;
212
+ };
213
+ name: string;
214
+ };
215
+ }
216
+ export interface BambooDeploymentResultList {
217
+ results: {
218
+ size: number;
219
+ 'start-index': number;
220
+ 'max-result': number;
221
+ result: BambooDeploymentResult[];
222
+ };
223
+ }
224
+ export interface BambooTriggerResponse {
225
+ buildNumber: number;
226
+ buildResultKey: string;
227
+ planKey: string;
228
+ link: {
229
+ href: string;
230
+ rel: string;
231
+ };
232
+ triggerReason?: string;
233
+ }
234
+ export interface BambooClientConfig {
235
+ baseUrl: string;
236
+ token: string;
237
+ proxyUrl?: string;
238
+ }
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ // Bamboo API Response Types
2
+ export {};
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "bamboo-mcp-server",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Atlassian Bamboo",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "bamboo-mcp-server": "dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "start": "node dist/index.js",
13
+ "dev": "tsc --watch",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "bamboo",
19
+ "atlassian",
20
+ "ci-cd",
21
+ "model-context-protocol",
22
+ "claude",
23
+ "ai"
24
+ ],
25
+ "author": "norus",
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/norus/atlassian-bamboo-mcp.git"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/norus/atlassian-bamboo-mcp/issues"
33
+ },
34
+ "homepage": "https://github.com/norus/atlassian-bamboo-mcp#readme",
35
+ "files": [
36
+ "dist",
37
+ "README.md",
38
+ "LICENSE"
39
+ ],
40
+ "dependencies": {
41
+ "@modelcontextprotocol/sdk": "^1.0.0",
42
+ "undici": "^6.0.0",
43
+ "zod": "^3.22.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^20.0.0",
47
+ "typescript": "^5.3.0"
48
+ },
49
+ "engines": {
50
+ "node": ">=18.0.0"
51
+ }
52
+ }