@qase/mcp-server 2.2.0 → 2.2.2
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 +20 -0
- package/README.md +14 -1
- package/build/client/index.d.ts.map +1 -1
- package/build/client/index.js +47 -4
- package/build/client/index.js.map +1 -1
- package/build/transports/sse.d.ts.map +1 -1
- package/build/transports/sse.js +16 -2
- package/build/transports/sse.js.map +1 -1
- package/build/transports/streamableHttp.d.ts.map +1 -1
- package/build/transports/streamableHttp.js +37 -2
- package/build/transports/streamableHttp.js.map +1 -1
- package/build/utils/integration-context.d.ts +24 -0
- package/build/utils/integration-context.d.ts.map +1 -0
- package/build/utils/integration-context.js +29 -0
- package/build/utils/integration-context.js.map +1 -0
- package/build/utils/integration-marker.d.ts +43 -0
- package/build/utils/integration-marker.d.ts.map +1 -0
- package/build/utils/integration-marker.js +58 -0
- package/build/utils/integration-marker.js.map +1 -0
- package/build/utils/test-helpers.d.ts.map +1 -1
- package/build/utils/test-helpers.js +1 -0
- package/build/utils/test-helpers.js.map +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/docs/connect.md +6 -1
- package/docs/self-run.md +43 -1
- package/docs/troubleshooting.md +31 -4
- package/package.json +5 -2
- package/server.json +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.2.2]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Integration marker** — a product built on top of this server (a plugin, an agent, a wrapper CLI) can identify itself, and the server forwards that identity to the Qase API as `X-MCP-Integration-Name` / `X-MCP-Integration-Version`. This is a third identity axis, independent of the two already on the wire: the `User-Agent` says which deployment of the server is running (`qase-mcp` vs `qase-mcp-hosted`), `X-MCP-Client-*` says which AI host is connected — neither can carry it, since the same integration runs on any host, on either deployment. Set `QASE_MCP_INTEGRATION=<name>/<version>` (version optional); over HTTP transports the marker can instead travel per request, as an `X-Qase-Integration` header or `?integration=` on the MCP endpoint (captured when the session is created, then remembered for it). Precedence: request header → session value → env var. The name must be on the allowlist in `src/utils/integration-marker.ts`, which bounds the cardinality of the analytics dimension — anything unlisted, malformed or oversized is dropped silently and the API call still succeeds. Nothing is sent when no marker is supplied, so existing setups are byte-for-byte unaffected on the wire. For integration authors only; see [docs/self-run.md](docs/self-run.md#integration-marker-for-integration-authors).
|
|
13
|
+
|
|
14
|
+
### Security
|
|
15
|
+
|
|
16
|
+
- Raised the dev-dependency `overrides` to clear all open Dependabot alerts: `js-yaml` to 3.15.1 / 4.3.1 (quadratic-CPU DoS in merge-key and `!!omap` handling), `@babel/core` to ^7.29.6 (arbitrary file read via a `sourceMappingURL` comment), and `yaml` to ^2.8.3 (stack overflow on deeply nested collections). All four are development-only and reached the tree through eslint, jest and lint-staged — `npm audit --omit=dev` already reported zero, so nothing shipped to consumers of the package was affected. Note that the previous `js-yaml@3` override pinned 3.14.2, which was itself vulnerable.
|
|
17
|
+
|
|
18
|
+
## [2.2.1]
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Requests were attributed to the SDK instead of the MCP server.** The `User-Agent` was set as an axios instance default, but `qase-api-client` puts its own `qase-api-client-js/<version>` into `Configuration.baseOptions`, and the generated code merges those headers over the instance defaults. Every call made through the SDK — which is all of them except the `qase_api` escape hatch — therefore reached Qase as `qase-api-client-js/1.1.14`, so neither the MCP source nor the split between self-run (`qase-mcp`) and hosted (`qase-mcp-hosted`) was visible in metrics. The header is now set in a request interceptor, which runs after that merge, and is covered by tests that assert what a real HTTP server receives.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **`QASE_API_PROTOCOL`** — the scheme used to reach `QASE_API_DOMAIN`, defaulting to `https`. Requests were previously hardcoded to HTTPS, so a self-hosted or on-premise Qase API served over plain HTTP could not be reached at all: `QASE_API_DOMAIN` takes a bare domain and rejects anything carrying a scheme. Only `http` and `https` are recognised (case-insensitive, with or without a trailing `://`); any other value falls back to `https`, so a typo cannot silently downgrade the connection. Existing setups are unaffected. See [docs/self-run.md](docs/self-run.md#self-hosted-deployments-over-plain-http).
|
|
27
|
+
|
|
8
28
|
## [2.2.0]
|
|
9
29
|
|
|
10
30
|
### Changed
|
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ Official [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server
|
|
|
13
13
|
- [Quick Start](#quick-start)
|
|
14
14
|
- [Use the hosted Qase MCP (recommended)](#use-the-hosted-qase-mcp-recommended)
|
|
15
15
|
- [Run it yourself](#run-it-yourself)
|
|
16
|
+
- [Building on top of this server](#building-on-top-of-this-server)
|
|
16
17
|
- [Upgrading from v1](#upgrading-from-v1)
|
|
17
18
|
- [Tools](#tools)
|
|
18
19
|
- [Documentation](#documentation)
|
|
@@ -55,7 +56,7 @@ See [Tools](#tools) and [docs/tools.md](docs/tools.md) for the full reference.
|
|
|
55
56
|
|
|
56
57
|
No install, no API token — connect to the Qase-hosted server and sign in with your Qase account.
|
|
57
58
|
|
|
58
|
-
> **Note:** The hosted Qase MCP
|
|
59
|
+
> **Note:** The hosted Qase MCP requires the **Enterprise** plan *and* a workspace on Qase's main cloud (`qase.io`). On another plan, or on a dedicated instance, [run the server yourself](#run-it-yourself) with your own API token — that works everywhere.
|
|
59
60
|
|
|
60
61
|
- **Claude** — open **Settings → Connectors**, find **Qase Test Management**, click **Connect**.
|
|
61
62
|
- **Cursor** — add `{"mcpServers": {"qase": {"url": "https://mcp.qase.io/mcp"}}}` to `.cursor/mcp.json`.
|
|
@@ -75,6 +76,18 @@ export QASE_API_TOKEN=your_api_token_here
|
|
|
75
76
|
|
|
76
77
|
Then point your MCP client's stdio config at the `@qase/mcp-server` binary. Full install options, client configs (Claude Desktop, Cursor, Claude Code, Codex, OpenCode), environment variables, and transports (stdio/SSE/streamable-HTTP): **[docs/self-run.md](docs/self-run.md)**.
|
|
77
78
|
|
|
79
|
+
## Building on top of this server
|
|
80
|
+
|
|
81
|
+
For **integration authors** only — if you use the server directly, nothing here applies to you.
|
|
82
|
+
|
|
83
|
+
If your product drives this server (a plugin, an agent, a wrapper CLI), it can identify itself so its usage is attributable in Qase analytics, independently of which AI host is connected:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
QASE_MCP_INTEGRATION=quality-supervisor/1.4.0 # <name>/<version>, version optional
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The name must be on the allowlist in [`src/utils/integration-marker.ts`](src/utils/integration-marker.ts) — add yours in a PR. Anything unlisted or malformed is ignored, and the API call still succeeds. HTTP transports also accept the marker per request (`X-Qase-Integration` header or `?integration=`). Details: **[docs/self-run.md](docs/self-run.md#integration-marker-for-integration-authors)**.
|
|
90
|
+
|
|
78
91
|
## Upgrading from v1
|
|
79
92
|
|
|
80
93
|
v2 consolidated 83 v1 tools into **29 task-oriented tools** (30 total, including a discovery tool), and has since grown to 36 (37 total). Tool names and response shapes have changed. See **[docs/migration.md](docs/migration.md)** for the complete tool mapping table, response format changes, and before/after examples.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,OAAO,EACP,UAAU,EACV,QAAQ,EACR,aAAa,EACb,UAAU,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,UAAU,EACV,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,OAAO,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C,cAAc,EAAE,iBAAiB,CAAC;IAC3C,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,gBAAgB,EAAE,mBAAmB,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAE7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;gBAElC,MAAM,EAAE,eAAe,EAAE,aAAa,CAAC,EAAE,aAAa;IAgGlE;;OAEG;IACG,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,CAAC;CAoBnF;AA8CD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,IAAI,aAAa,CAY5C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/build/client/index.js
CHANGED
|
@@ -14,6 +14,8 @@ import { isJwt } from '../auth/token-type.js';
|
|
|
14
14
|
import FormData from 'form-data';
|
|
15
15
|
import { requestTokenStorage, getEffectiveToken } from '../utils/auth-context.js';
|
|
16
16
|
import { getServer } from '../utils/server-context.js';
|
|
17
|
+
import { getIntegration } from '../utils/integration-context.js';
|
|
18
|
+
import { parseIntegrationMarker } from '../utils/integration-marker.js';
|
|
17
19
|
import { VERSION } from '../version.js';
|
|
18
20
|
/**
|
|
19
21
|
* Build the User-Agent / source string sent to the Qase API. Qase uses this to
|
|
@@ -55,9 +57,18 @@ class QaseApiClient {
|
|
|
55
57
|
this.host = config.host;
|
|
56
58
|
const jwtToken = isJwt(config.token);
|
|
57
59
|
const agent = createKeepAliveAgent({ maxSockets: 20 });
|
|
58
|
-
this.axiosInstance =
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
this.axiosInstance = axiosInstance ?? axios.create({ httpsAgent: agent });
|
|
61
|
+
// The generated SDK puts its own `User-Agent: qase-api-client-js/x.y.z` into
|
|
62
|
+
// Configuration.baseOptions, and the generator merges those headers over the
|
|
63
|
+
// axios instance defaults — so setting the source as a default silently loses
|
|
64
|
+
// to it on every SDK call, leaving only the qase_api escape hatch correctly
|
|
65
|
+
// attributed. A request interceptor runs after that merge, so it is the one
|
|
66
|
+
// place the header can be asserted for both paths.
|
|
67
|
+
this.axiosInstance.interceptors.request.use((req) => {
|
|
68
|
+
req.headers = req.headers ?? {};
|
|
69
|
+
req.headers['User-Agent'] = getUserAgent();
|
|
70
|
+
return req;
|
|
71
|
+
});
|
|
61
72
|
// For JWTs, forward verbatim as Authorization: Bearer on every request.
|
|
62
73
|
// Opaque tokens keep using the Qase `Token` header via Configuration.apiKey.
|
|
63
74
|
if (jwtToken) {
|
|
@@ -81,6 +92,24 @@ class QaseApiClient {
|
|
|
81
92
|
}
|
|
82
93
|
return req;
|
|
83
94
|
});
|
|
95
|
+
// Tag each Qase API request with the integration built on top of this server
|
|
96
|
+
// (a plugin/agent/wrapper — e.g. the quality-supervisor Claude Code plugin).
|
|
97
|
+
// A third axis, independent of the User-Agent source and of the AI host in
|
|
98
|
+
// X-MCP-Client-*: the same integration can run on any host, on either
|
|
99
|
+
// deployment. Sourced per-request from integrationStorage, falling back to
|
|
100
|
+
// QASE_MCP_INTEGRATION. Nothing is sent unless the marker is well-formed and
|
|
101
|
+
// allowlisted — see integration-marker.ts.
|
|
102
|
+
this.axiosInstance.interceptors.request.use((req) => {
|
|
103
|
+
const integration = parseIntegrationMarker(getIntegration());
|
|
104
|
+
if (integration) {
|
|
105
|
+
req.headers = req.headers ?? {};
|
|
106
|
+
req.headers['X-MCP-Integration-Name'] = integration.name;
|
|
107
|
+
if (integration.version) {
|
|
108
|
+
req.headers['X-MCP-Integration-Version'] = integration.version;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return req;
|
|
112
|
+
});
|
|
84
113
|
attachRetry(this.axiosInstance);
|
|
85
114
|
attachInflightDedupe(this.axiosInstance);
|
|
86
115
|
const basePath = `${config.host}/v1`;
|
|
@@ -132,6 +161,11 @@ class QaseApiClient {
|
|
|
132
161
|
}
|
|
133
162
|
/**
|
|
134
163
|
* Get validated API host from QASE_API_DOMAIN env var.
|
|
164
|
+
*
|
|
165
|
+
* The scheme comes from QASE_API_PROTOCOL and defaults to https; it exists so a
|
|
166
|
+
* self-hosted API served over plain HTTP (http://api.qase.lo) can be reached.
|
|
167
|
+
* A non-default port belongs in the domain (api.qase.lo:8080) — only `://` and
|
|
168
|
+
* paths are rejected here.
|
|
135
169
|
*/
|
|
136
170
|
function getHost() {
|
|
137
171
|
const domain = process.env.QASE_API_DOMAIN || 'api.qase.io';
|
|
@@ -139,7 +173,16 @@ function getHost() {
|
|
|
139
173
|
throw new Error('QASE_API_DOMAIN should only contain the domain name (e.g., api.qase.io), ' +
|
|
140
174
|
'not the full URL with protocol or path');
|
|
141
175
|
}
|
|
142
|
-
return
|
|
176
|
+
return `${getProtocol()}://${domain}`;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Scheme for API requests. Accepts `http` or `https`, with or without the `://`
|
|
180
|
+
* suffix; anything else falls back to https rather than failing, so a typo can
|
|
181
|
+
* never downgrade the connection to something unexpected.
|
|
182
|
+
*/
|
|
183
|
+
function getProtocol() {
|
|
184
|
+
const protocol = process.env.QASE_API_PROTOCOL?.trim().toLowerCase().replace(/:\/*$/, '');
|
|
185
|
+
return protocol === 'http' ? 'http' : 'https';
|
|
143
186
|
}
|
|
144
187
|
/**
|
|
145
188
|
* Get full API client config (token + host).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,aAAa,EACb,WAAW,EACX,QAAQ,EACR,SAA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
|
-
{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/transports/sse.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/transports/sse.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAOnE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAOD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAyDrF"}
|
package/build/transports/sse.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
|
|
3
3
|
import { requestTokenStorage } from '../utils/auth-context.js';
|
|
4
|
+
import { integrationStorage } from '../utils/integration-context.js';
|
|
5
|
+
import { normalizeIntegrationMarker } from '../utils/integration-marker.js';
|
|
4
6
|
import { getMetrics } from '../cache/index.js';
|
|
7
|
+
/** Normalised integration marker off a header or query value (integration-marker.ts). */
|
|
8
|
+
function readIntegrationMarker(value) {
|
|
9
|
+
return typeof value === 'string' ? normalizeIntegrationMarker(value) : undefined;
|
|
10
|
+
}
|
|
5
11
|
export function setupSSETransport(server, config) {
|
|
6
12
|
const app = express();
|
|
7
13
|
app.use(express.json());
|
|
@@ -9,6 +15,10 @@ export function setupSSETransport(server, config) {
|
|
|
9
15
|
const messagesEndpoint = config.messagesEndpoint || '/messages';
|
|
10
16
|
const host = config.host || '0.0.0.0';
|
|
11
17
|
let transport = null;
|
|
18
|
+
// This transport serves a single connection at a time, so the marker captured
|
|
19
|
+
// when the stream is opened plays the role the per-session map plays in
|
|
20
|
+
// streamable-http: it covers POSTs that cannot repeat the header.
|
|
21
|
+
let connectionIntegration;
|
|
12
22
|
// Health check endpoint
|
|
13
23
|
app.get('/health', (_req, res) => {
|
|
14
24
|
res.json({ status: 'ok', transport: 'sse' });
|
|
@@ -19,8 +29,11 @@ export function setupSSETransport(server, config) {
|
|
|
19
29
|
res.send(getMetrics().renderPrometheus());
|
|
20
30
|
});
|
|
21
31
|
// SSE endpoint for establishing connection
|
|
22
|
-
app.get(sseEndpoint, (
|
|
32
|
+
app.get(sseEndpoint, (req, res) => {
|
|
23
33
|
console.error('[SSE] Client connected');
|
|
34
|
+
connectionIntegration =
|
|
35
|
+
readIntegrationMarker(req.headers['x-qase-integration']) ??
|
|
36
|
+
readIntegrationMarker(req.query.integration);
|
|
24
37
|
transport = new SSEServerTransport(messagesEndpoint, res);
|
|
25
38
|
server.connect(transport);
|
|
26
39
|
});
|
|
@@ -32,7 +45,8 @@ export function setupSSETransport(server, config) {
|
|
|
32
45
|
}
|
|
33
46
|
const authHeader = req.headers['authorization'] || '';
|
|
34
47
|
const requestToken = authHeader.startsWith('Bearer ') ? authHeader.slice(7).trim() : '';
|
|
35
|
-
|
|
48
|
+
const integration = readIntegrationMarker(req.headers['x-qase-integration']) ?? connectionIntegration ?? '';
|
|
49
|
+
requestTokenStorage.run(requestToken, () => integrationStorage.run(integration, () => transport.handlePostMessage(req, res)));
|
|
36
50
|
});
|
|
37
51
|
// Start server
|
|
38
52
|
app.listen(config.port, host, () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sse.js","sourceRoot":"","sources":["../../src/transports/sse.ts"],"names":[],"mappings":"AAAA,OAAO,OAAoB,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC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AAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"streamableHttp.d.ts","sourceRoot":"","sources":["../../src/transports/streamableHttp.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAQnE,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMjF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAsBD,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,MAAM,MAAM,EAC1B,MAAM,EAAE,oBAAoB,EAC5B,SAAS,CAAC,EAAE;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,YAAY,CAAA;CAAE,GAC1D,OAAO,CAmVT"}
|
|
@@ -3,6 +3,8 @@ import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/
|
|
|
3
3
|
import { mcpAuthRouter } from '@modelcontextprotocol/sdk/server/auth/router.js';
|
|
4
4
|
import { randomUUID } from 'crypto';
|
|
5
5
|
import { requestTokenStorage } from '../utils/auth-context.js';
|
|
6
|
+
import { integrationStorage } from '../utils/integration-context.js';
|
|
7
|
+
import { normalizeIntegrationMarker } from '../utils/integration-marker.js';
|
|
6
8
|
import { getMetrics } from '../cache/index.js';
|
|
7
9
|
import { getOAuthConfig } from '../auth/oauth-config.js';
|
|
8
10
|
import { createJwksVerifier } from '../auth/jwks-verifier.js';
|
|
@@ -13,6 +15,18 @@ import { authorizeRedirectUriStorage } from '../auth/client-context.js';
|
|
|
13
15
|
function isInitializeRequest(body) {
|
|
14
16
|
return (typeof body === 'object' && body !== null && 'method' in body && body.method === 'initialize');
|
|
15
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Read the integration marker off a request, normalised (see integration-marker.ts).
|
|
20
|
+
*
|
|
21
|
+
* Two channels, both required. The header is the primary one; the query parameter
|
|
22
|
+
* exists because it is not yet proven that custom request headers survive the
|
|
23
|
+
* OAuth flow on the hosted endpoint in every MCP client, and a URL is the one
|
|
24
|
+
* thing every client definitely passes through. The query parameter is only read
|
|
25
|
+
* at session creation — after that the value is remembered per session.
|
|
26
|
+
*/
|
|
27
|
+
function readIntegrationMarker(value) {
|
|
28
|
+
return typeof value === 'string' ? normalizeIntegrationMarker(value) : undefined;
|
|
29
|
+
}
|
|
16
30
|
export function setupStreamableHttpTransport(createServer, config, oauthDeps) {
|
|
17
31
|
const app = express();
|
|
18
32
|
// Behind a reverse proxy (k8s ingress, load balancer, ngrok) the client's
|
|
@@ -37,7 +51,9 @@ export function setupStreamableHttpTransport(createServer, config, oauthDeps) {
|
|
|
37
51
|
res.header('Access-Control-Allow-Methods', 'GET, POST, DELETE, OPTIONS');
|
|
38
52
|
// Mcp-Method / Mcp-Name are required request headers as of MCP spec 2026-07-28
|
|
39
53
|
// (gateway routing without body parsing) — allow them ahead of client adoption.
|
|
40
|
-
|
|
54
|
+
// X-Qase-Integration is ours: without it a browser-based client's preflight
|
|
55
|
+
// strips the marker and only the ?integration= fallback would work.
|
|
56
|
+
res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, mcp-session-id, Mcp-Method, Mcp-Name, X-Qase-Integration');
|
|
41
57
|
// Expose auth challenge + session id so browser-based MCP clients (Inspector,
|
|
42
58
|
// Claude.ai web) can read them from cross-origin responses. Without this the
|
|
43
59
|
// 401 WWW-Authenticate challenge is invisible to client JS and OAuth never starts.
|
|
@@ -123,6 +139,9 @@ export function setupStreamableHttpTransport(createServer, config, oauthDeps) {
|
|
|
123
139
|
const SESSION_TTL_MS = ttlMinutes * 60 * 1000;
|
|
124
140
|
const sessions = new Map();
|
|
125
141
|
const sessionLastSeen = new Map();
|
|
142
|
+
// Integration marker captured at session creation (header or ?integration=),
|
|
143
|
+
// so later requests on the session need not repeat it. Evicted with the session.
|
|
144
|
+
const sessionIntegrations = new Map();
|
|
126
145
|
// Periodically evict stale sessions that never sent a DELETE
|
|
127
146
|
const cleanupInterval = setInterval(() => {
|
|
128
147
|
const now = Date.now();
|
|
@@ -134,6 +153,7 @@ export function setupStreamableHttpTransport(createServer, config, oauthDeps) {
|
|
|
134
153
|
sessions.delete(id);
|
|
135
154
|
}
|
|
136
155
|
sessionLastSeen.delete(id);
|
|
156
|
+
sessionIntegrations.delete(id);
|
|
137
157
|
console.error(`[StreamableHTTP] Evicted stale session: ${id}`);
|
|
138
158
|
}
|
|
139
159
|
}
|
|
@@ -165,6 +185,7 @@ export function setupStreamableHttpTransport(createServer, config, oauthDeps) {
|
|
|
165
185
|
await transport.close();
|
|
166
186
|
sessions.delete(sessionId);
|
|
167
187
|
sessionLastSeen.delete(sessionId);
|
|
188
|
+
sessionIntegrations.delete(sessionId);
|
|
168
189
|
console.error(`[StreamableHTTP] Session closed: ${sessionId}`);
|
|
169
190
|
res.status(200).json({ status: 'session closed' });
|
|
170
191
|
}
|
|
@@ -210,10 +231,15 @@ export function setupStreamableHttpTransport(createServer, config, oauthDeps) {
|
|
|
210
231
|
});
|
|
211
232
|
const sessionId = req.headers['mcp-session-id'];
|
|
212
233
|
let transport;
|
|
234
|
+
// Integration marker on this request, if it carried one.
|
|
235
|
+
const headerIntegration = readIntegrationMarker(req.headers['x-qase-integration']);
|
|
236
|
+
// The one remembered for the session, filled in below.
|
|
237
|
+
let sessionIntegration;
|
|
213
238
|
if (sessionId && sessions.has(sessionId)) {
|
|
214
239
|
// Reuse existing transport for this session — bump last-seen
|
|
215
240
|
transport = sessions.get(sessionId);
|
|
216
241
|
sessionLastSeen.set(sessionId, Date.now());
|
|
242
|
+
sessionIntegration = sessionIntegrations.get(sessionId);
|
|
217
243
|
}
|
|
218
244
|
else if (isInitializeRequest(req.body)) {
|
|
219
245
|
// This is an initialize request - create new session
|
|
@@ -225,6 +251,12 @@ export function setupStreamableHttpTransport(createServer, config, oauthDeps) {
|
|
|
225
251
|
// Store session and record creation time
|
|
226
252
|
sessions.set(newSessionId, transport);
|
|
227
253
|
sessionLastSeen.set(newSessionId, Date.now());
|
|
254
|
+
// Remember the integration for the life of the session. The query parameter
|
|
255
|
+
// is only available here, on the initialize request that carries the URL.
|
|
256
|
+
sessionIntegration = headerIntegration ?? readIntegrationMarker(req.query.integration);
|
|
257
|
+
if (sessionIntegration) {
|
|
258
|
+
sessionIntegrations.set(newSessionId, sessionIntegration);
|
|
259
|
+
}
|
|
228
260
|
// Create a fresh Server instance per session — the SDK requires one Server per transport
|
|
229
261
|
await createServer().connect(transport);
|
|
230
262
|
console.error(`[StreamableHTTP] New session created: ${newSessionId}`);
|
|
@@ -250,9 +282,12 @@ export function setupStreamableHttpTransport(createServer, config, oauthDeps) {
|
|
|
250
282
|
if (requestToken) {
|
|
251
283
|
console.error('[StreamableHTTP] Using per-request Bearer token');
|
|
252
284
|
}
|
|
285
|
+
// Precedence: this request's header → the value remembered for the session →
|
|
286
|
+
// (inside getIntegration) the QASE_MCP_INTEGRATION env var.
|
|
287
|
+
const integration = headerIntegration ?? sessionIntegration ?? '';
|
|
253
288
|
// Run the handler inside AsyncLocalStorage context so getApiClient() can read the token
|
|
254
289
|
try {
|
|
255
|
-
await requestTokenStorage.run(requestToken, () => transport.handleRequest(req, res, req.body));
|
|
290
|
+
await requestTokenStorage.run(requestToken, () => integrationStorage.run(integration, () => transport.handleRequest(req, res, req.body)));
|
|
256
291
|
}
|
|
257
292
|
catch (error) {
|
|
258
293
|
console.error('[StreamableHTTP] Error handling request:', error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamableHttp.js","sourceRoot":"","sources":["../../src/transports/streamableHttp.ts"],"names":[],"mappings":"AAAA,OAAO,OAAoB,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*
|
|
5
|
+
* Holds the raw `<name>/<version>` marker supplied by the integration driving
|
|
6
|
+
* this request (see integration-marker.ts). Empty string means "this request
|
|
7
|
+
* carried no marker" — fall back to the process-wide QASE_MCP_INTEGRATION.
|
|
8
|
+
*
|
|
9
|
+
* Same shape and lifecycle as requestTokenStorage in auth-context.ts: HTTP
|
|
10
|
+
* transports open a scope per request, so two concurrent sessions with different
|
|
11
|
+
* markers never observe each other's value.
|
|
12
|
+
*/
|
|
13
|
+
export declare const integrationStorage: AsyncLocalStorage<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Read the marker for the current async context: request-scoped value first,
|
|
16
|
+
* then the QASE_MCP_INTEGRATION env var (the stdio path, where there is no
|
|
17
|
+
* request to carry a header).
|
|
18
|
+
*
|
|
19
|
+
* Returns undefined when neither is set — the common case, and the one that must
|
|
20
|
+
* leave the outbound request untouched. The value is unvalidated; callers pass it
|
|
21
|
+
* through parseIntegrationMarker().
|
|
22
|
+
*/
|
|
23
|
+
export declare function getIntegration(): string | undefined;
|
|
24
|
+
//# sourceMappingURL=integration-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-context.d.ts","sourceRoot":"","sources":["../../src/utils/integration-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,2BAAkC,CAAC;AAElE;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,SAAS,CAInD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'async_hooks';
|
|
2
|
+
/**
|
|
3
|
+
* Per-request integration marker storage.
|
|
4
|
+
*
|
|
5
|
+
* Holds the raw `<name>/<version>` marker supplied by the integration driving
|
|
6
|
+
* this request (see integration-marker.ts). Empty string means "this request
|
|
7
|
+
* carried no marker" — fall back to the process-wide QASE_MCP_INTEGRATION.
|
|
8
|
+
*
|
|
9
|
+
* Same shape and lifecycle as requestTokenStorage in auth-context.ts: HTTP
|
|
10
|
+
* transports open a scope per request, so two concurrent sessions with different
|
|
11
|
+
* markers never observe each other's value.
|
|
12
|
+
*/
|
|
13
|
+
export const integrationStorage = new AsyncLocalStorage();
|
|
14
|
+
/**
|
|
15
|
+
* Read the marker for the current async context: request-scoped value first,
|
|
16
|
+
* then the QASE_MCP_INTEGRATION env var (the stdio path, where there is no
|
|
17
|
+
* request to carry a header).
|
|
18
|
+
*
|
|
19
|
+
* Returns undefined when neither is set — the common case, and the one that must
|
|
20
|
+
* leave the outbound request untouched. The value is unvalidated; callers pass it
|
|
21
|
+
* through parseIntegrationMarker().
|
|
22
|
+
*/
|
|
23
|
+
export function getIntegration() {
|
|
24
|
+
const requestIntegration = integrationStorage.getStore();
|
|
25
|
+
if (requestIntegration)
|
|
26
|
+
return requestIntegration;
|
|
27
|
+
return process.env.QASE_MCP_INTEGRATION?.trim() || undefined;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=integration-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-context.js","sourceRoot":"","sources":["../../src/utils/integration-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,iBAAiB,EAAU,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,QAAQ,EAAE,CAAC;IACzD,IAAI,kBAAkB;QAAE,OAAO,kBAAkB,CAAC;IAClD,OAAO,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integration Marker
|
|
3
|
+
*
|
|
4
|
+
* An *integration* is a product built on top of this MCP server (a plugin, an
|
|
5
|
+
* agent, a wrapper CLI) that wants to be attributable in Qase analytics. It is a
|
|
6
|
+
* third, independent axis from the two identities already on the wire:
|
|
7
|
+
*
|
|
8
|
+
* - `User-Agent: qase-mcp/<v>` — which deployment of this server (self-run vs hosted)
|
|
9
|
+
* - `X-MCP-Client-*` — which AI host is connected (Claude, Cursor, …)
|
|
10
|
+
* - `X-MCP-Integration-*` — which integration is driving the server (this file)
|
|
11
|
+
*
|
|
12
|
+
* The allowlist below is the cardinality control: the backend stores whatever it
|
|
13
|
+
* receives into a PUBLIC_API_CALL analytics dimension and does not guess, so an
|
|
14
|
+
* unknown marker must never reach it. Adding an integration is a deliberate
|
|
15
|
+
* change here, in code review.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Integration names allowed to identify themselves to the Qase API.
|
|
19
|
+
* Lowercase; anything not listed here is ignored entirely.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ALLOWED_INTEGRATIONS: readonly string[];
|
|
22
|
+
export interface IntegrationMarker {
|
|
23
|
+
/** Lowercased, allowlisted integration name. */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Present only when the supplied version passed validation. */
|
|
26
|
+
version?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Parse a `<name>/<version>` marker (version optional).
|
|
30
|
+
*
|
|
31
|
+
* Everything is best-effort and silent: a malformed, oversized or unknown marker
|
|
32
|
+
* yields `undefined` rather than an error, so a bad marker can never fail the
|
|
33
|
+
* API call it was attached to. A valid name with an invalid version keeps the
|
|
34
|
+
* name and drops the version.
|
|
35
|
+
*/
|
|
36
|
+
export declare function parseIntegrationMarker(raw: string | undefined | null): IntegrationMarker | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Parse and re-serialise a marker into its canonical `<name>[/<version>]` form,
|
|
39
|
+
* or `undefined` if it is not usable. Transports use this to normalise a marker
|
|
40
|
+
* once, at the edge, so nothing unbounded or unknown is remembered per session.
|
|
41
|
+
*/
|
|
42
|
+
export declare function normalizeIntegrationMarker(raw: string | undefined | null): string | undefined;
|
|
43
|
+
//# sourceMappingURL=integration-marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-marker.d.ts","sourceRoot":"","sources":["../../src/utils/integration-marker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAA2B,CAAC;AAQ9E,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAC7B,iBAAiB,GAAG,SAAS,CAa/B;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAI7F"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integration Marker
|
|
3
|
+
*
|
|
4
|
+
* An *integration* is a product built on top of this MCP server (a plugin, an
|
|
5
|
+
* agent, a wrapper CLI) that wants to be attributable in Qase analytics. It is a
|
|
6
|
+
* third, independent axis from the two identities already on the wire:
|
|
7
|
+
*
|
|
8
|
+
* - `User-Agent: qase-mcp/<v>` — which deployment of this server (self-run vs hosted)
|
|
9
|
+
* - `X-MCP-Client-*` — which AI host is connected (Claude, Cursor, …)
|
|
10
|
+
* - `X-MCP-Integration-*` — which integration is driving the server (this file)
|
|
11
|
+
*
|
|
12
|
+
* The allowlist below is the cardinality control: the backend stores whatever it
|
|
13
|
+
* receives into a PUBLIC_API_CALL analytics dimension and does not guess, so an
|
|
14
|
+
* unknown marker must never reach it. Adding an integration is a deliberate
|
|
15
|
+
* change here, in code review.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Integration names allowed to identify themselves to the Qase API.
|
|
19
|
+
* Lowercase; anything not listed here is ignored entirely.
|
|
20
|
+
*/
|
|
21
|
+
export const ALLOWED_INTEGRATIONS = ['quality-supervisor'];
|
|
22
|
+
/** Longest name or version we will look at; longer input is truncated, then validated. */
|
|
23
|
+
const MAX_FIELD_LENGTH = 100;
|
|
24
|
+
/** Versions are opaque to us — word chars, dots, dashes and pluses only. */
|
|
25
|
+
const VERSION_PATTERN = /^[\w.\-+]{1,32}$/;
|
|
26
|
+
/**
|
|
27
|
+
* Parse a `<name>/<version>` marker (version optional).
|
|
28
|
+
*
|
|
29
|
+
* Everything is best-effort and silent: a malformed, oversized or unknown marker
|
|
30
|
+
* yields `undefined` rather than an error, so a bad marker can never fail the
|
|
31
|
+
* API call it was attached to. A valid name with an invalid version keeps the
|
|
32
|
+
* name and drops the version.
|
|
33
|
+
*/
|
|
34
|
+
export function parseIntegrationMarker(raw) {
|
|
35
|
+
const trimmed = raw?.trim();
|
|
36
|
+
if (!trimmed)
|
|
37
|
+
return undefined;
|
|
38
|
+
const separator = trimmed.indexOf('/');
|
|
39
|
+
const rawName = separator === -1 ? trimmed : trimmed.slice(0, separator);
|
|
40
|
+
const rawVersion = separator === -1 ? '' : trimmed.slice(separator + 1);
|
|
41
|
+
const name = rawName.trim().slice(0, MAX_FIELD_LENGTH).toLowerCase();
|
|
42
|
+
if (!ALLOWED_INTEGRATIONS.includes(name))
|
|
43
|
+
return undefined;
|
|
44
|
+
const version = rawVersion.trim().slice(0, MAX_FIELD_LENGTH);
|
|
45
|
+
return VERSION_PATTERN.test(version) ? { name, version } : { name };
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parse and re-serialise a marker into its canonical `<name>[/<version>]` form,
|
|
49
|
+
* or `undefined` if it is not usable. Transports use this to normalise a marker
|
|
50
|
+
* once, at the edge, so nothing unbounded or unknown is remembered per session.
|
|
51
|
+
*/
|
|
52
|
+
export function normalizeIntegrationMarker(raw) {
|
|
53
|
+
const marker = parseIntegrationMarker(raw);
|
|
54
|
+
if (!marker)
|
|
55
|
+
return undefined;
|
|
56
|
+
return marker.version ? `${marker.name}/${marker.version}` : marker.name;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=integration-marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-marker.js","sourceRoot":"","sources":["../../src/utils/integration-marker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsB,CAAC,oBAAoB,CAAC,CAAC;AAE9E,0FAA0F;AAC1F,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,4EAA4E;AAC5E,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAS3C;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,GAA8B;IAE9B,MAAM,OAAO,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAE/B,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAExE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC;IACrE,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAE3D,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAC7D,OAAO,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;AACtE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,GAA8B;IACvE,MAAM,MAAM,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAC3C,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;AAC3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/test-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;;;;;GAOxC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAS/D;AAED;;GAEG;AACH,wBAAgB,UAAU,SAGzB;AAED;;GAEG;AACH,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/test-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,wBAAgB,cAAc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/build/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.2.
|
|
1
|
+
export declare const VERSION = "2.2.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/version.js
CHANGED
package/docs/connect.md
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
The quickest way to use Qase — no install and no API token. Connect to the Qase-hosted MCP server at `https://mcp.qase.io/mcp` and sign in with your Qase account. Any MCP client that supports remote servers (OAuth 2.1) works; the client handles the OAuth flow for you — Claude, Cursor, Codex, and VS Code are shown below.
|
|
4
4
|
|
|
5
|
-
> **
|
|
5
|
+
> **Availability:** The hosted Qase MCP requires the **Enterprise** plan *and* a workspace on Qase's main cloud (`qase.io`). Two situations call for [running the server yourself](self-run.md) instead:
|
|
6
|
+
>
|
|
7
|
+
> - **Any other plan** — you can sign in, but tool calls are rejected with a plan error.
|
|
8
|
+
> - **A dedicated instance** — the hosted server only talks to the main cloud, so it cannot reach a dedicated deployment whatever your plan. Self-run points at your own domain via `QASE_API_DOMAIN`.
|
|
9
|
+
>
|
|
10
|
+
> Running the server yourself works on every plan and on both cloud and dedicated instances.
|
|
6
11
|
|
|
7
12
|
Prefer to run the server yourself with your own `QASE_API_TOKEN`? See [Self-Run Guide (Local / stdio)](self-run.md).
|
|
8
13
|
|
package/docs/self-run.md
CHANGED
|
@@ -43,18 +43,60 @@ QASE_API_TOKEN=your_api_token_here
|
|
|
43
43
|
|
|
44
44
|
# Optional: Custom API domain for enterprise customers
|
|
45
45
|
QASE_API_DOMAIN=api.qase.io
|
|
46
|
+
|
|
47
|
+
# Optional: Scheme used to reach that domain — http or https (default: https)
|
|
48
|
+
QASE_API_PROTOCOL=https
|
|
46
49
|
```
|
|
47
50
|
|
|
48
51
|
Get your API token from: https://app.qase.io/user/api/token
|
|
49
52
|
|
|
53
|
+
### Integration Marker (for integration authors)
|
|
54
|
+
|
|
55
|
+
Skip this section if you are using the server directly — it changes nothing for you.
|
|
56
|
+
|
|
57
|
+
If you are *building a product on top of* this server (a plugin, an agent, a wrapper CLI), you can have your integration identified in Qase analytics. Set `QASE_MCP_INTEGRATION` in the environment you launch the server with:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# <name>/<version> — the version is optional
|
|
61
|
+
QASE_MCP_INTEGRATION=quality-supervisor/1.4.0
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The server forwards it to the Qase API as `X-MCP-Integration-Name` and `X-MCP-Integration-Version`. It is a separate identity from the server deployment (`User-Agent`) and from the connected AI host (`X-MCP-Client-*`), so the same integration is attributable across every host and both deployments.
|
|
65
|
+
|
|
66
|
+
Rules:
|
|
67
|
+
|
|
68
|
+
- Format is `<name>/<version>`; the version may be omitted. The name is lowercased.
|
|
69
|
+
- A version must be made of word characters, dots, dashes or pluses, up to 32 characters — anything else is dropped and only the name is sent.
|
|
70
|
+
- **The name must be on the allowlist** in [`src/utils/integration-marker.ts`](../src/utils/integration-marker.ts) (`ALLOWED_INTEGRATIONS`). This bounds the cardinality of the analytics dimension, so an unlisted name is ignored entirely and nothing is sent. To add your integration, open a PR adding it to that array.
|
|
71
|
+
- A malformed or unlisted marker is dropped silently; the API call itself still succeeds.
|
|
72
|
+
|
|
73
|
+
Over HTTP transports the marker can also travel per request instead of per process — send an `X-Qase-Integration: <name>/<version>` header, or add `?integration=<name>/<version>` to the MCP endpoint URL (read when the session is created, then remembered for that session). The query parameter is the fallback for clients that do not pass custom headers through. Precedence: request header → the value remembered for the session → `QASE_MCP_INTEGRATION`.
|
|
74
|
+
|
|
50
75
|
### Custom Domains (Enterprise)
|
|
51
76
|
|
|
52
77
|
If you're using Qase Enterprise with a custom domain:
|
|
53
78
|
|
|
54
79
|
```bash
|
|
55
|
-
QASE_API_DOMAIN=api
|
|
80
|
+
QASE_API_DOMAIN=api-yourcompany.qase.io
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`QASE_API_DOMAIN` takes the domain only — no scheme, no path. `https://api-yourcompany.qase.io` or `api-yourcompany.qase.io/v1` are rejected with an error.
|
|
84
|
+
|
|
85
|
+
If your workspace is on a **dedicated instance**, self-run is the only option: the [hosted connector](connect.md) serves Qase's main cloud (`qase.io`) only, regardless of plan.
|
|
86
|
+
|
|
87
|
+
### Self-Hosted Deployments over Plain HTTP
|
|
88
|
+
|
|
89
|
+
Requests go over HTTPS by default. If your self-hosted or on-premise Qase API is served over plain HTTP — typically a local or internal-network install without a certificate — set the scheme separately:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
QASE_API_DOMAIN=api.qase.lo
|
|
93
|
+
QASE_API_PROTOCOL=http
|
|
56
94
|
```
|
|
57
95
|
|
|
96
|
+
Only `http` and `https` are recognised (case-insensitive, with or without a trailing `://`). Any other value falls back to `https`, so a typo cannot silently downgrade the connection. A non-default port belongs in `QASE_API_DOMAIN` — `api.qase.lo:8080`.
|
|
97
|
+
|
|
98
|
+
Use `http` only for deployments you control on a trusted network: the API token travels in a request header, unencrypted, on every call.
|
|
99
|
+
|
|
58
100
|
## Client Setup (stdio)
|
|
59
101
|
|
|
60
102
|
### Claude Desktop
|
package/docs/troubleshooting.md
CHANGED
|
@@ -20,10 +20,23 @@ These apply when connecting to the Qase-hosted server (`https://mcp.qase.io/mcp`
|
|
|
20
20
|
|
|
21
21
|
### Access denied / Enterprise plan required
|
|
22
22
|
|
|
23
|
-
The hosted Qase MCP
|
|
23
|
+
The hosted Qase MCP requires the **Enterprise** plan. If your workspace is on another plan, requests are rejected with an access/plan error — the connector may sign in but tool calls fail with a plan-related message.
|
|
24
24
|
|
|
25
25
|
**Solution**: upgrade to the Enterprise plan, or [run the server yourself](self-run.md) with your own `QASE_API_TOKEN` (works on any plan).
|
|
26
26
|
|
|
27
|
+
### Dedicated instance can't use the hosted connector
|
|
28
|
+
|
|
29
|
+
The hosted server at `https://mcp.qase.io/mcp` serves Qase's main cloud (`qase.io`) only. If your workspace lives on a dedicated instance, the connector cannot reach your data — an Enterprise plan does not change this, and the symptom is usually a sign-in that succeeds against the wrong place, or projects that simply aren't there.
|
|
30
|
+
|
|
31
|
+
**Solution**: [run the server yourself](self-run.md) and point it at your instance:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
QASE_API_TOKEN=your_api_token_here
|
|
35
|
+
QASE_API_DOMAIN=api-yourcompany.qase.io
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If that instance is served without TLS, also set `QASE_API_PROTOCOL=http` — see [Self-Hosted API Served over Plain HTTP](#self-hosted-api-served-over-plain-http).
|
|
39
|
+
|
|
27
40
|
### Connector doesn't appear, or won't connect
|
|
28
41
|
|
|
29
42
|
**Solution**:
|
|
@@ -112,9 +125,23 @@ To find your certificate:
|
|
|
112
125
|
**Error**: `Invalid domain` or connection errors with custom domain
|
|
113
126
|
|
|
114
127
|
**Solution**:
|
|
115
|
-
1. Ensure `QASE_API_DOMAIN` is set to just the domain (e.g., `api
|
|
116
|
-
2. Don't include `https://` or `/v1` in the domain
|
|
117
|
-
3.
|
|
128
|
+
1. Ensure `QASE_API_DOMAIN` is set to just the domain (e.g., `api-company.qase.io`)
|
|
129
|
+
2. Don't include `https://` or `/v1` in the domain — the scheme goes in `QASE_API_PROTOCOL` instead (see below), and the API version is appended by the server
|
|
130
|
+
3. A non-default port does belong in the domain: `api-company.qase.io:8080`
|
|
131
|
+
4. Verify with your Qase administrator
|
|
132
|
+
|
|
133
|
+
## Self-Hosted API Served over Plain HTTP
|
|
134
|
+
|
|
135
|
+
**Error**: connection or TLS errors against a self-hosted Qase API that has no certificate
|
|
136
|
+
|
|
137
|
+
**Solution**: requests default to HTTPS. For a self-hosted or on-premise deployment served over plain HTTP, set the scheme separately:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
QASE_API_DOMAIN=api.qase.lo
|
|
141
|
+
QASE_API_PROTOCOL=http
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Only `http` and `https` are recognised; any other value falls back to `https`, so check for a typo if the scheme appears to be ignored. Use `http` only on a trusted network — the API token is sent unencrypted in a request header.
|
|
118
145
|
|
|
119
146
|
## No Tools Showing in MCP Client
|
|
120
147
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qase/mcp-server",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"mcpName": "io.qase/mcp-server",
|
|
5
5
|
"description": "Official MCP server for Qase Test Management Platform",
|
|
6
6
|
"type": "module",
|
|
@@ -99,7 +99,10 @@
|
|
|
99
99
|
"typescript": "^5.3.3"
|
|
100
100
|
},
|
|
101
101
|
"overrides": {
|
|
102
|
-
"js-yaml@3": "3.
|
|
102
|
+
"js-yaml@3": "3.15.1",
|
|
103
|
+
"js-yaml@4": "4.3.1",
|
|
104
|
+
"@babel/core": "^7.29.6",
|
|
105
|
+
"yaml": "^2.8.3"
|
|
103
106
|
},
|
|
104
107
|
"optionalDependencies": {
|
|
105
108
|
"ioredis": "^5.10.1"
|
package/server.json
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"url": "https://github.com/qase-tms/qase-mcp-server",
|
|
9
9
|
"source": "github"
|
|
10
10
|
},
|
|
11
|
-
"version": "2.2.
|
|
11
|
+
"version": "2.2.2",
|
|
12
12
|
"packages": [
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "@qase/mcp-server",
|
|
16
|
-
"version": "2.2.
|
|
16
|
+
"version": "2.2.2",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
"description": "Custom API domain for enterprise (default: api.qase.io)",
|
|
30
30
|
"isRequired": false,
|
|
31
31
|
"default": "api.qase.io"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "QASE_API_PROTOCOL",
|
|
35
|
+
"description": "Scheme used to reach the API domain: http or https. Use http only for self-hosted deployments served without TLS (default: https)",
|
|
36
|
+
"isRequired": false,
|
|
37
|
+
"default": "https"
|
|
32
38
|
}
|
|
33
39
|
]
|
|
34
40
|
}
|