@daghis/teamcity-mcp 2.0.7 → 2.1.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/.mcp.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "mcpServers": {
3
+ "teamcity-mcp": {
4
+ "type": "stdio",
5
+ "command": "sh",
6
+ "args": [
7
+ "-c",
8
+ "cd /Users/marc/Developer/teamcity-mcp && node dist/index.js"
9
+ ],
10
+ "env": {}
11
+ }
12
+ }
13
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.0.7...teamcity-mcp-v2.1.0) (2026-01-08)
4
+
5
+
6
+ ### Features
7
+
8
+ * 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))
9
+
3
10
  ## [2.0.7](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.0.6...teamcity-mcp-v2.0.7) (2026-01-05)
4
11
 
5
12
 
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.0.7",
1212
+ version: "2.1.0",
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.1.12"
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.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.46.3",
1286
- "@typescript-eslint/parser": "^8.46.3",
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",
@@ -43565,7 +43633,9 @@ function createSimpleServer() {
43565
43633
  },
43566
43634
  {
43567
43635
  capabilities: {
43568
- tools: {},
43636
+ tools: {
43637
+ listChanged: true
43638
+ },
43569
43639
  prompts: void 0,
43570
43640
  resources: void 0
43571
43641
  }
@@ -43721,6 +43791,7 @@ async function main() {
43721
43791
  const transport = new import_stdio.StdioServerTransport();
43722
43792
  const lifecycle = startServerLifecycle(server, transport);
43723
43793
  activeServer = server;
43794
+ setServerInstance(server);
43724
43795
  lifecyclePromise = lifecycle;
43725
43796
  process.stderr.write("TeamCity MCP Server is running and ready to accept connections\n");
43726
43797
  await lifecycle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daghis/teamcity-mcp",
3
- "version": "2.0.7",
3
+ "version": "2.1.0",
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.1.12"
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.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.46.3",
91
- "@typescript-eslint/parser": "^8.46.3",
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.0.7",
10
+ "version": "2.1.0",
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.0.7",
16
+ "version": "2.1.0",
17
17
  "runtimeHint": "npx",
18
18
  "runtimeArguments": [
19
19
  {