@daghis/teamcity-mcp 2.0.7 → 2.1.1
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/.mcp.json +13 -0
- package/CHANGELOG.md +14 -0
- package/CLAUDE.md +59 -0
- package/dist/index.js +357 -23
- package/package.json +6 -15
- package/server.json +2 -2
package/.mcp.json
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.1.1](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.1.0...teamcity-mcp-v2.1.1) (2026-01-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* correct parameter endpoints and add full CRUD for all parameter types ([#358](https://github.com/Daghis/teamcity-mcp/issues/358)) ([79e92ba](https://github.com/Daghis/teamcity-mcp/commit/79e92ba1c1a9642a0253bf9d040c15d0ec072803))
|
|
9
|
+
|
|
10
|
+
## [2.1.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.0.7...teamcity-mcp-v2.1.0) (2026-01-08)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add runtime MCP mode switching with list_changed notifications ([#355](https://github.com/Daghis/teamcity-mcp/issues/355)) ([873ba82](https://github.com/Daghis/teamcity-mcp/commit/873ba82e1329b0bc6271c15ec042093daa92499a))
|
|
16
|
+
|
|
3
17
|
## [2.0.7](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.0.6...teamcity-mcp-v2.0.7) (2026-01-05)
|
|
4
18
|
|
|
5
19
|
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Claude Code Instructions for teamcity-mcp
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
|
|
5
|
+
TeamCity MCP Server - An MCP (Model Context Protocol) server that provides tools for interacting with TeamCity CI/CD.
|
|
6
|
+
|
|
7
|
+
## Development Commands
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run build # Build the project
|
|
11
|
+
npm run lint # Run ESLint
|
|
12
|
+
npm run format # Run Prettier
|
|
13
|
+
npm run check # Run all checks (build, lint, format)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Testing
|
|
17
|
+
|
|
18
|
+
### Unit tests
|
|
19
|
+
```bash
|
|
20
|
+
npm test # Run all unit tests
|
|
21
|
+
npm run test:coverage # Run with coverage report
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Integration tests
|
|
25
|
+
|
|
26
|
+
Requires `TEAMCITY_URL` and `TEAMCITY_TOKEN` in `.env` or environment.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm run test:integration # Run integration tests (some suites skipped)
|
|
30
|
+
SERIAL_BUILD_TESTS=true npm run test:integration # Run ALL integration tests including serial suites
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Serial suites are skipped by default because they need exclusive access to TeamCity resources (queue operations, streaming artifacts). The `SERIAL_BUILD_TESTS=true` flag enables them.
|
|
34
|
+
|
|
35
|
+
## Code Conventions
|
|
36
|
+
|
|
37
|
+
- TypeScript strict mode, no `any`
|
|
38
|
+
- Test code must be at the same quality as production code
|
|
39
|
+
- Use existing logger utilities, avoid `console.log`
|
|
40
|
+
- Follow Conventional Commits for commit messages
|
|
41
|
+
|
|
42
|
+
## Key Patterns
|
|
43
|
+
|
|
44
|
+
### Auto-generated API client
|
|
45
|
+
|
|
46
|
+
The TeamCity API client in `src/teamcity-client/api/` is auto-generated from OpenAPI specs. Method names with numeric suffixes (e.g., `createBuildParameterOfBuildType_1`) differentiate between endpoints with similar operations:
|
|
47
|
+
- Non-suffixed methods often target `/output-parameters`
|
|
48
|
+
- `_1`, `_7`, etc. suffixed methods target `/parameters`
|
|
49
|
+
|
|
50
|
+
Always verify the endpoint path in the generated code when using these methods.
|
|
51
|
+
|
|
52
|
+
### Parameter tools
|
|
53
|
+
|
|
54
|
+
Three parameter sets exist:
|
|
55
|
+
- **Project parameters**: `/projects/{id}/parameters` (supports types)
|
|
56
|
+
- **Build config input parameters**: `/buildTypes/{id}/parameters` (supports types)
|
|
57
|
+
- **Build config output parameters**: `/buildTypes/{id}/output-parameters` (no type support)
|
|
58
|
+
|
|
59
|
+
Type support includes: `password`, `text`, `checkbox`, `select` with spec format in `type.rawValue`.
|
package/dist/index.js
CHANGED
|
@@ -678,9 +678,23 @@ function getConfig() {
|
|
|
678
678
|
function isTest() {
|
|
679
679
|
return false;
|
|
680
680
|
}
|
|
681
|
+
var runtimeMCPMode = null;
|
|
682
|
+
var serverInstance = null;
|
|
681
683
|
function getMCPMode() {
|
|
684
|
+
if (runtimeMCPMode !== null) {
|
|
685
|
+
return runtimeMCPMode;
|
|
686
|
+
}
|
|
682
687
|
return process.env["MCP_MODE"] ?? "dev";
|
|
683
688
|
}
|
|
689
|
+
function setMCPMode(mode) {
|
|
690
|
+
runtimeMCPMode = mode;
|
|
691
|
+
}
|
|
692
|
+
function setServerInstance(server) {
|
|
693
|
+
serverInstance = server;
|
|
694
|
+
}
|
|
695
|
+
function getServerInstance() {
|
|
696
|
+
return serverInstance;
|
|
697
|
+
}
|
|
684
698
|
function getTeamCityUrl() {
|
|
685
699
|
const config2 = getConfig();
|
|
686
700
|
if (!config2.teamcity?.url || config2.teamcity.url.length === 0) {
|
|
@@ -1195,7 +1209,7 @@ function debug2(message, meta) {
|
|
|
1195
1209
|
// package.json
|
|
1196
1210
|
var package_default = {
|
|
1197
1211
|
name: "@daghis/teamcity-mcp",
|
|
1198
|
-
version: "2.
|
|
1212
|
+
version: "2.1.1",
|
|
1199
1213
|
description: "Model Control Protocol server for TeamCity CI/CD integration with AI coding assistants",
|
|
1200
1214
|
mcpName: "io.github.Daghis/teamcity",
|
|
1201
1215
|
main: "dist/index.js",
|
|
@@ -1260,31 +1274,22 @@ var package_default = {
|
|
|
1260
1274
|
},
|
|
1261
1275
|
dependencies: {
|
|
1262
1276
|
"@modelcontextprotocol/sdk": "^1.24.0",
|
|
1263
|
-
ajv: "^8.17.1",
|
|
1264
|
-
"ajv-formats": "^3.0.1",
|
|
1265
1277
|
axios: "^1.13.2",
|
|
1278
|
+
"axios-retry": "^4.5.0",
|
|
1266
1279
|
dotenv: "17.2.3",
|
|
1267
|
-
express: "^5.1.0",
|
|
1268
|
-
inversify: "^7.10.4",
|
|
1269
|
-
morgan: "^1.10.0",
|
|
1270
|
-
"reflect-metadata": "^0.2.2",
|
|
1271
1280
|
tslib: "^2.8.1",
|
|
1272
1281
|
winston: "^3.11.0",
|
|
1273
|
-
zod: "^4.
|
|
1282
|
+
zod: "^4.3.5"
|
|
1274
1283
|
},
|
|
1275
1284
|
devDependencies: {
|
|
1276
1285
|
"@codecov/bundler-plugin-core": "^1.9.1",
|
|
1277
1286
|
"@esbuild-plugins/tsconfig-paths": "^0.1.2",
|
|
1278
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.
|
|
1279
|
-
"@types/ajv": "^1.0.4",
|
|
1280
|
-
"@types/express": "^5.0.5",
|
|
1287
|
+
"@trivago/prettier-plugin-sort-imports": "^6.0.1",
|
|
1281
1288
|
"@types/jest": "^30.0.0",
|
|
1282
1289
|
"@types/js-yaml": "^4.0.9",
|
|
1283
|
-
"@types/morgan": "^1.9.9",
|
|
1284
1290
|
"@types/node": "^25.0.2",
|
|
1285
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
1286
|
-
"@typescript-eslint/parser": "^8.
|
|
1287
|
-
"axios-retry": "^4.5.0",
|
|
1291
|
+
"@typescript-eslint/eslint-plugin": "^8.51.0",
|
|
1292
|
+
"@typescript-eslint/parser": "^8.51.0",
|
|
1288
1293
|
esbuild: "^0.27.0",
|
|
1289
1294
|
eslint: "^9.39.1",
|
|
1290
1295
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -39064,6 +39069,69 @@ var DEV_TOOLS = [
|
|
|
39064
39069
|
};
|
|
39065
39070
|
}
|
|
39066
39071
|
},
|
|
39072
|
+
// === Mode Management Tools ===
|
|
39073
|
+
{
|
|
39074
|
+
name: "get_mcp_mode",
|
|
39075
|
+
description: "Get current MCP mode. Dev mode: read-only tools for safe exploration. Full mode: all tools including admin operations.",
|
|
39076
|
+
inputSchema: {
|
|
39077
|
+
type: "object",
|
|
39078
|
+
properties: {}
|
|
39079
|
+
},
|
|
39080
|
+
handler: async () => {
|
|
39081
|
+
const mode = getMCPMode2();
|
|
39082
|
+
const toolCount = getAvailableTools().length;
|
|
39083
|
+
return {
|
|
39084
|
+
content: [
|
|
39085
|
+
{
|
|
39086
|
+
type: "text",
|
|
39087
|
+
text: JSON.stringify({ mode, toolCount }, null, 2)
|
|
39088
|
+
}
|
|
39089
|
+
]
|
|
39090
|
+
};
|
|
39091
|
+
}
|
|
39092
|
+
},
|
|
39093
|
+
{
|
|
39094
|
+
name: "set_mcp_mode",
|
|
39095
|
+
description: "Switch MCP mode at runtime. Dev mode: safe read-only operations. Full mode: all operations including writes. Clients are notified of tool list changes.",
|
|
39096
|
+
inputSchema: {
|
|
39097
|
+
type: "object",
|
|
39098
|
+
properties: {
|
|
39099
|
+
mode: {
|
|
39100
|
+
type: "string",
|
|
39101
|
+
enum: ["dev", "full"],
|
|
39102
|
+
description: "Target mode: dev (read-only) or full (all operations)"
|
|
39103
|
+
}
|
|
39104
|
+
},
|
|
39105
|
+
required: ["mode"]
|
|
39106
|
+
},
|
|
39107
|
+
handler: async (args) => {
|
|
39108
|
+
const typed = args;
|
|
39109
|
+
const previousMode = getMCPMode2();
|
|
39110
|
+
setMCPMode(typed.mode);
|
|
39111
|
+
const server = getServerInstance();
|
|
39112
|
+
if (server) {
|
|
39113
|
+
await server.sendToolListChanged();
|
|
39114
|
+
}
|
|
39115
|
+
const toolCount = getAvailableTools().length;
|
|
39116
|
+
return {
|
|
39117
|
+
content: [
|
|
39118
|
+
{
|
|
39119
|
+
type: "text",
|
|
39120
|
+
text: JSON.stringify(
|
|
39121
|
+
{
|
|
39122
|
+
previousMode,
|
|
39123
|
+
currentMode: typed.mode,
|
|
39124
|
+
toolCount,
|
|
39125
|
+
message: `Mode switched. ${toolCount} tools now available.`
|
|
39126
|
+
},
|
|
39127
|
+
null,
|
|
39128
|
+
2
|
|
39129
|
+
)
|
|
39130
|
+
}
|
|
39131
|
+
]
|
|
39132
|
+
};
|
|
39133
|
+
}
|
|
39134
|
+
},
|
|
39067
39135
|
// === Project Tools ===
|
|
39068
39136
|
{
|
|
39069
39137
|
name: "list_projects",
|
|
@@ -42571,7 +42639,11 @@ var FULL_MODE_TOOLS = [
|
|
|
42571
42639
|
properties: {
|
|
42572
42640
|
buildTypeId: { type: "string", description: "Build type ID" },
|
|
42573
42641
|
name: { type: "string", description: "Parameter name" },
|
|
42574
|
-
value: { type: "string", description: "Parameter value" }
|
|
42642
|
+
value: { type: "string", description: "Parameter value" },
|
|
42643
|
+
type: {
|
|
42644
|
+
type: "string",
|
|
42645
|
+
description: `Parameter type spec (optional): "password", "text", "checkbox checkedValue='true' uncheckedValue='false'", "select data_1='opt1' data_2='opt2'"`
|
|
42646
|
+
}
|
|
42575
42647
|
},
|
|
42576
42648
|
required: ["buildTypeId", "name", "value"]
|
|
42577
42649
|
},
|
|
@@ -42582,7 +42654,10 @@ var FULL_MODE_TOOLS = [
|
|
|
42582
42654
|
name: typedArgs.name,
|
|
42583
42655
|
value: typedArgs.value
|
|
42584
42656
|
};
|
|
42585
|
-
|
|
42657
|
+
if (typedArgs.type) {
|
|
42658
|
+
parameter.type = { rawValue: typedArgs.type };
|
|
42659
|
+
}
|
|
42660
|
+
await adapter.modules.buildTypes.createBuildParameterOfBuildType_1(
|
|
42586
42661
|
typedArgs.buildTypeId,
|
|
42587
42662
|
void 0,
|
|
42588
42663
|
parameter,
|
|
@@ -42600,6 +42675,262 @@ var FULL_MODE_TOOLS = [
|
|
|
42600
42675
|
{
|
|
42601
42676
|
name: "update_parameter",
|
|
42602
42677
|
description: "Update a build configuration parameter",
|
|
42678
|
+
inputSchema: {
|
|
42679
|
+
type: "object",
|
|
42680
|
+
properties: {
|
|
42681
|
+
buildTypeId: { type: "string", description: "Build type ID" },
|
|
42682
|
+
name: { type: "string", description: "Parameter name" },
|
|
42683
|
+
value: { type: "string", description: "New parameter value" },
|
|
42684
|
+
type: {
|
|
42685
|
+
type: "string",
|
|
42686
|
+
description: `Parameter type spec (optional): "password", "text", "checkbox checkedValue='true' uncheckedValue='false'", "select data_1='opt1' data_2='opt2'"`
|
|
42687
|
+
}
|
|
42688
|
+
},
|
|
42689
|
+
required: ["buildTypeId", "name", "value"]
|
|
42690
|
+
},
|
|
42691
|
+
handler: async (args) => {
|
|
42692
|
+
const typedArgs = args;
|
|
42693
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42694
|
+
const parameter = {
|
|
42695
|
+
name: typedArgs.name,
|
|
42696
|
+
value: typedArgs.value
|
|
42697
|
+
};
|
|
42698
|
+
if (typedArgs.type) {
|
|
42699
|
+
parameter.type = { rawValue: typedArgs.type };
|
|
42700
|
+
}
|
|
42701
|
+
await adapter.modules.buildTypes.updateBuildParameterOfBuildType_7(
|
|
42702
|
+
typedArgs.name,
|
|
42703
|
+
typedArgs.buildTypeId,
|
|
42704
|
+
void 0,
|
|
42705
|
+
parameter,
|
|
42706
|
+
{ headers: { "Content-Type": "application/json", Accept: "application/json" } }
|
|
42707
|
+
);
|
|
42708
|
+
return json({
|
|
42709
|
+
success: true,
|
|
42710
|
+
action: "update_parameter",
|
|
42711
|
+
buildTypeId: typedArgs.buildTypeId,
|
|
42712
|
+
name: typedArgs.name
|
|
42713
|
+
});
|
|
42714
|
+
},
|
|
42715
|
+
mode: "full"
|
|
42716
|
+
},
|
|
42717
|
+
{
|
|
42718
|
+
name: "delete_parameter",
|
|
42719
|
+
description: "Delete a parameter from a build configuration",
|
|
42720
|
+
inputSchema: {
|
|
42721
|
+
type: "object",
|
|
42722
|
+
properties: {
|
|
42723
|
+
buildTypeId: { type: "string", description: "Build type ID" },
|
|
42724
|
+
name: { type: "string", description: "Parameter name" }
|
|
42725
|
+
},
|
|
42726
|
+
required: ["buildTypeId", "name"]
|
|
42727
|
+
},
|
|
42728
|
+
handler: async (args) => {
|
|
42729
|
+
const typedArgs = args;
|
|
42730
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42731
|
+
await adapter.modules.buildTypes.deleteBuildParameterOfBuildType_2(
|
|
42732
|
+
typedArgs.name,
|
|
42733
|
+
typedArgs.buildTypeId
|
|
42734
|
+
);
|
|
42735
|
+
return json({
|
|
42736
|
+
success: true,
|
|
42737
|
+
action: "delete_parameter",
|
|
42738
|
+
buildTypeId: typedArgs.buildTypeId,
|
|
42739
|
+
name: typedArgs.name
|
|
42740
|
+
});
|
|
42741
|
+
},
|
|
42742
|
+
mode: "full"
|
|
42743
|
+
},
|
|
42744
|
+
// === Project Parameter Management ===
|
|
42745
|
+
{
|
|
42746
|
+
name: "list_project_parameters",
|
|
42747
|
+
description: "List parameters for a project",
|
|
42748
|
+
inputSchema: {
|
|
42749
|
+
type: "object",
|
|
42750
|
+
properties: {
|
|
42751
|
+
projectId: { type: "string", description: "Project ID" }
|
|
42752
|
+
},
|
|
42753
|
+
required: ["projectId"]
|
|
42754
|
+
},
|
|
42755
|
+
handler: async (args) => {
|
|
42756
|
+
const typedArgs = args;
|
|
42757
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42758
|
+
const response = await adapter.modules.projects.getBuildParameters(typedArgs.projectId);
|
|
42759
|
+
const parameters = response.data?.property ?? [];
|
|
42760
|
+
return json({
|
|
42761
|
+
parameters,
|
|
42762
|
+
count: parameters.length
|
|
42763
|
+
});
|
|
42764
|
+
}
|
|
42765
|
+
},
|
|
42766
|
+
{
|
|
42767
|
+
name: "add_project_parameter",
|
|
42768
|
+
description: "Add a parameter to a project",
|
|
42769
|
+
inputSchema: {
|
|
42770
|
+
type: "object",
|
|
42771
|
+
properties: {
|
|
42772
|
+
projectId: { type: "string", description: "Project ID" },
|
|
42773
|
+
name: { type: "string", description: "Parameter name" },
|
|
42774
|
+
value: { type: "string", description: "Parameter value" },
|
|
42775
|
+
type: {
|
|
42776
|
+
type: "string",
|
|
42777
|
+
description: `Parameter type spec (optional): "password", "text", "checkbox checkedValue='true' uncheckedValue='false'", "select data_1='opt1' data_2='opt2'"`
|
|
42778
|
+
}
|
|
42779
|
+
},
|
|
42780
|
+
required: ["projectId", "name", "value"]
|
|
42781
|
+
},
|
|
42782
|
+
handler: async (args) => {
|
|
42783
|
+
const typedArgs = args;
|
|
42784
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42785
|
+
const parameter = {
|
|
42786
|
+
name: typedArgs.name,
|
|
42787
|
+
value: typedArgs.value
|
|
42788
|
+
};
|
|
42789
|
+
if (typedArgs.type) {
|
|
42790
|
+
parameter.type = { rawValue: typedArgs.type };
|
|
42791
|
+
}
|
|
42792
|
+
await adapter.modules.projects.createBuildParameter(
|
|
42793
|
+
typedArgs.projectId,
|
|
42794
|
+
void 0,
|
|
42795
|
+
parameter,
|
|
42796
|
+
{
|
|
42797
|
+
headers: { "Content-Type": "application/json", Accept: "application/json" }
|
|
42798
|
+
}
|
|
42799
|
+
);
|
|
42800
|
+
return json({
|
|
42801
|
+
success: true,
|
|
42802
|
+
action: "add_project_parameter",
|
|
42803
|
+
projectId: typedArgs.projectId,
|
|
42804
|
+
name: typedArgs.name
|
|
42805
|
+
});
|
|
42806
|
+
},
|
|
42807
|
+
mode: "full"
|
|
42808
|
+
},
|
|
42809
|
+
{
|
|
42810
|
+
name: "update_project_parameter",
|
|
42811
|
+
description: "Update a project parameter",
|
|
42812
|
+
inputSchema: {
|
|
42813
|
+
type: "object",
|
|
42814
|
+
properties: {
|
|
42815
|
+
projectId: { type: "string", description: "Project ID" },
|
|
42816
|
+
name: { type: "string", description: "Parameter name" },
|
|
42817
|
+
value: { type: "string", description: "New parameter value" },
|
|
42818
|
+
type: {
|
|
42819
|
+
type: "string",
|
|
42820
|
+
description: `Parameter type spec (optional): "password", "text", "checkbox checkedValue='true' uncheckedValue='false'", "select data_1='opt1' data_2='opt2'"`
|
|
42821
|
+
}
|
|
42822
|
+
},
|
|
42823
|
+
required: ["projectId", "name", "value"]
|
|
42824
|
+
},
|
|
42825
|
+
handler: async (args) => {
|
|
42826
|
+
const typedArgs = args;
|
|
42827
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42828
|
+
const parameter = {
|
|
42829
|
+
name: typedArgs.name,
|
|
42830
|
+
value: typedArgs.value
|
|
42831
|
+
};
|
|
42832
|
+
if (typedArgs.type) {
|
|
42833
|
+
parameter.type = { rawValue: typedArgs.type };
|
|
42834
|
+
}
|
|
42835
|
+
await adapter.modules.projects.updateBuildParameter(
|
|
42836
|
+
typedArgs.name,
|
|
42837
|
+
typedArgs.projectId,
|
|
42838
|
+
void 0,
|
|
42839
|
+
parameter,
|
|
42840
|
+
{ headers: { "Content-Type": "application/json", Accept: "application/json" } }
|
|
42841
|
+
);
|
|
42842
|
+
return json({
|
|
42843
|
+
success: true,
|
|
42844
|
+
action: "update_project_parameter",
|
|
42845
|
+
projectId: typedArgs.projectId,
|
|
42846
|
+
name: typedArgs.name
|
|
42847
|
+
});
|
|
42848
|
+
},
|
|
42849
|
+
mode: "full"
|
|
42850
|
+
},
|
|
42851
|
+
{
|
|
42852
|
+
name: "delete_project_parameter",
|
|
42853
|
+
description: "Delete a parameter from a project",
|
|
42854
|
+
inputSchema: {
|
|
42855
|
+
type: "object",
|
|
42856
|
+
properties: {
|
|
42857
|
+
projectId: { type: "string", description: "Project ID" },
|
|
42858
|
+
name: { type: "string", description: "Parameter name" }
|
|
42859
|
+
},
|
|
42860
|
+
required: ["projectId", "name"]
|
|
42861
|
+
},
|
|
42862
|
+
handler: async (args) => {
|
|
42863
|
+
const typedArgs = args;
|
|
42864
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42865
|
+
await adapter.modules.projects.deleteBuildParameter(typedArgs.name, typedArgs.projectId);
|
|
42866
|
+
return json({
|
|
42867
|
+
success: true,
|
|
42868
|
+
action: "delete_project_parameter",
|
|
42869
|
+
projectId: typedArgs.projectId,
|
|
42870
|
+
name: typedArgs.name
|
|
42871
|
+
});
|
|
42872
|
+
},
|
|
42873
|
+
mode: "full"
|
|
42874
|
+
},
|
|
42875
|
+
// === Output Parameter Management ===
|
|
42876
|
+
{
|
|
42877
|
+
name: "list_output_parameters",
|
|
42878
|
+
description: "List output parameters for a build configuration",
|
|
42879
|
+
inputSchema: {
|
|
42880
|
+
type: "object",
|
|
42881
|
+
properties: {
|
|
42882
|
+
buildTypeId: { type: "string", description: "Build type ID" }
|
|
42883
|
+
},
|
|
42884
|
+
required: ["buildTypeId"]
|
|
42885
|
+
},
|
|
42886
|
+
handler: async (args) => {
|
|
42887
|
+
const typedArgs = args;
|
|
42888
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42889
|
+
const buildType = await adapter.getBuildType(typedArgs.buildTypeId);
|
|
42890
|
+
const parameters = buildType["output-parameters"]?.property ?? [];
|
|
42891
|
+
return json({
|
|
42892
|
+
parameters,
|
|
42893
|
+
count: parameters.length
|
|
42894
|
+
});
|
|
42895
|
+
}
|
|
42896
|
+
},
|
|
42897
|
+
{
|
|
42898
|
+
name: "add_output_parameter",
|
|
42899
|
+
description: "Add an output parameter to a build configuration (for build chains)",
|
|
42900
|
+
inputSchema: {
|
|
42901
|
+
type: "object",
|
|
42902
|
+
properties: {
|
|
42903
|
+
buildTypeId: { type: "string", description: "Build type ID" },
|
|
42904
|
+
name: { type: "string", description: "Parameter name" },
|
|
42905
|
+
value: { type: "string", description: "Parameter value" }
|
|
42906
|
+
},
|
|
42907
|
+
required: ["buildTypeId", "name", "value"]
|
|
42908
|
+
},
|
|
42909
|
+
handler: async (args) => {
|
|
42910
|
+
const typedArgs = args;
|
|
42911
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42912
|
+
const parameter = {
|
|
42913
|
+
name: typedArgs.name,
|
|
42914
|
+
value: typedArgs.value
|
|
42915
|
+
};
|
|
42916
|
+
await adapter.modules.buildTypes.createBuildParameterOfBuildType(
|
|
42917
|
+
typedArgs.buildTypeId,
|
|
42918
|
+
void 0,
|
|
42919
|
+
parameter,
|
|
42920
|
+
{ headers: { "Content-Type": "application/json", Accept: "application/json" } }
|
|
42921
|
+
);
|
|
42922
|
+
return json({
|
|
42923
|
+
success: true,
|
|
42924
|
+
action: "add_output_parameter",
|
|
42925
|
+
buildTypeId: typedArgs.buildTypeId,
|
|
42926
|
+
name: typedArgs.name
|
|
42927
|
+
});
|
|
42928
|
+
},
|
|
42929
|
+
mode: "full"
|
|
42930
|
+
},
|
|
42931
|
+
{
|
|
42932
|
+
name: "update_output_parameter",
|
|
42933
|
+
description: "Update an output parameter in a build configuration",
|
|
42603
42934
|
inputSchema: {
|
|
42604
42935
|
type: "object",
|
|
42605
42936
|
properties: {
|
|
@@ -42624,7 +42955,7 @@ var FULL_MODE_TOOLS = [
|
|
|
42624
42955
|
);
|
|
42625
42956
|
return json({
|
|
42626
42957
|
success: true,
|
|
42627
|
-
action: "
|
|
42958
|
+
action: "update_output_parameter",
|
|
42628
42959
|
buildTypeId: typedArgs.buildTypeId,
|
|
42629
42960
|
name: typedArgs.name
|
|
42630
42961
|
});
|
|
@@ -42632,8 +42963,8 @@ var FULL_MODE_TOOLS = [
|
|
|
42632
42963
|
mode: "full"
|
|
42633
42964
|
},
|
|
42634
42965
|
{
|
|
42635
|
-
name: "
|
|
42636
|
-
description: "Delete
|
|
42966
|
+
name: "delete_output_parameter",
|
|
42967
|
+
description: "Delete an output parameter from a build configuration",
|
|
42637
42968
|
inputSchema: {
|
|
42638
42969
|
type: "object",
|
|
42639
42970
|
properties: {
|
|
@@ -42645,13 +42976,13 @@ var FULL_MODE_TOOLS = [
|
|
|
42645
42976
|
handler: async (args) => {
|
|
42646
42977
|
const typedArgs = args;
|
|
42647
42978
|
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42648
|
-
await adapter.modules.buildTypes.
|
|
42979
|
+
await adapter.modules.buildTypes.deleteBuildParameterOfBuildType(
|
|
42649
42980
|
typedArgs.name,
|
|
42650
42981
|
typedArgs.buildTypeId
|
|
42651
42982
|
);
|
|
42652
42983
|
return json({
|
|
42653
42984
|
success: true,
|
|
42654
|
-
action: "
|
|
42985
|
+
action: "delete_output_parameter",
|
|
42655
42986
|
buildTypeId: typedArgs.buildTypeId,
|
|
42656
42987
|
name: typedArgs.name
|
|
42657
42988
|
});
|
|
@@ -43565,7 +43896,9 @@ function createSimpleServer() {
|
|
|
43565
43896
|
},
|
|
43566
43897
|
{
|
|
43567
43898
|
capabilities: {
|
|
43568
|
-
tools: {
|
|
43899
|
+
tools: {
|
|
43900
|
+
listChanged: true
|
|
43901
|
+
},
|
|
43569
43902
|
prompts: void 0,
|
|
43570
43903
|
resources: void 0
|
|
43571
43904
|
}
|
|
@@ -43721,6 +44054,7 @@ async function main() {
|
|
|
43721
44054
|
const transport = new import_stdio.StdioServerTransport();
|
|
43722
44055
|
const lifecycle = startServerLifecycle(server, transport);
|
|
43723
44056
|
activeServer = server;
|
|
44057
|
+
setServerInstance(server);
|
|
43724
44058
|
lifecyclePromise = lifecycle;
|
|
43725
44059
|
process.stderr.write("TeamCity MCP Server is running and ready to accept connections\n");
|
|
43726
44060
|
await lifecycle;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daghis/teamcity-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Model Control Protocol server for TeamCity CI/CD integration with AI coding assistants",
|
|
5
5
|
"mcpName": "io.github.Daghis/teamcity",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -65,31 +65,22 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@modelcontextprotocol/sdk": "^1.24.0",
|
|
68
|
-
"ajv": "^8.17.1",
|
|
69
|
-
"ajv-formats": "^3.0.1",
|
|
70
68
|
"axios": "^1.13.2",
|
|
69
|
+
"axios-retry": "^4.5.0",
|
|
71
70
|
"dotenv": "17.2.3",
|
|
72
|
-
"express": "^5.1.0",
|
|
73
|
-
"inversify": "^7.10.4",
|
|
74
|
-
"morgan": "^1.10.0",
|
|
75
|
-
"reflect-metadata": "^0.2.2",
|
|
76
71
|
"tslib": "^2.8.1",
|
|
77
72
|
"winston": "^3.11.0",
|
|
78
|
-
"zod": "^4.
|
|
73
|
+
"zod": "^4.3.5"
|
|
79
74
|
},
|
|
80
75
|
"devDependencies": {
|
|
81
76
|
"@codecov/bundler-plugin-core": "^1.9.1",
|
|
82
77
|
"@esbuild-plugins/tsconfig-paths": "^0.1.2",
|
|
83
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.
|
|
84
|
-
"@types/ajv": "^1.0.4",
|
|
85
|
-
"@types/express": "^5.0.5",
|
|
78
|
+
"@trivago/prettier-plugin-sort-imports": "^6.0.1",
|
|
86
79
|
"@types/jest": "^30.0.0",
|
|
87
80
|
"@types/js-yaml": "^4.0.9",
|
|
88
|
-
"@types/morgan": "^1.9.9",
|
|
89
81
|
"@types/node": "^25.0.2",
|
|
90
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
91
|
-
"@typescript-eslint/parser": "^8.
|
|
92
|
-
"axios-retry": "^4.5.0",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^8.51.0",
|
|
83
|
+
"@typescript-eslint/parser": "^8.51.0",
|
|
93
84
|
"esbuild": "^0.27.0",
|
|
94
85
|
"eslint": "^9.39.1",
|
|
95
86
|
"eslint-config-prettier": "^10.1.8",
|
package/server.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
9
|
"websiteUrl": "https://github.com/Daghis/teamcity-mcp",
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.1.1",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
15
15
|
"identifier": "@daghis/teamcity-mcp",
|
|
16
|
-
"version": "2.
|
|
16
|
+
"version": "2.1.1",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"runtimeArguments": [
|
|
19
19
|
{
|