@daghis/teamcity-mcp 2.1.0 → 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/CHANGELOG.md +7 -0
- package/CLAUDE.md +59 -0
- package/dist/index.js +271 -8
- package/package.json +1 -1
- package/server.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
|
|
3
10
|
## [2.1.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.0.7...teamcity-mcp-v2.1.0) (2026-01-08)
|
|
4
11
|
|
|
5
12
|
|
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
|
@@ -1209,7 +1209,7 @@ function debug2(message, meta) {
|
|
|
1209
1209
|
// package.json
|
|
1210
1210
|
var package_default = {
|
|
1211
1211
|
name: "@daghis/teamcity-mcp",
|
|
1212
|
-
version: "2.1.
|
|
1212
|
+
version: "2.1.1",
|
|
1213
1213
|
description: "Model Control Protocol server for TeamCity CI/CD integration with AI coding assistants",
|
|
1214
1214
|
mcpName: "io.github.Daghis/teamcity",
|
|
1215
1215
|
main: "dist/index.js",
|
|
@@ -42639,7 +42639,11 @@ var FULL_MODE_TOOLS = [
|
|
|
42639
42639
|
properties: {
|
|
42640
42640
|
buildTypeId: { type: "string", description: "Build type ID" },
|
|
42641
42641
|
name: { type: "string", description: "Parameter name" },
|
|
42642
|
-
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
|
+
}
|
|
42643
42647
|
},
|
|
42644
42648
|
required: ["buildTypeId", "name", "value"]
|
|
42645
42649
|
},
|
|
@@ -42650,7 +42654,10 @@ var FULL_MODE_TOOLS = [
|
|
|
42650
42654
|
name: typedArgs.name,
|
|
42651
42655
|
value: typedArgs.value
|
|
42652
42656
|
};
|
|
42653
|
-
|
|
42657
|
+
if (typedArgs.type) {
|
|
42658
|
+
parameter.type = { rawValue: typedArgs.type };
|
|
42659
|
+
}
|
|
42660
|
+
await adapter.modules.buildTypes.createBuildParameterOfBuildType_1(
|
|
42654
42661
|
typedArgs.buildTypeId,
|
|
42655
42662
|
void 0,
|
|
42656
42663
|
parameter,
|
|
@@ -42668,6 +42675,262 @@ var FULL_MODE_TOOLS = [
|
|
|
42668
42675
|
{
|
|
42669
42676
|
name: "update_parameter",
|
|
42670
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",
|
|
42671
42934
|
inputSchema: {
|
|
42672
42935
|
type: "object",
|
|
42673
42936
|
properties: {
|
|
@@ -42692,7 +42955,7 @@ var FULL_MODE_TOOLS = [
|
|
|
42692
42955
|
);
|
|
42693
42956
|
return json({
|
|
42694
42957
|
success: true,
|
|
42695
|
-
action: "
|
|
42958
|
+
action: "update_output_parameter",
|
|
42696
42959
|
buildTypeId: typedArgs.buildTypeId,
|
|
42697
42960
|
name: typedArgs.name
|
|
42698
42961
|
});
|
|
@@ -42700,8 +42963,8 @@ var FULL_MODE_TOOLS = [
|
|
|
42700
42963
|
mode: "full"
|
|
42701
42964
|
},
|
|
42702
42965
|
{
|
|
42703
|
-
name: "
|
|
42704
|
-
description: "Delete
|
|
42966
|
+
name: "delete_output_parameter",
|
|
42967
|
+
description: "Delete an output parameter from a build configuration",
|
|
42705
42968
|
inputSchema: {
|
|
42706
42969
|
type: "object",
|
|
42707
42970
|
properties: {
|
|
@@ -42713,13 +42976,13 @@ var FULL_MODE_TOOLS = [
|
|
|
42713
42976
|
handler: async (args) => {
|
|
42714
42977
|
const typedArgs = args;
|
|
42715
42978
|
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
42716
|
-
await adapter.modules.buildTypes.
|
|
42979
|
+
await adapter.modules.buildTypes.deleteBuildParameterOfBuildType(
|
|
42717
42980
|
typedArgs.name,
|
|
42718
42981
|
typedArgs.buildTypeId
|
|
42719
42982
|
);
|
|
42720
42983
|
return json({
|
|
42721
42984
|
success: true,
|
|
42722
|
-
action: "
|
|
42985
|
+
action: "delete_output_parameter",
|
|
42723
42986
|
buildTypeId: typedArgs.buildTypeId,
|
|
42724
42987
|
name: typedArgs.name
|
|
42725
42988
|
});
|
package/package.json
CHANGED
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.1.
|
|
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.1.
|
|
16
|
+
"version": "2.1.1",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"runtimeArguments": [
|
|
19
19
|
{
|