@daghis/teamcity-mcp 1.0.3 → 1.0.5

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,11 +1,18 @@
1
1
  # Changelog
2
2
 
3
- ## [1.0.3](https://github.com/Daghis/teamcity-mcp/compare/v1.0.2...v1.0.3) (2025-09-12)
3
+ ## [1.0.5](https://github.com/Daghis/teamcity-mcp/compare/v1.0.4...v1.0.5) (2025-09-14)
4
4
 
5
5
 
6
6
  ### Bug Fixes
7
7
 
8
- * trigger 1.0.3 release (no functional change) ([069212a](https://github.com/Daghis/teamcity-mcp/commit/069212a181861b17e7a1d5cfda05b40c2d11e933))
8
+ * delete_parameter: correct endpoint + arg order ([#84](https://github.com/Daghis/teamcity-mcp/issues/84)) ([9832821](https://github.com/Daghis/teamcity-mcp/commit/9832821e65fd945ec5ff0da2b85f744f413e7782))
9
+
10
+ ## [1.0.4](https://github.com/Daghis/teamcity-mcp/compare/v1.0.3...v1.0.4) (2025-09-12)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **health:** accept empty locator; normalize category; fallback on 400 ([#76](https://github.com/Daghis/teamcity-mcp/issues/76)) ([174c8e9](https://github.com/Daghis/teamcity-mcp/commit/174c8e932301b1b2262bfb704a73c4647520d3bf)), closes [#75](https://github.com/Daghis/teamcity-mcp/issues/75)
9
16
 
10
17
  ## [1.0.2](https://github.com/Daghis/teamcity-mcp/compare/v1.0.1...v1.0.2) (2025-09-12)
11
18
 
package/README.md CHANGED
@@ -5,11 +5,11 @@
5
5
  [![codecov](https://codecov.io/gh/Daghis/teamcity-mcp/branch/main/graph/badge.svg)](https://codecov.io/gh/Daghis/teamcity-mcp)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
7
 
8
- A Model Control Protocol (MCP) server that bridges AI coding assistants with JetBrains TeamCity CI/CD server, enabling natural language control of builds, tests, and deployments.
8
+ A Model Control Protocol (MCP) server that bridges AI coding assistants with JetBrains TeamCity CI/CD server, exposing TeamCity operations as MCP tools.
9
9
 
10
10
  ## Overview
11
11
 
12
- The TeamCity MCP Server allows developers using AI-powered coding assistants (Claude Code, Cursor, Windsurf) to interact with TeamCity directly from their development environment using natural language commands.
12
+ The TeamCity MCP Server allows developers using AI-powered coding assistants (Claude Code, Cursor, Windsurf) to interact with TeamCity directly from their development environment via MCP tools.
13
13
 
14
14
  ## Features
15
15
 
@@ -18,7 +18,7 @@ The TeamCity MCP Server allows developers using AI-powered coding assistants (Cl
18
18
  - **Dev Mode**: Safe CI/CD operations
19
19
  - Trigger builds
20
20
  - Monitor build status and progress
21
- - Fetch and analyze build logs
21
+ - Fetch build logs
22
22
  - Investigate test failures
23
23
  - List projects and configurations
24
24
 
@@ -32,13 +32,11 @@ The TeamCity MCP Server allows developers using AI-powered coding assistants (Cl
32
32
 
33
33
  ### 🎯 Key Capabilities
34
34
 
35
- - **Natural Language Control**: Execute CI/CD tasks using conversational commands
36
- - **Intelligent Analysis**: Automatic test failure summarization and build problem identification
37
- - **Real-time Monitoring**: Live build status updates via WebSocket/SSE
38
- - **Enterprise Security**: Token-based authentication with audit logging
39
- - **Modern Architecture**: Simple, direct implementation with singleton pattern
40
- - **Performance Optimized**: Fast startup time with minimal overhead
41
- - **Clean Codebase**: Well-organized modules with clear separation of concerns
35
+ - Trigger and monitor builds, fetch logs, and inspect test failures
36
+ - Token-based authentication to TeamCity; sensitive values redacted in logs
37
+ - Modern architecture: simple, direct implementation with a singleton client
38
+ - Performance-conscious: fast startup with minimal overhead
39
+ - Clean codebase with clear module boundaries
42
40
 
43
41
  ## Installation
44
42
 
@@ -73,7 +71,7 @@ Run the MCP server via npx (requires Node 20.x). Set your TeamCity environment v
73
71
  ```bash
74
72
  # One-off run (inline envs)
75
73
  TEAMCITY_URL="https://teamcity.example.com" \
76
- TEAMCITY_TOKEN="tc_<your_token>" \
74
+ TEAMCITY_TOKEN="<your_token>" \
77
75
  MCP_MODE=dev \
78
76
  npx -y @daghis/teamcity-mcp
79
77
 
package/dist/index.js CHANGED
@@ -1140,7 +1140,7 @@ var BuildConfigurationUpdateManager = class {
1140
1140
  if (updates.removeParameters) {
1141
1141
  for (const paramName of updates.removeParameters) {
1142
1142
  try {
1143
- await this.client.buildTypes.deleteBuildParameterOfBuildType(
1143
+ await this.client.buildTypes.deleteBuildParameterOfBuildType_2(
1144
1144
  paramName,
1145
1145
  currentConfig.id
1146
1146
  );
@@ -25788,18 +25788,59 @@ var DEV_TOOLS = [
25788
25788
  inputSchema: {
25789
25789
  type: "object",
25790
25790
  properties: {
25791
- locator: { type: "string", description: "Optional health item locator filter" }
25791
+ locator: {
25792
+ type: "string",
25793
+ description: "Optional health item locator filter. Omit or empty string fetches all items."
25794
+ }
25792
25795
  }
25793
25796
  },
25794
25797
  handler: async (args) => {
25795
- const schema = import_zod4.z.object({ locator: import_zod4.z.string().min(1).optional() });
25798
+ const schema = import_zod4.z.object({ locator: import_zod4.z.string().optional() });
25796
25799
  return runTool(
25797
25800
  "list_server_health_items",
25798
25801
  schema,
25799
25802
  async (typed) => {
25800
25803
  const api = TeamCityAPI.getInstance();
25801
- const response = await api.health.getHealthItems(typed.locator);
25802
- return json(response.data);
25804
+ const normalized = (() => {
25805
+ const raw = typeof typed.locator === "string" ? typed.locator.trim() : void 0;
25806
+ if (!raw || raw.length === 0) return void 0;
25807
+ return raw.replace(/category:\s*\((ERROR|WARNING|INFO)\)/g, "category:$1");
25808
+ })();
25809
+ try {
25810
+ const response = await api.health.getHealthItems(normalized);
25811
+ return json(response.data);
25812
+ } catch (err) {
25813
+ const isHttp400 = err?.statusCode === 400 || err?.code === "VALIDATION_ERROR";
25814
+ if (!isHttp400) throw err;
25815
+ const all = await api.health.getHealthItems();
25816
+ const rawItems = all.data?.healthItem ?? [];
25817
+ const filter = (item) => {
25818
+ if (!normalized) return true;
25819
+ const clauses = normalized.split(",").map((s) => s.trim()).filter(Boolean);
25820
+ for (const c of clauses) {
25821
+ const [k, v] = c.split(":");
25822
+ if (!k || v === void 0) continue;
25823
+ const key = k.trim();
25824
+ const val = v.trim();
25825
+ if (key === "severity") {
25826
+ if (String(item["severity"] ?? "").toUpperCase() !== val.toUpperCase())
25827
+ return false;
25828
+ } else if (key === "category") {
25829
+ if (String(item["category"] ?? "") !== val) return false;
25830
+ } else if (key === "id") {
25831
+ if (String(item["id"] ?? "") !== val) return false;
25832
+ }
25833
+ }
25834
+ return true;
25835
+ };
25836
+ const items = rawItems.filter(filter);
25837
+ return json({
25838
+ count: items.length,
25839
+ healthItem: items,
25840
+ href: "/app/rest/health",
25841
+ note: "Applied client-side filtering due to TeamCity 400 on locator. Unsupported filters ignored."
25842
+ });
25843
+ }
25803
25844
  },
25804
25845
  args
25805
25846
  );
@@ -26794,7 +26835,7 @@ var FULL_MODE_TOOLS = [
26794
26835
  handler: async (args) => {
26795
26836
  const typedArgs = args;
26796
26837
  const api = TeamCityAPI.getInstance();
26797
- await api.buildTypes.deleteBuildParameterOfBuildType(typedArgs.buildTypeId, typedArgs.name);
26838
+ await api.buildTypes.deleteBuildParameterOfBuildType_2(typedArgs.name, typedArgs.buildTypeId);
26798
26839
  return json({
26799
26840
  success: true,
26800
26841
  action: "delete_parameter",