@daghis/teamcity-mcp 2.11.0 → 2.12.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/CHANGELOG.md +7 -0
- package/README.md +8 -0
- package/dist/index.js +37 -4
- 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.12.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.11.0...teamcity-mcp-v2.12.0) (2026-05-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **http:** forward TEAMCITY_HEADER_* env vars on every request ([#492](https://github.com/Daghis/teamcity-mcp/issues/492)) ([c406511](https://github.com/Daghis/teamcity-mcp/commit/c4065111e2e8c6e807ec9a4383cbbe8d280ca00e))
|
|
9
|
+
|
|
3
10
|
## [2.11.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.10.0...teamcity-mcp-v2.11.0) (2026-05-03)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -156,6 +156,14 @@ MCP_MODE=dev
|
|
|
156
156
|
# TEAMCITY_KEEP_ALIVE=true
|
|
157
157
|
# TEAMCITY_COMPRESSION=true
|
|
158
158
|
|
|
159
|
+
# Extra headers attached to every TeamCity request — useful when TeamCity
|
|
160
|
+
# sits behind a reverse proxy that gates access on custom headers (e.g.
|
|
161
|
+
# Cloudflare Zero Trust service tokens). One env var per header; the part
|
|
162
|
+
# after `TEAMCITY_HEADER_` is used verbatim as the HTTP header name.
|
|
163
|
+
# Example (note the literal hyphens — most shells need quoting):
|
|
164
|
+
# TEAMCITY_HEADER_CF-Access-Client-Id=<id>
|
|
165
|
+
# TEAMCITY_HEADER_CF-Access-Client-Secret=<secret>
|
|
166
|
+
|
|
159
167
|
# Retry
|
|
160
168
|
# TEAMCITY_RETRY_ENABLED=true
|
|
161
169
|
# TEAMCITY_MAX_RETRIES=3
|
package/dist/index.js
CHANGED
|
@@ -691,6 +691,17 @@ function setServerInstance(server) {
|
|
|
691
691
|
function getServerInstance() {
|
|
692
692
|
return serverInstance;
|
|
693
693
|
}
|
|
694
|
+
var HEADER_ENV_PREFIX = "TEAMCITY_HEADER_";
|
|
695
|
+
function getTeamCityExtraHeaders() {
|
|
696
|
+
const headers = {};
|
|
697
|
+
for (const [key, value] of Object.entries(process.env)) {
|
|
698
|
+
if (!key.startsWith(HEADER_ENV_PREFIX) || value === void 0) continue;
|
|
699
|
+
const headerName = key.slice(HEADER_ENV_PREFIX.length);
|
|
700
|
+
if (headerName === "") continue;
|
|
701
|
+
headers[headerName] = value;
|
|
702
|
+
}
|
|
703
|
+
return Object.keys(headers).length > 0 ? headers : void 0;
|
|
704
|
+
}
|
|
694
705
|
function getTeamCityUrl() {
|
|
695
706
|
const config2 = getConfig();
|
|
696
707
|
if (!config2.teamcity?.url || config2.teamcity.url.length === 0) {
|
|
@@ -1205,7 +1216,7 @@ function debug2(message, meta) {
|
|
|
1205
1216
|
// package.json
|
|
1206
1217
|
var package_default = {
|
|
1207
1218
|
name: "@daghis/teamcity-mcp",
|
|
1208
|
-
version: "2.
|
|
1219
|
+
version: "2.12.0",
|
|
1209
1220
|
description: "Model Control Protocol server for TeamCity CI/CD integration with AI coding assistants",
|
|
1210
1221
|
mcpName: "io.github.Daghis/teamcity",
|
|
1211
1222
|
main: "dist/index.js",
|
|
@@ -38459,6 +38470,7 @@ var TeamCityAPI = class _TeamCityAPI {
|
|
|
38459
38470
|
baseURL: basePath,
|
|
38460
38471
|
timeout,
|
|
38461
38472
|
headers: {
|
|
38473
|
+
...config2.extraHeaders ?? {},
|
|
38462
38474
|
Authorization: `Bearer ${config2.token}`,
|
|
38463
38475
|
Accept: "application/json",
|
|
38464
38476
|
"Content-Type": "application/json"
|
|
@@ -38487,6 +38499,7 @@ var TeamCityAPI = class _TeamCityAPI {
|
|
|
38487
38499
|
baseOptions: {
|
|
38488
38500
|
timeout,
|
|
38489
38501
|
headers: {
|
|
38502
|
+
...config2.extraHeaders ?? {},
|
|
38490
38503
|
Authorization: `Bearer ${config2.token}`,
|
|
38491
38504
|
Accept: "application/json"
|
|
38492
38505
|
}
|
|
@@ -38569,7 +38582,8 @@ var TeamCityAPI = class _TeamCityAPI {
|
|
|
38569
38582
|
if (this.instance == null) {
|
|
38570
38583
|
const envConfig = this.normalizeConfig({
|
|
38571
38584
|
baseUrl: getTeamCityUrl(),
|
|
38572
|
-
token: getTeamCityToken()
|
|
38585
|
+
token: getTeamCityToken(),
|
|
38586
|
+
extraHeaders: getTeamCityExtraHeaders()
|
|
38573
38587
|
});
|
|
38574
38588
|
this.instance = new _TeamCityAPI(envConfig);
|
|
38575
38589
|
this.instanceConfig = envConfig;
|
|
@@ -38800,15 +38814,34 @@ var TeamCityAPI = class _TeamCityAPI {
|
|
|
38800
38814
|
return {
|
|
38801
38815
|
baseUrl: config2.baseUrl.replace(/\/$/, ""),
|
|
38802
38816
|
token: config2.token,
|
|
38803
|
-
timeout: config2.timeout
|
|
38817
|
+
timeout: config2.timeout,
|
|
38818
|
+
extraHeaders: normalizeExtraHeaders(config2.extraHeaders)
|
|
38804
38819
|
};
|
|
38805
38820
|
}
|
|
38806
38821
|
static configsEqual(a, b) {
|
|
38807
38822
|
if (a == null || b == null) {
|
|
38808
38823
|
return false;
|
|
38809
38824
|
}
|
|
38810
|
-
return a.baseUrl === b.baseUrl && a.token === b.token && a.timeout === b.timeout;
|
|
38825
|
+
return a.baseUrl === b.baseUrl && a.token === b.token && a.timeout === b.timeout && extraHeadersEqual(a.extraHeaders, b.extraHeaders);
|
|
38826
|
+
}
|
|
38827
|
+
};
|
|
38828
|
+
var normalizeExtraHeaders = (headers) => {
|
|
38829
|
+
if (headers == null) {
|
|
38830
|
+
return void 0;
|
|
38811
38831
|
}
|
|
38832
|
+
const entries = Object.entries(headers);
|
|
38833
|
+
if (entries.length === 0) {
|
|
38834
|
+
return void 0;
|
|
38835
|
+
}
|
|
38836
|
+
return Object.fromEntries(entries.sort(([a], [b]) => a.localeCompare(b)));
|
|
38837
|
+
};
|
|
38838
|
+
var extraHeadersEqual = (a, b) => {
|
|
38839
|
+
if (a === b) return true;
|
|
38840
|
+
if (a == null || b == null) return a == null && b == null;
|
|
38841
|
+
const keysA = Object.keys(a);
|
|
38842
|
+
const keysB = Object.keys(b);
|
|
38843
|
+
if (keysA.length !== keysB.length) return false;
|
|
38844
|
+
return keysA.every((key) => a[key] === b[key]);
|
|
38812
38845
|
};
|
|
38813
38846
|
|
|
38814
38847
|
// src/tools.ts
|
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.
|
|
10
|
+
"version": "2.12.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.
|
|
16
|
+
"version": "2.12.0",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"runtimeArguments": [
|
|
19
19
|
{
|