@daghis/teamcity-mcp 1.13.1 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.1](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.0.0...teamcity-mcp-v2.0.1) (2025-12-23)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * resolve HTTP 400 when updating artifactRules via update_build_config ([#335](https://github.com/Daghis/teamcity-mcp/issues/335)) ([21614ad](https://github.com/Daghis/teamcity-mcp/commit/21614ad9af4e7a519a0ece0d7c41b90a10f74a73))
9
+
10
+ ## [2.0.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v1.13.1...teamcity-mcp-v2.0.0) (2025-12-22)
11
+
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * 15 tools moved from Dev mode to Full-only mode.
16
+
17
+ ### Features
18
+
19
+ * reduce dev mode tool surface ([#332](https://github.com/Daghis/teamcity-mcp/issues/332)) ([3a2bd6d](https://github.com/Daghis/teamcity-mcp/commit/3a2bd6dd72cc4b2d8c5cca1bb22867b1c7e19d12))
20
+
3
21
  ## [1.13.1](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v1.13.0...teamcity-mcp-v1.13.1) (2025-12-22)
4
22
 
5
23
 
package/README.md CHANGED
@@ -15,7 +15,7 @@ The TeamCity MCP Server allows developers using AI-powered coding assistants (Cl
15
15
 
16
16
  ### 🚀 Two Operational Modes
17
17
 
18
- - **Dev Mode**: Safe CI/CD operations
18
+ - **Dev Mode** (default): Safe CI/CD operations
19
19
  - Trigger builds
20
20
  - Monitor build status and progress
21
21
  - Fetch build logs
@@ -30,6 +30,8 @@ The TeamCity MCP Server allows developers using AI-powered coding assistants (Cl
30
30
  - Set up new projects
31
31
  - Modify infrastructure settings
32
32
 
33
+ See the [Tools Mode Matrix](docs/mcp-tools-mode-matrix.md) for the complete list of 77 tools and their availability by mode.
34
+
33
35
  ### 🎯 Key Capabilities
34
36
 
35
37
  - Trigger and monitor builds, fetch logs, and inspect test failures
@@ -295,9 +297,33 @@ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for deta
295
297
 
296
298
  ## Security
297
299
 
298
- - Configure `TEAMCITY_TOKEN` via environment (see `.env.example`); never commit real tokens
299
- - Token-based authentication only
300
- - Logs redact sensitive values
300
+ ### Token Management
301
+
302
+ - Configure `TEAMCITY_TOKEN` via environment variable or config file (see `.env.example`); never commit real tokens
303
+ - Use a token with minimal required permissions; read-only tokens work for most Dev mode operations
304
+ - Token-based authentication only; the MCP server does not support username/password
305
+ - Logs redact sensitive values including tokens
306
+
307
+ ### Mode Selection
308
+
309
+ - Prefer **Dev mode** unless Full mode is explicitly needed—this limits the blast radius of any misconfiguration or prompt injection
310
+ - Full mode enables destructive operations (project deletion, agent management) that cannot be easily undone
311
+
312
+ ### Network Security
313
+
314
+ - Always use HTTPS for TeamCity connections; the server does not enforce this but strongly recommends it
315
+ - The MCP server connects only to the configured TeamCity URL; no other network calls are made
316
+
317
+ ### AI Assistant Considerations
318
+
319
+ - AI assistants could be manipulated via prompt injection in build logs, test output, or other TeamCity data
320
+ - Dev mode's limited tool set reduces the impact of such attacks
321
+ - All actions appear in TeamCity's audit log under the token's associated user
322
+ - Build logs and test failure details may contain sensitive information (secrets, paths, internal URLs) that become visible to the AI assistant
323
+
324
+ ### Repository Security
325
+
326
+ This repository has GitHub secret scanning and push protection enabled. See [SECURITY.md](SECURITY.md) for vulnerability reporting.
301
327
 
302
328
  ## Support
303
329
 
@@ -309,6 +335,7 @@ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for deta
309
335
  - JetBrains TeamCity for the excellent CI/CD platform
310
336
  - Anthropic for the Model Control Protocol specification
311
337
  - The open-source community for continuous support
338
+ - See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for third-party licenses
312
339
 
313
340
  ---
314
341
 
package/dist/index.js CHANGED
@@ -1195,7 +1195,7 @@ function debug2(message, meta) {
1195
1195
  // package.json
1196
1196
  var package_default = {
1197
1197
  name: "@daghis/teamcity-mcp",
1198
- version: "1.13.1",
1198
+ version: "2.0.1",
1199
1199
  description: "Model Control Protocol server for TeamCity CI/CD integration with AI coding assistants",
1200
1200
  mcpName: "io.github.Daghis/teamcity",
1201
1201
  main: "dist/index.js",
@@ -2327,8 +2327,6 @@ var BuildConfigurationCloneManager = class {
2327
2327
  };
2328
2328
 
2329
2329
  // src/teamcity/build-configuration-update-manager.ts
2330
- var ARTIFACT_RULES_SETTINGS_FIELD = "settings/artifactRules";
2331
- var ARTIFACT_RULES_LEGACY_FIELD = "artifactRules";
2332
2330
  var isArtifactRulesRetryableError = (error3) => {
2333
2331
  if (error3 == null || typeof error3 !== "object") return false;
2334
2332
  if (!("response" in error3)) return false;
@@ -2336,9 +2334,12 @@ var isArtifactRulesRetryableError = (error3) => {
2336
2334
  const status = response?.status;
2337
2335
  return status === 400 || status === 404;
2338
2336
  };
2339
- var setArtifactRulesWithFallback = async (api, buildTypeId, artifactRules) => {
2337
+ var setArtifactRulesWithFallback = async (http, buildTypeId, artifactRules) => {
2338
+ const encodedId = encodeURIComponent(buildTypeId);
2340
2339
  try {
2341
- await api.setBuildTypeField(buildTypeId, ARTIFACT_RULES_SETTINGS_FIELD, artifactRules);
2340
+ await http.put(`/app/rest/buildTypes/${encodedId}/settings/artifactRules`, artifactRules, {
2341
+ headers: { "Content-Type": "text/plain" }
2342
+ });
2342
2343
  } catch (err) {
2343
2344
  if (!isArtifactRulesRetryableError(err)) {
2344
2345
  throw err;
@@ -2349,7 +2350,9 @@ var setArtifactRulesWithFallback = async (api, buildTypeId, artifactRules) => {
2349
2350
  status
2350
2351
  });
2351
2352
  try {
2352
- await api.setBuildTypeField(buildTypeId, ARTIFACT_RULES_LEGACY_FIELD, artifactRules);
2353
+ await http.put(`/app/rest/buildTypes/${encodedId}/artifactRules`, artifactRules, {
2354
+ headers: { "Content-Type": "text/plain" }
2355
+ });
2353
2356
  } catch (fallbackError) {
2354
2357
  debug2("Legacy artifact rules update failed", {
2355
2358
  buildTypeId,
@@ -2569,11 +2572,7 @@ var BuildConfigurationUpdateManager = class {
2569
2572
  if (settings.length > 0) {
2570
2573
  for (const setting of settings) {
2571
2574
  if (setting.name === "artifactRules") {
2572
- await setArtifactRulesWithFallback(
2573
- this.client.modules.buildTypes,
2574
- currentConfig.id,
2575
- setting.value
2576
- );
2575
+ await setArtifactRulesWithFallback(this.client.http, currentConfig.id, setting.value);
2577
2576
  continue;
2578
2577
  }
2579
2578
  await this.client.modules.buildTypes.setBuildTypeField(
@@ -39982,7 +39981,8 @@ var DEV_TOOLS = [
39982
39981
  },
39983
39982
  args
39984
39983
  );
39985
- }
39984
+ },
39985
+ mode: "full"
39986
39986
  },
39987
39987
  {
39988
39988
  name: "get_vcs_root",
@@ -40013,7 +40013,8 @@ var DEV_TOOLS = [
40013
40013
  },
40014
40014
  args
40015
40015
  );
40016
- }
40016
+ },
40017
+ mode: "full"
40017
40018
  },
40018
40019
  {
40019
40020
  name: "set_vcs_root_property",
@@ -40373,7 +40374,8 @@ var DEV_TOOLS = [
40373
40374
  },
40374
40375
  args
40375
40376
  );
40376
- }
40377
+ },
40378
+ mode: "full"
40377
40379
  },
40378
40380
  // === Agent Compatibility (read-only lookups) ===
40379
40381
  {
@@ -40396,7 +40398,8 @@ var DEV_TOOLS = [
40396
40398
  },
40397
40399
  args
40398
40400
  );
40399
- }
40401
+ },
40402
+ mode: "full"
40400
40403
  },
40401
40404
  {
40402
40405
  name: "get_incompatible_build_types_for_agent",
@@ -40418,7 +40421,8 @@ var DEV_TOOLS = [
40418
40421
  },
40419
40422
  args
40420
40423
  );
40421
- }
40424
+ },
40425
+ mode: "full"
40422
40426
  },
40423
40427
  {
40424
40428
  name: "get_agent_enabled_info",
@@ -40440,7 +40444,8 @@ var DEV_TOOLS = [
40440
40444
  },
40441
40445
  args
40442
40446
  );
40443
- }
40447
+ },
40448
+ mode: "full"
40444
40449
  },
40445
40450
  {
40446
40451
  name: "get_compatible_agents_for_build_type",
@@ -40474,7 +40479,8 @@ var DEV_TOOLS = [
40474
40479
  },
40475
40480
  args
40476
40481
  );
40477
- }
40482
+ },
40483
+ mode: "full"
40478
40484
  },
40479
40485
  {
40480
40486
  name: "count_compatible_agents_for_build_type",
@@ -40509,7 +40515,8 @@ var DEV_TOOLS = [
40509
40515
  },
40510
40516
  args
40511
40517
  );
40512
- }
40518
+ },
40519
+ mode: "full"
40513
40520
  },
40514
40521
  {
40515
40522
  name: "get_compatible_agents_for_queued_build",
@@ -40546,7 +40553,8 @@ var DEV_TOOLS = [
40546
40553
  },
40547
40554
  args
40548
40555
  );
40549
- }
40556
+ },
40557
+ mode: "full"
40550
40558
  },
40551
40559
  {
40552
40560
  name: "check_teamcity_connection",
@@ -40556,7 +40564,8 @@ var DEV_TOOLS = [
40556
40564
  const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
40557
40565
  const ok = await adapter.testConnection();
40558
40566
  return json({ ok });
40559
- }
40567
+ },
40568
+ mode: "full"
40560
40569
  },
40561
40570
  // === Agent Tools ===
40562
40571
  {
@@ -40617,7 +40626,8 @@ var DEV_TOOLS = [
40617
40626
  },
40618
40627
  args
40619
40628
  );
40620
- }
40629
+ },
40630
+ mode: "full"
40621
40631
  },
40622
40632
  {
40623
40633
  name: "list_agent_pools",
@@ -40677,7 +40687,8 @@ var DEV_TOOLS = [
40677
40687
  },
40678
40688
  args
40679
40689
  );
40680
- }
40690
+ },
40691
+ mode: "full"
40681
40692
  },
40682
40693
  // === Additional Tools from Complex Implementation ===
40683
40694
  // Build Analysis Tools
@@ -41487,7 +41498,8 @@ var DEV_TOOLS = [
41487
41498
  },
41488
41499
  args
41489
41500
  );
41490
- }
41501
+ },
41502
+ mode: "full"
41491
41503
  },
41492
41504
  {
41493
41505
  name: "list_users",
@@ -41551,7 +41563,8 @@ var DEV_TOOLS = [
41551
41563
  },
41552
41564
  args
41553
41565
  );
41554
- }
41566
+ },
41567
+ mode: "full"
41555
41568
  },
41556
41569
  {
41557
41570
  name: "list_roles",
@@ -41578,7 +41591,8 @@ var DEV_TOOLS = [
41578
41591
  },
41579
41592
  args
41580
41593
  );
41581
- }
41594
+ },
41595
+ mode: "full"
41582
41596
  },
41583
41597
  {
41584
41598
  name: "list_branches",
@@ -42010,7 +42024,7 @@ var FULL_MODE_TOOLS = [
42010
42024
  }
42011
42025
  if (typedArgs.artifactRules !== void 0) {
42012
42026
  await setArtifactRulesWithFallback(
42013
- adapter.modules.buildTypes,
42027
+ adapter.http,
42014
42028
  typedArgs.buildTypeId,
42015
42029
  typedArgs.artifactRules
42016
42030
  );
@@ -42033,7 +42047,7 @@ var FULL_MODE_TOOLS = [
42033
42047
  }
42034
42048
  if (typedArgs.artifactRules !== void 0) {
42035
42049
  await setArtifactRulesWithFallback(
42036
- adapter.modules.buildTypes,
42050
+ adapter.http,
42037
42051
  typedArgs.buildTypeId,
42038
42052
  typedArgs.artifactRules
42039
42053
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daghis/teamcity-mcp",
3
- "version": "1.13.1",
3
+ "version": "2.0.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",
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": "1.13.1",
10
+ "version": "2.0.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": "1.13.1",
16
+ "version": "2.0.1",
17
17
  "runtimeHint": "npx",
18
18
  "runtimeArguments": [
19
19
  {