@qase/mcp-server 3.0.4 → 3.0.6
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 +12 -0
- package/README.md +17 -8
- package/build/auth/proxy-provider.d.ts +4 -0
- package/build/auth/proxy-provider.d.ts.map +1 -1
- package/build/auth/proxy-provider.js +54 -33
- package/build/auth/proxy-provider.js.map +1 -1
- package/build/server.d.ts.map +1 -1
- package/build/server.js +1 -0
- package/build/server.js.map +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/docs/connect.md +1 -1
- package/docs/hosting.md +184 -0
- package/docs/integrations.md +29 -0
- package/docs/self-run.md +196 -280
- package/docs/troubleshooting.md +1 -1
- package/package.json +1 -1
- package/server.json +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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
|
+
## [3.0.6]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **The registry listing shows the Qase icon.** The icon was sent to connected clients in `serverInfo` but missing from `server.json`, so the MCP Registry and the directories that read it showed no icon. Both now carry the same icon, with its size.
|
|
13
|
+
|
|
14
|
+
## [3.0.5]
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **The hosted server's `/register` relays the authorization server's rejection instead of a generic error.** When `auth.qase.io` refused a dynamic client registration (for example `invalid_redirect_uri`), clients registering through `mcp.qase.io/register` got `500 server_error` with "Client registration failed: 400". They now get the same `400` with the original `error` and `error_description` as clients that register with `auth.qase.io` directly ([#126](https://github.com/qase-tms/qase-mcp-server/issues/126)).
|
|
19
|
+
|
|
8
20
|
## [3.0.4]
|
|
9
21
|
|
|
10
22
|
### Fixed
|
package/README.md
CHANGED
|
@@ -69,14 +69,21 @@ Full per-client steps, other clients, and the active-workspace model: **[docs/co
|
|
|
69
69
|
|
|
70
70
|
### Run it yourself
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
Works on every plan, including Free and dedicated instances. You need Node.js 20+ and a [Qase API token](https://app.qase.io/user/api/token); your MCP client starts the server for you. For example, in Claude Desktop's config:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"mcpServers": {
|
|
77
|
+
"qase": {
|
|
78
|
+
"command": "npx",
|
|
79
|
+
"args": ["-y", "@qase/mcp-server"],
|
|
80
|
+
"env": { "QASE_API_TOKEN": "your_api_token_here" }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
77
84
|
```
|
|
78
85
|
|
|
79
|
-
|
|
86
|
+
Step-by-step setup for Claude Desktop, Claude Code, Cursor, Codex and OpenCode, plus EU-region and custom-domain settings: **[docs/self-run.md](docs/self-run.md)**. Running one server for a team over HTTP: **[docs/hosting.md](docs/hosting.md)**.
|
|
80
87
|
|
|
81
88
|
## Building on top of this server
|
|
82
89
|
|
|
@@ -88,7 +95,7 @@ If your product drives this server (a plugin, an agent, a wrapper CLI), it can i
|
|
|
88
95
|
QASE_MCP_INTEGRATION=quality-supervisor/1.4.0 # <name>/<version>, version optional
|
|
89
96
|
```
|
|
90
97
|
|
|
91
|
-
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/
|
|
98
|
+
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/integrations.md](docs/integrations.md)**.
|
|
92
99
|
|
|
93
100
|
## Upgrading
|
|
94
101
|
|
|
@@ -116,7 +123,9 @@ Full tool-by-tool reference with parameters: **[docs/tools.md](docs/tools.md)**.
|
|
|
116
123
|
## Documentation
|
|
117
124
|
|
|
118
125
|
- **[docs/connect.md](docs/connect.md)** — connect to the hosted Qase MCP (Claude, Cursor, Codex, other clients)
|
|
119
|
-
- **[docs/self-run.md](docs/self-run.md)** —
|
|
126
|
+
- **[docs/self-run.md](docs/self-run.md)** — run the server yourself with your own API token, step by step per client
|
|
127
|
+
- **[docs/hosting.md](docs/hosting.md)** — host a shared server: HTTP transports, security, multiple replicas, metrics
|
|
128
|
+
- **[docs/integrations.md](docs/integrations.md)** — for integration authors: the integration marker
|
|
120
129
|
- **[docs/tools.md](docs/tools.md)** — full tool reference, groups, and the discovery model
|
|
121
130
|
- **[docs/troubleshooting.md](docs/troubleshooting.md)** — auth, OAuth/connector, and SSL issues
|
|
122
131
|
- **[docs/migration.md](docs/migration.md)** — upgrade guides: 2.x → 3.0.0, and the v1 → v2 tool mapping
|
|
@@ -15,6 +15,10 @@ import type { JwksVerifier } from './jwks-verifier.js';
|
|
|
15
15
|
* SDK's OAuthClientInformationFullSchema expects a string or an omitted field. Strip the
|
|
16
16
|
* null field (RFC 7591: client_secret is optional / omitted for public clients).
|
|
17
17
|
*
|
|
18
|
+
* Rejections: the SDK turns any non-ok registration response into an opaque
|
|
19
|
+
* `500 server_error`. A 400 with an RFC 7591 error body is rethrown as that same
|
|
20
|
+
* OAuth error, so proxied clients see e.g. `invalid_redirect_uri` like direct ones.
|
|
21
|
+
*
|
|
18
22
|
* Only the registration endpoint is touched; all other requests pass through unchanged.
|
|
19
23
|
*/
|
|
20
24
|
export declare function createRegistrationSanitizingFetch(registrationUrl: string, underlyingFetch?: FetchLike): FetchLike;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-provider.d.ts","sourceRoot":"","sources":["../../src/auth/proxy-provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA8B,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,
|
|
1
|
+
{"version":3,"file":"proxy-provider.d.ts","sourceRoot":"","sources":["../../src/auth/proxy-provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA8B,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,EAEL,wBAAwB,EACzB,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iCAAiC,CAC/C,eAAe,EAAE,MAAM,EACvB,eAAe,GAAE,SAA4B,GAC5C,SAAS,CAUX;AAkDD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,YAAY,GACrB,wBAAwB,CAoB1B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProxyOAuthServerProvider } from '@modelcontextprotocol/server-legacy/auth';
|
|
1
|
+
import { CustomOAuthError, ProxyOAuthServerProvider, } from '@modelcontextprotocol/server-legacy/auth';
|
|
2
2
|
import { authorizeRedirectUriStorage } from './client-context.js';
|
|
3
3
|
/**
|
|
4
4
|
* Wraps fetch to adapt both the outgoing DCR request and the incoming registration
|
|
@@ -13,45 +13,66 @@ import { authorizeRedirectUriStorage } from './client-context.js';
|
|
|
13
13
|
* SDK's OAuthClientInformationFullSchema expects a string or an omitted field. Strip the
|
|
14
14
|
* null field (RFC 7591: client_secret is optional / omitted for public clients).
|
|
15
15
|
*
|
|
16
|
+
* Rejections: the SDK turns any non-ok registration response into an opaque
|
|
17
|
+
* `500 server_error`. A 400 with an RFC 7591 error body is rethrown as that same
|
|
18
|
+
* OAuth error, so proxied clients see e.g. `invalid_redirect_uri` like direct ones.
|
|
19
|
+
*
|
|
16
20
|
* Only the registration endpoint is touched; all other requests pass through unchanged.
|
|
17
21
|
*/
|
|
18
22
|
export function createRegistrationSanitizingFetch(registrationUrl, underlyingFetch = globalThis.fetch) {
|
|
19
23
|
return async (url, init) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (String(url) === registrationUrl && init?.body != null) {
|
|
23
|
-
try {
|
|
24
|
-
const reqBody = JSON.parse(String(init.body));
|
|
25
|
-
if (reqBody.token_endpoint_auth_method === 'client_secret_post') {
|
|
26
|
-
reqBody.token_endpoint_auth_method = 'none';
|
|
27
|
-
effectiveInit = { ...init, body: JSON.stringify(reqBody) };
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
catch {
|
|
31
|
-
// Non-JSON body — forward unchanged.
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const res = await underlyingFetch(url, effectiveInit);
|
|
35
|
-
if (String(url) !== registrationUrl || !res.ok) {
|
|
36
|
-
return res;
|
|
24
|
+
if (String(url) !== registrationUrl) {
|
|
25
|
+
return underlyingFetch(url, init);
|
|
37
26
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
27
|
+
const res = await underlyingFetch(url, rewriteUnsupportedAuthMethod(init));
|
|
28
|
+
await throwUpstreamRegistrationError(res);
|
|
29
|
+
return res.ok ? stripNullClientSecret(res) : res;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function rewriteUnsupportedAuthMethod(init) {
|
|
33
|
+
if (init?.body == null) {
|
|
34
|
+
return init;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const reqBody = JSON.parse(String(init.body));
|
|
38
|
+
if (reqBody.token_endpoint_auth_method === 'client_secret_post') {
|
|
39
|
+
reqBody.token_endpoint_auth_method = 'none';
|
|
40
|
+
return { ...init, body: JSON.stringify(reqBody) };
|
|
52
41
|
}
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// Non-JSON body — forward unchanged.
|
|
45
|
+
}
|
|
46
|
+
return init;
|
|
47
|
+
}
|
|
48
|
+
async function throwUpstreamRegistrationError(res) {
|
|
49
|
+
if (res.status !== 400) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const error = await readJsonObject(res);
|
|
53
|
+
if (typeof error?.error === 'string') {
|
|
54
|
+
const description = typeof error.error_description === 'string' ? error.error_description : '';
|
|
55
|
+
throw new CustomOAuthError(error.error, description);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function stripNullClientSecret(res) {
|
|
59
|
+
const data = await readJsonObject(res);
|
|
60
|
+
if (data?.client_secret !== null) {
|
|
53
61
|
return res;
|
|
54
|
-
}
|
|
62
|
+
}
|
|
63
|
+
delete data.client_secret;
|
|
64
|
+
return new Response(JSON.stringify(data), {
|
|
65
|
+
status: res.status,
|
|
66
|
+
statusText: res.statusText,
|
|
67
|
+
headers: { 'content-type': 'application/json' },
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async function readJsonObject(res) {
|
|
71
|
+
const data = await res
|
|
72
|
+
.clone()
|
|
73
|
+
.json()
|
|
74
|
+
.catch(() => null);
|
|
75
|
+
return data && typeof data === 'object' ? data : null;
|
|
55
76
|
}
|
|
56
77
|
/**
|
|
57
78
|
* Build a ProxyOAuthServerProvider that transparently forwards /authorize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-provider.js","sourceRoot":"","sources":["../../src/auth/proxy-provider.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"proxy-provider.js","sourceRoot":"","sources":["../../src/auth/proxy-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,0CAA0C,CAAC;AAIlD,OAAO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,EAAE,MAAM,CAAC,gBAAgB;YACzC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,aAAa,EAAE,MAAM,CAAC,aAAa;SACpC;QACD,KAAK,EAAE,iCAAiC,CAAC,MAAM,CAAC,eAAe,CAAC;QAChE,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC;QACvD,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAuC,EAAE;YACjE,wEAAwE;YACxE,wEAAwE;YACxE,MAAM,WAAW,GAAG,2BAA2B,CAAC,QAAQ,EAAE,CAAC;YAC3D,OAAO;gBACL,SAAS,EAAE,QAAQ;gBACnB,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;aAChD,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/build/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAoC,MAAM,8BAA8B,CAAC;AAwBxF,OAAO,0BAA0B,CAAC;AAalC;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAoC,MAAM,8BAA8B,CAAC;AAwBxF,OAAO,0BAA0B,CAAC;AAalC;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,MAAM,CA8OrC"}
|
package/build/server.js
CHANGED
package/build/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAA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C;YACrB,CAAC,CAAC,CACH,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,0EAA0E;YAC1E,0EAA0E;YAC1E,qEAAqE;YACrE,wEAAwE;YACxE,iDAAiD;YACjD,IAAI,KAAK,YAAY,mBAAmB;gBAAE,OAAO,KAAK,CAAC,MAAM,CAAC;YAC9D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,yEAAyE;IACzE,6EAA6E;IAC7E,0EAA0E;IAC1E,2EAA2E;IAC3E,4EAA4E;IAC5E,yEAAyE;IACzE,mCAAmC;IAEnC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/build/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.
|
|
1
|
+
export declare const VERSION = "3.0.6";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/version.js
CHANGED
package/docs/connect.md
CHANGED
|
@@ -22,7 +22,7 @@ A **dedicated instance** is not a region and has no hosted endpoint; [run the se
|
|
|
22
22
|
>
|
|
23
23
|
> Running the server yourself works on every plan, in both regions, and on dedicated instances.
|
|
24
24
|
|
|
25
|
-
Prefer to run the server yourself with your own `QASE_API_TOKEN`? See [
|
|
25
|
+
Prefer to run the server yourself with your own `QASE_API_TOKEN`? See [Run the Qase MCP server yourself](self-run.md).
|
|
26
26
|
|
|
27
27
|
## Claude
|
|
28
28
|
|
package/docs/hosting.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Host a shared Qase MCP server
|
|
2
|
+
|
|
3
|
+
Run the server as a network service that several people or web-based clients connect to by URL, instead of each person's tool starting its own copy.
|
|
4
|
+
|
|
5
|
+
**You probably don't need this page.** To use Qase from your own AI tool, follow [Run the Qase MCP server yourself](self-run.md), where your tool starts the server over stdio and nothing listens on the network. On a paid plan, [the hosted Qase MCP](connect.md) already provides a shared URL that Qase runs for you.
|
|
6
|
+
|
|
7
|
+
This page is for operators who run the server for a team on Qase's clouds, behind a VPN, or next to a dedicated instance.
|
|
8
|
+
|
|
9
|
+
> **Note:** This page covers running the server yourself. It does not cover operating the Qase-hosted OAuth proxy behind `mcp.qase.io`; that is internal operator documentation.
|
|
10
|
+
|
|
11
|
+
## Getting the server
|
|
12
|
+
|
|
13
|
+
Either run the published package:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx -y @qase/mcp-server --transport streamable-http --port 3000
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
or build from source and use the npm scripts below:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
git clone https://github.com/qase-tms/qase-mcp-server.git
|
|
23
|
+
cd qase-mcp-server
|
|
24
|
+
npm install
|
|
25
|
+
npm run build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The source build is the same one described in [CONTRIBUTING.md](../CONTRIBUTING.md).
|
|
29
|
+
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
Set environment variables in the service's environment, or in a `.env` file in the directory the server starts from:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Optional: Custom API domain for enterprise customers
|
|
36
|
+
QASE_API_DOMAIN=api.qase.io
|
|
37
|
+
|
|
38
|
+
# Optional: Scheme used to reach that domain — http or https (default: https)
|
|
39
|
+
QASE_API_PROTOCOL=https
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`QASE_API_DOMAIN` and `QASE_API_PROTOCOL` work exactly as for a single user. See [Other regions and custom domains](self-run.md#other-regions-and-custom-domains) and [Self-hosted deployments over plain HTTP](self-run.md#self-hosted-deployments-over-plain-http).
|
|
43
|
+
|
|
44
|
+
`QASE_API_TOKEN` applies to the stdio transport only. On a network transport each client sends its own token; see [Security of network transports](#security-of-network-transports).
|
|
45
|
+
|
|
46
|
+
## Transports
|
|
47
|
+
|
|
48
|
+
The server supports multiple transport types for different use cases.
|
|
49
|
+
|
|
50
|
+
### Stdio Transport (Default)
|
|
51
|
+
|
|
52
|
+
Used by MCP clients like Claude Desktop and Cursor:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm start
|
|
56
|
+
# or
|
|
57
|
+
npm run start:stdio
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### SSE Transport
|
|
61
|
+
|
|
62
|
+
> **Deprecated.** The SSE transport was deprecated in the MCP specification on
|
|
63
|
+
> 2025-03-26 and will be removed in a future release. Use
|
|
64
|
+
> `--transport streamable-http` instead.
|
|
65
|
+
|
|
66
|
+
Server-Sent Events for web-based clients:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run start:sse
|
|
70
|
+
# Server runs on http://localhost:3000/sse
|
|
71
|
+
# Health check: http://localhost:3000/health
|
|
72
|
+
# Metrics: http://localhost:3000/metrics
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Clients must send a bearer token — see [Security of network transports](#security-of-network-transports).
|
|
76
|
+
|
|
77
|
+
### Streamable HTTP Transport
|
|
78
|
+
|
|
79
|
+
Full HTTP-based transport — there is no session; every request is served on its own:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm run start:http
|
|
83
|
+
# Server runs on http://localhost:3000/mcp
|
|
84
|
+
# Health check: http://localhost:3000/health
|
|
85
|
+
# Metrics: http://localhost:3000/metrics
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Clients must send a bearer token — see [Security of network transports](#security-of-network-transports).
|
|
89
|
+
|
|
90
|
+
**Deleting anything requires a modern client.** Destructive tools (`qase_case_delete` and the rest) are confirmed through a multi-round-trip exchange: the first call returns a request for input instead of deleting anything, and the client must retry with the answer. That round trip needs capabilities a client declares during `initialize`, which only a client that negotiates the **2026-07-28** revision of MCP provides. A client still on the 2025-11-25 revision — the common case on a stateless HTTP connection — cannot complete it, so its deletion is refused with an explanation naming the two ways out: use a client that negotiates 2026-07-28, or delete in the Qase UI. This is specific to the HTTP transports; stdio and SSE are long-lived connections where confirmation always works, though a stdio client that itself negotiates 2026-07-28 goes through the same round trip rather than the old single-call flow.
|
|
91
|
+
|
|
92
|
+
### Custom Configuration
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Custom port and host
|
|
96
|
+
node build/index.js --transport streamable-http --port 8080 --host 0.0.0.0
|
|
97
|
+
|
|
98
|
+
# Available options:
|
|
99
|
+
# --transport: stdio | sse | streamable-http (default: stdio)
|
|
100
|
+
# --port: Port number (default: 3000)
|
|
101
|
+
# --host: Host address (default: 0.0.0.0)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Security of network transports
|
|
105
|
+
|
|
106
|
+
`stdio` has no network listener: the client starts the process and the token
|
|
107
|
+
lives in the client's configuration. The `sse` and `streamable-http` transports
|
|
108
|
+
listen on a port, and two things follow from that.
|
|
109
|
+
|
|
110
|
+
**The client supplies the token.** Every request must carry
|
|
111
|
+
`Authorization: Bearer <token>`; the server does not fall back to its own
|
|
112
|
+
`QASE_API_TOKEN` when a request arrives without one. Sharing a single operator
|
|
113
|
+
token across a team is still fine — it just belongs in the client config:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"qase": {
|
|
119
|
+
"url": "http://your-host:3000/mcp",
|
|
120
|
+
"headers": { "Authorization": "Bearer YOUR_QASE_API_TOKEN" }
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Bind deliberately.** `--host` defaults to `0.0.0.0`, which accepts connections
|
|
127
|
+
from anywhere that can route to the machine. Pass `--host 127.0.0.1` unless the
|
|
128
|
+
server is meant to be reachable from the network, and keep OAuth on
|
|
129
|
+
(`QASE_OAUTH_ENABLED` defaults to enabled) unless you have a specific reason to
|
|
130
|
+
turn it off.
|
|
131
|
+
|
|
132
|
+
OAuth applies to `streamable-http` only: on `--transport sse` a token is
|
|
133
|
+
required but not validated by the server — any non-empty value passes, and a
|
|
134
|
+
bad one only fails later when the Qase API rejects it.
|
|
135
|
+
|
|
136
|
+
## Running more than one replica
|
|
137
|
+
|
|
138
|
+
Two pieces of state used to live inside a single process. From 3.0.0 both can be shared, and on a
|
|
139
|
+
multi-replica deployment both **must** be, because there are no sessions any more — consecutive
|
|
140
|
+
requests from the same client land on whichever replica the load balancer picks.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Required when running more than one replica: the HMAC key that signs a pending
|
|
144
|
+
# destructive-action confirmation. At least 32 bytes, identical on every replica.
|
|
145
|
+
QASE_MCP_REQUEST_STATE_KEY=<a shared random string of 32+ bytes>
|
|
146
|
+
|
|
147
|
+
# Optional: share the L2 cache across replicas.
|
|
148
|
+
QASE_MCP_REDIS_URL=redis://host:6379
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`QASE_MCP_REQUEST_STATE_KEY` is what makes a confirmation survive the trip through the client. The
|
|
152
|
+
server asks, the client answers, and the answer comes back carrying server-minted state that is
|
|
153
|
+
verified before anything is deleted. Without a shared key each replica generates its own at startup,
|
|
154
|
+
so a confirmation minted by one replica fails verification on another and the deletion is refused —
|
|
155
|
+
safe, but destructive tools stop working. A single replica needs nothing set.
|
|
156
|
+
|
|
157
|
+
`QASE_MCP_REDIS_URL` is optional: it shares the response cache between replicas so a repeated read is served from Valkey rather than from Qase again.
|
|
158
|
+
|
|
159
|
+
Upgrading an existing deployment from 2.x? See [2.x → 3.0.0](migration.md#2x--300) for sticky sessions, health probes and the removed `QASE_MCP_SESSION_TTL_MINUTES`.
|
|
160
|
+
|
|
161
|
+
## Monitoring
|
|
162
|
+
|
|
163
|
+
When using SSE or Streamable HTTP transport, a Prometheus-compatible `/metrics` endpoint is available:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
curl http://localhost:3000/metrics
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Metrics include:
|
|
170
|
+
- `qase_mcp_cache_hits_total` / `qase_mcp_cache_misses_total` - Cache hit/miss rates by tier (l1/l2)
|
|
171
|
+
- `qase_mcp_cache_errors_total` - Cache errors by tier
|
|
172
|
+
- `qase_mcp_circuit_breaker_state` - Redis circuit breaker state (0=closed, 1=half_open, 2=open)
|
|
173
|
+
- `qase_mcp_requests_total` - Requests served, labelled by `protocol` (the revision the client
|
|
174
|
+
negotiated, e.g. `2026-07-28`, or `legacy` for 2025-11-25) and `client` (the client's own name).
|
|
175
|
+
This is what tells you whether anyone still needs the older protocol revision before it is
|
|
176
|
+
dropped. A 2025-era client reaches a stateless HTTP request without ever identifying itself, so
|
|
177
|
+
it is counted as `client="unknown"`; on stdio and SSE the name comes from the connection's
|
|
178
|
+
`initialize`. The number of distinct client names is capped at 20 per process — the label comes
|
|
179
|
+
from the wire, and past the cap everything new is counted as `client="other"`.
|
|
180
|
+
- `qase_mcp_tool_calls_total` - Tool calls by tool name
|
|
181
|
+
|
|
182
|
+
## Troubleshooting
|
|
183
|
+
|
|
184
|
+
Server not starting, authentication errors, or connection issues? See [Troubleshooting](troubleshooting.md).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Building on top of the server
|
|
2
|
+
|
|
3
|
+
For **integration authors** only: anyone building a product that drives this server, such as a plugin, an agent or a wrapper CLI. If you use the server directly, nothing here applies to you; see [Run the Qase MCP server yourself](self-run.md) or [Connect to the hosted Qase MCP](connect.md).
|
|
4
|
+
|
|
5
|
+
## Integration marker
|
|
6
|
+
|
|
7
|
+
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:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# <name>/<version> — the version is optional
|
|
11
|
+
QASE_MCP_INTEGRATION=quality-supervisor/1.4.0
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
Rules:
|
|
17
|
+
|
|
18
|
+
- Format is `<name>/<version>`; the version may be omitted. The name is lowercased.
|
|
19
|
+
- 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.
|
|
20
|
+
- **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.
|
|
21
|
+
- A malformed or unlisted marker is dropped silently; the API call itself still succeeds.
|
|
22
|
+
|
|
23
|
+
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. The query parameter is the fallback for clients that do not pass custom headers through.
|
|
24
|
+
|
|
25
|
+
On **Streamable HTTP**, the marker is read fresh on every single request: a marker on one call is never attributed to the next. Precedence: request header → query parameter → `QASE_MCP_INTEGRATION`.
|
|
26
|
+
|
|
27
|
+
On the (deprecated) **SSE** transport, the marker is captured once, when the `/sse` stream opens, and reused for every message posted on that stream afterwards — a header sent on an individual `/messages` POST can still override it for that one call, but there is no per-request query-parameter fallback once the stream is open. Precedence there is: request header → the value captured when the stream opened → `QASE_MCP_INTEGRATION`.
|
|
28
|
+
|
|
29
|
+
For the HTTP transports themselves, see [Host a shared Qase MCP server](hosting.md).
|
package/docs/self-run.md
CHANGED
|
@@ -1,175 +1,128 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Run the Qase MCP server yourself
|
|
2
2
|
|
|
3
|
-
Run the Qase MCP
|
|
3
|
+
Run the Qase MCP server on your own computer, with your own Qase API token. Your AI tool starts the server for you in the background, so there is nothing to keep running. Setup takes about five minutes and works on every Qase plan, in both regions, and on dedicated instances.
|
|
4
4
|
|
|
5
|
-
Prefer
|
|
5
|
+
> **Prefer no setup at all?** On any paid plan you can connect to the hosted Qase MCP instead: no install and no token, just a Qase sign-in. See [Connect to the hosted Qase MCP](connect.md). Self-run is the way in on the Free plan and on dedicated instances, and for setups without a browser to sign in from.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**On this page**
|
|
8
8
|
|
|
9
|
-
- Node.js
|
|
10
|
-
-
|
|
9
|
+
1. [Before you start](#before-you-start): check Node.js, create a token, note your region
|
|
10
|
+
2. [Pick your tool](#pick-your-tool): steps for Claude Desktop, Claude Code, Cursor, Codex and OpenCode
|
|
11
|
+
3. [Check it works](#check-it-works)
|
|
12
|
+
4. [Troubleshooting](#troubleshooting)
|
|
11
13
|
|
|
12
|
-
##
|
|
14
|
+
## Before you start
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
Do these three things once, whichever tool you use.
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
npm install -g @qase/mcp-server
|
|
18
|
-
```
|
|
18
|
+
### 1. Check that Node.js 20 or newer is installed
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
The server runs on Node.js. Open a terminal (macOS: Terminal; Windows: PowerShell) and run:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
24
|
-
git clone https://github.com/qase-tms/qase-mcp-server.git
|
|
25
|
-
cd qase-mcp-server
|
|
26
|
-
|
|
27
|
-
# Install dependencies
|
|
28
|
-
npm install
|
|
29
|
-
|
|
30
|
-
# Build the server
|
|
31
|
-
npm run build
|
|
23
|
+
node -v
|
|
32
24
|
```
|
|
33
25
|
|
|
34
|
-
|
|
26
|
+
If it prints `v20` or higher, you're set. If it prints an error or a lower version, install the LTS release from [nodejs.org](https://nodejs.org), then open a new terminal and check again.
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
You do not need to install the Qase package itself. Every setup below uses `npx -y @qase/mcp-server`, which downloads the server the first time your tool starts it and reuses it afterwards.
|
|
37
29
|
|
|
38
|
-
Create a
|
|
30
|
+
### 2. Create a Qase API token
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
# Required: Your Qase API token
|
|
42
|
-
QASE_API_TOKEN=your_api_token_here
|
|
32
|
+
Sign in to Qase and open the API token page for your region:
|
|
43
33
|
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
- Main cloud: <https://app.qase.io/user/api/token>
|
|
35
|
+
- EU cluster: <https://app-eu.qase.io/user/api/token>
|
|
46
36
|
|
|
47
|
-
|
|
48
|
-
QASE_API_PROTOCOL=https
|
|
49
|
-
```
|
|
37
|
+
Create a token and keep it somewhere safe. Treat it like a password: don't paste it into chats or tickets, and don't commit it to Git.
|
|
50
38
|
|
|
51
|
-
|
|
39
|
+
### 3. Note your Qase region
|
|
52
40
|
|
|
53
|
-
|
|
41
|
+
Look at your browser's address bar while you're signed in to Qase:
|
|
54
42
|
|
|
55
|
-
|
|
43
|
+
| You see | What to add to your setup |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `app.qase.io` | Nothing. This is the default. |
|
|
46
|
+
| `app-eu.qase.io` | `QASE_API_DOMAIN` set to `api-eu.qase.io` |
|
|
47
|
+
| Your company's own Qase address (dedicated instance) | `QASE_API_DOMAIN` set to your API domain, for example `api-yourcompany.qase.io`. Ask your Qase admin if you're unsure. |
|
|
56
48
|
|
|
57
|
-
|
|
49
|
+
You don't write this anywhere yet. Each tool's section below shows where the line goes, right next to your token. A token is only valid in the region that created it, so create the token in the same workspace you point `QASE_API_DOMAIN` at.
|
|
58
50
|
|
|
59
|
-
|
|
60
|
-
# <name>/<version> — the version is optional
|
|
61
|
-
QASE_MCP_INTEGRATION=quality-supervisor/1.4.0
|
|
62
|
-
```
|
|
51
|
+
## Pick your tool
|
|
63
52
|
|
|
64
|
-
|
|
53
|
+
Jump to the section for the tool you'll use Qase from. Each one ends with a quick test.
|
|
65
54
|
|
|
66
|
-
|
|
55
|
+
| Your tool | How you set it up |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| [Claude Desktop](#claude-desktop) | Paste a block into a settings file |
|
|
58
|
+
| [Claude Code](#claude-code) | Run one terminal command |
|
|
59
|
+
| [Cursor](#cursor) | Paste a block into a settings file |
|
|
60
|
+
| [OpenAI Codex](#openai-codex) (CLI and IDE extension) | Run one terminal command |
|
|
61
|
+
| [OpenCode](#opencode) | Paste a block into a settings file |
|
|
62
|
+
| [Another MCP client](#other-mcp-clients) | Use the same three values |
|
|
67
63
|
|
|
68
|
-
|
|
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.
|
|
64
|
+
In every block, replace `your_api_token_here` with your token and keep the quotes around it.
|
|
72
65
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
On **Streamable HTTP**, the marker is read fresh on every single request: a marker on one call is never attributed to the next. Precedence: request header → query parameter → `QASE_MCP_INTEGRATION`.
|
|
76
|
-
|
|
77
|
-
On the (deprecated) **SSE** transport, the marker is captured once, when the `/sse` stream opens, and reused for every message posted on that stream afterwards — a header sent on an individual `/messages` POST can still override it for that one call, but there is no per-request query-parameter fallback once the stream is open. Precedence there is: request header → the value captured when the stream opened → `QASE_MCP_INTEGRATION`.
|
|
78
|
-
|
|
79
|
-
### Running more than one replica
|
|
80
|
-
|
|
81
|
-
Two pieces of state used to live inside a single process. From 3.0.0 both can be shared, and on a
|
|
82
|
-
multi-replica deployment both **must** be, because there are no sessions any more — consecutive
|
|
83
|
-
requests from the same client land on whichever replica the load balancer picks.
|
|
66
|
+
### Claude Desktop
|
|
84
67
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
68
|
+
1. **Open the settings file.** In Claude Desktop, go to **Settings → Developer → Edit Config**. This opens `claude_desktop_config.json`, creating it if needed. Its location:
|
|
69
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
70
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
71
|
+
2. **Paste the Qase setup.** If the file is empty or only contains `{}`, replace everything with:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"qase": {
|
|
77
|
+
"command": "npx",
|
|
78
|
+
"args": ["-y", "@qase/mcp-server"],
|
|
79
|
+
"env": {
|
|
80
|
+
"QASE_API_TOKEN": "your_api_token_here"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If the file already lists other servers, add only the `"qase": { ... }` entry inside the existing `mcpServers`, with a comma between it and the server before it.
|
|
88
|
+
3. **Save the file and restart Claude Desktop completely.** On macOS press Cmd+Q; on Windows right-click the tray icon and choose **Quit**. Closing the window is not enough, because the file is only read at startup.
|
|
89
|
+
|
|
90
|
+
**EU region or custom domain:** add a second line inside `env`, after a comma:
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
```json
|
|
93
|
+
"env": {
|
|
94
|
+
"QASE_API_TOKEN": "your_api_token_here",
|
|
95
|
+
"QASE_API_DOMAIN": "api-eu.qase.io"
|
|
96
|
+
}
|
|
92
97
|
```
|
|
93
98
|
|
|
94
|
-
|
|
95
|
-
server asks, the client answers, and the answer comes back carrying server-minted state that is
|
|
96
|
-
verified before anything is deleted. Without a shared key each replica generates its own at startup,
|
|
97
|
-
so a confirmation minted by one replica fails verification on another and the deletion is refused —
|
|
98
|
-
safe, but destructive tools stop working. A single replica needs nothing set.
|
|
99
|
+
**Qase doesn't appear?** The most common cause is invalid JSON, usually a missing or extra comma. On macOS with Node.js installed through nvm, Claude Desktop may also not find `npx`: run `which npx` in Terminal and use that full path as `"command"`.
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
### Other Regions and Custom Domains
|
|
101
|
+
### Claude Code
|
|
103
102
|
|
|
104
|
-
|
|
103
|
+
Run one command, with your token in place of `your_api_token_here`:
|
|
105
104
|
|
|
106
105
|
```bash
|
|
107
|
-
|
|
108
|
-
QASE_API_DOMAIN=api-eu.qase.io
|
|
109
|
-
|
|
110
|
-
# Enterprise dedicated instance
|
|
111
|
-
QASE_API_DOMAIN=api-yourcompany.qase.io
|
|
106
|
+
claude mcp add qase --scope user --env QASE_API_TOKEN=your_api_token_here -- npx -y @qase/mcp-server
|
|
112
107
|
```
|
|
113
108
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
`QASE_API_DOMAIN` takes the domain only — no scheme, no path. `https://api-eu.qase.io` or `api-eu.qase.io/v1` are rejected with an error.
|
|
117
|
-
|
|
118
|
-
Both Qase clouds also offer a hosted connector, so self-run is a choice there rather than a requirement — see [Pick your endpoint](connect.md#pick-your-endpoint). On a **dedicated instance** self-run is the only option: the hosted servers serve Qase's own clouds only, regardless of plan.
|
|
119
|
-
|
|
120
|
-
### Self-Hosted Deployments over Plain HTTP
|
|
121
|
-
|
|
122
|
-
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:
|
|
109
|
+
**EU region or custom domain:** add a second `--env`:
|
|
123
110
|
|
|
124
111
|
```bash
|
|
125
|
-
QASE_API_DOMAIN=api.qase.
|
|
126
|
-
QASE_API_PROTOCOL=http
|
|
112
|
+
claude mcp add qase --scope user --env QASE_API_TOKEN=your_api_token_here --env QASE_API_DOMAIN=api-eu.qase.io -- npx -y @qase/mcp-server
|
|
127
113
|
```
|
|
128
114
|
|
|
129
|
-
|
|
115
|
+
Then run `claude mcp list` and check that `qase` is listed as connected.
|
|
130
116
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
## Security of network transports
|
|
117
|
+
The `--scope` flag decides where Qase is available:
|
|
134
118
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
119
|
+
| Scope | Where Qase is available | Use it when |
|
|
120
|
+
| --- | --- | --- |
|
|
121
|
+
| `--scope user` | Every project on your computer | You want Qase everywhere. Recommended. |
|
|
122
|
+
| none (local) | Only the project you ran the command in | You want Qase in one project only. |
|
|
123
|
+
| `--scope project` | Everyone who opens the project, via a `.mcp.json` file in its root | You want to share the setup with your team. See below. |
|
|
138
124
|
|
|
139
|
-
**
|
|
140
|
-
`Authorization: Bearer <token>`; the server does not fall back to its own
|
|
141
|
-
`QASE_API_TOKEN` when a request arrives without one. Sharing a single operator
|
|
142
|
-
token across a team is still fine — it just belongs in the client config:
|
|
143
|
-
|
|
144
|
-
```json
|
|
145
|
-
{
|
|
146
|
-
"mcpServers": {
|
|
147
|
-
"qase": {
|
|
148
|
-
"url": "http://your-host:3000/mcp",
|
|
149
|
-
"headers": { "Authorization": "Bearer YOUR_QASE_API_TOKEN" }
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**Bind deliberately.** `--host` defaults to `0.0.0.0`, which accepts connections
|
|
156
|
-
from anywhere that can route to the machine. Pass `--host 127.0.0.1` unless the
|
|
157
|
-
server is meant to be reachable from the network, and keep OAuth on
|
|
158
|
-
(`QASE_OAUTH_ENABLED` defaults to enabled) unless you have a specific reason to
|
|
159
|
-
turn it off.
|
|
160
|
-
|
|
161
|
-
OAuth applies to `streamable-http` only: on `--transport sse` a token is
|
|
162
|
-
required but not validated by the server — any non-empty value passes, and a
|
|
163
|
-
bad one only fails later when the Qase API rejects it.
|
|
164
|
-
|
|
165
|
-
## Client Setup (stdio)
|
|
166
|
-
|
|
167
|
-
### Claude Desktop
|
|
168
|
-
|
|
169
|
-
Add to your Claude Desktop configuration file:
|
|
170
|
-
|
|
171
|
-
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
172
|
-
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
|
|
125
|
+
**Sharing the setup through `.mcp.json`:** that file is meant to be committed, so never put a token in it. Reference an environment variable instead, and have each person set `QASE_API_TOKEN` in their own shell:
|
|
173
126
|
|
|
174
127
|
```json
|
|
175
128
|
{
|
|
@@ -178,218 +131,181 @@ Add to your Claude Desktop configuration file:
|
|
|
178
131
|
"command": "npx",
|
|
179
132
|
"args": ["-y", "@qase/mcp-server"],
|
|
180
133
|
"env": {
|
|
181
|
-
"QASE_API_TOKEN": "
|
|
134
|
+
"QASE_API_TOKEN": "${QASE_API_TOKEN}"
|
|
182
135
|
}
|
|
183
136
|
}
|
|
184
137
|
}
|
|
185
138
|
}
|
|
186
139
|
```
|
|
187
140
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
```json
|
|
191
|
-
{
|
|
192
|
-
"mcpServers": {
|
|
193
|
-
"qase": {
|
|
194
|
-
"command": "node",
|
|
195
|
-
"args": ["/absolute/path/to/qase-mcp-server/build/index.js"],
|
|
196
|
-
"env": {
|
|
197
|
-
"QASE_API_TOKEN": "your_api_token_here"
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
```
|
|
141
|
+
**Changing the token later:** run `claude mcp remove qase`, then run the add command again.
|
|
203
142
|
|
|
204
143
|
### Cursor
|
|
205
144
|
|
|
206
|
-
|
|
145
|
+
1. **Open Cursor's MCP settings file.** Use the global file, so Qase works in every project:
|
|
146
|
+
- macOS / Linux: `~/.cursor/mcp.json`
|
|
147
|
+
- Windows: `%USERPROFILE%\.cursor\mcp.json`
|
|
207
148
|
|
|
208
|
-
|
|
149
|
+
Create it if it doesn't exist. You can also reach it from **Cursor Settings → Tools & MCP**.
|
|
150
|
+
2. **Paste the Qase setup.** If the file already lists other servers, add only the `"qase": { ... }` entry inside `mcpServers`.
|
|
209
151
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"mcpServers": {
|
|
155
|
+
"qase": {
|
|
156
|
+
"command": "npx",
|
|
157
|
+
"args": ["-y", "@qase/mcp-server"],
|
|
158
|
+
"env": {
|
|
159
|
+
"QASE_API_TOKEN": "your_api_token_here"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
3. **Save the file and restart Cursor.**
|
|
213
166
|
|
|
214
|
-
|
|
215
|
-
{
|
|
216
|
-
"mcpServers": {
|
|
217
|
-
"qase": {
|
|
218
|
-
"command": "npx",
|
|
219
|
-
"args": ["-y", "@qase/mcp-server"],
|
|
220
|
-
"env": {
|
|
221
|
-
"QASE_API_TOKEN": "your_api_token_here"
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
```
|
|
167
|
+
**EU region or custom domain:** add `"QASE_API_DOMAIN": "api-eu.qase.io"` inside `env`, after the token line and a comma.
|
|
227
168
|
|
|
228
|
-
|
|
169
|
+
Cursor also reads a project-level `.cursor/mcp.json`. Keep your token out of it if the project is committed to Git.
|
|
229
170
|
|
|
230
|
-
|
|
171
|
+
### OpenAI Codex
|
|
172
|
+
|
|
173
|
+
The Codex CLI and the Codex IDE extension share one configuration, so you set this up once for both. Run:
|
|
231
174
|
|
|
232
175
|
```bash
|
|
233
|
-
|
|
176
|
+
codex mcp add qase --env QASE_API_TOKEN=your_api_token_here -- npx -y @qase/mcp-server
|
|
234
177
|
```
|
|
235
178
|
|
|
236
|
-
|
|
179
|
+
**EU region or custom domain:** add a second `--env`:
|
|
237
180
|
|
|
238
181
|
```bash
|
|
239
|
-
|
|
182
|
+
codex mcp add qase --env QASE_API_TOKEN=your_api_token_here --env QASE_API_DOMAIN=api-eu.qase.io -- npx -y @qase/mcp-server
|
|
240
183
|
```
|
|
241
184
|
|
|
242
|
-
|
|
185
|
+
Then run `codex mcp list` and check that `qase` is listed. Inside Codex, `/mcp` shows the active servers.
|
|
243
186
|
|
|
244
|
-
|
|
245
|
-
{
|
|
246
|
-
"mcpServers": {
|
|
247
|
-
"qase": {
|
|
248
|
-
"command": "npx",
|
|
249
|
-
"args": ["-y", "@qase/mcp-server"],
|
|
250
|
-
"env": {
|
|
251
|
-
"QASE_API_TOKEN": "your_api_token_here"
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
You can also use the `--scope` flag to choose where the configuration is stored:
|
|
187
|
+
**Prefer editing the file?** Codex keeps its settings in `~/.codex/config.toml`. It is TOML, not JSON, so the format differs from the other tools:
|
|
259
188
|
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
|
|
189
|
+
```toml
|
|
190
|
+
[mcp_servers.qase]
|
|
191
|
+
command = "npx"
|
|
192
|
+
args = ["-y", "@qase/mcp-server"]
|
|
263
193
|
|
|
264
|
-
|
|
265
|
-
|
|
194
|
+
[mcp_servers.qase.env]
|
|
195
|
+
QASE_API_TOKEN = "your_api_token_here"
|
|
196
|
+
# QASE_API_DOMAIN = "api-eu.qase.io" # EU region or custom domain only
|
|
266
197
|
```
|
|
267
198
|
|
|
268
|
-
|
|
199
|
+
- The table name is `mcp_servers`, with an underscore. `mcpServers` is not read here.
|
|
200
|
+
- TOML uses `=` rather than `:`, and has no trailing commas.
|
|
201
|
+
- A trusted project can have its own `.codex/config.toml`. Keep your token out of it if the project is committed to Git.
|
|
269
202
|
|
|
270
|
-
|
|
203
|
+
### OpenCode
|
|
271
204
|
|
|
272
|
-
|
|
273
|
-
{
|
|
274
|
-
"mcpServers": {
|
|
275
|
-
"qase": {
|
|
276
|
-
"command": "npx",
|
|
277
|
-
"args": ["-y", "@qase/mcp-server"],
|
|
278
|
-
"env": {
|
|
279
|
-
"QASE_API_TOKEN": "your_api_token_here"
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
```
|
|
205
|
+
1. **Open OpenCode's config file.** Use the global file, so Qase works in every project: `~/.config/opencode/opencode.json`. Create it if it doesn't exist.
|
|
206
|
+
2. **Paste the Qase setup.** If the file already has an `mcp` section, add only the `"qase": { ... }` entry inside it.
|
|
285
207
|
|
|
286
|
-
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"mcp": {
|
|
211
|
+
"qase": {
|
|
212
|
+
"type": "local",
|
|
213
|
+
"command": ["npx", "-y", "@qase/mcp-server"],
|
|
214
|
+
"environment": {
|
|
215
|
+
"QASE_API_TOKEN": "your_api_token_here"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
3. **Save the file and restart OpenCode.**
|
|
287
222
|
|
|
288
|
-
|
|
289
|
-
export QASE_API_TOKEN=your_api_token_here
|
|
290
|
-
```
|
|
223
|
+
**EU region or custom domain:** add `"QASE_API_DOMAIN": "api-eu.qase.io"` inside `environment`, after the token line and a comma.
|
|
291
224
|
|
|
292
|
-
|
|
225
|
+
> **Note:** OpenCode uses a different format from other MCP clients. Servers sit under `mcp` (not `mcpServers`), the command and its arguments form one `command` array, and settings go under `environment` (not `env`). Copying another tool's block won't work here.
|
|
293
226
|
|
|
294
|
-
|
|
227
|
+
OpenCode also reads an `opencode.json` in a project's root folder. Keep your token out of it if the project is committed to Git.
|
|
295
228
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
"QASE_API_TOKEN": "your_api_token_here"
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
```
|
|
229
|
+
### Other MCP clients
|
|
230
|
+
|
|
231
|
+
Any client that can start a local (stdio) MCP server works. Give it:
|
|
232
|
+
|
|
233
|
+
- **Command:** `npx`
|
|
234
|
+
- **Arguments:** `-y`, `@qase/mcp-server`
|
|
235
|
+
- **Environment variable:** `QASE_API_TOKEN` set to your token, plus `QASE_API_DOMAIN` if your region needs one
|
|
309
236
|
|
|
310
|
-
|
|
237
|
+
Most clients accept the same JSON block as [Claude Desktop](#claude-desktop).
|
|
311
238
|
|
|
312
|
-
##
|
|
239
|
+
## Advanced settings
|
|
313
240
|
|
|
314
|
-
|
|
241
|
+
These are environment variables, set in the same place as your token.
|
|
315
242
|
|
|
316
|
-
###
|
|
243
|
+
### Other regions and custom domains
|
|
317
244
|
|
|
318
|
-
|
|
245
|
+
`QASE_API_DOMAIN` defaults to `api.qase.io`, which is Qase's main cloud. Point it elsewhere when your workspace is not there:
|
|
319
246
|
|
|
320
247
|
```bash
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
248
|
+
# EU cluster: workspaces on app-eu.qase.io
|
|
249
|
+
QASE_API_DOMAIN=api-eu.qase.io
|
|
250
|
+
|
|
251
|
+
# Enterprise dedicated instance
|
|
252
|
+
QASE_API_DOMAIN=api-yourcompany.qase.io
|
|
324
253
|
```
|
|
325
254
|
|
|
326
|
-
|
|
255
|
+
`QASE_API_DOMAIN` takes the domain only, with no scheme and no path. `https://api-eu.qase.io` and `api-eu.qase.io/v1` are rejected with an error. A non-default port does belong in it: `api-yourcompany.qase.io:8080`.
|
|
256
|
+
|
|
257
|
+
Both Qase clouds also offer a hosted connector, so self-run is a choice there rather than a requirement. See [Pick your endpoint](connect.md#pick-your-endpoint). On a **dedicated instance**, self-run is the only option: the hosted servers serve Qase's own clouds only, regardless of plan.
|
|
327
258
|
|
|
328
|
-
|
|
329
|
-
> 2025-03-26 and will be removed in a future release. Use
|
|
330
|
-
> `--transport streamable-http` instead.
|
|
259
|
+
### Self-hosted deployments over plain HTTP
|
|
331
260
|
|
|
332
|
-
|
|
261
|
+
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:
|
|
333
262
|
|
|
334
263
|
```bash
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
# Health check: http://localhost:3000/health
|
|
338
|
-
# Metrics: http://localhost:3000/metrics
|
|
264
|
+
QASE_API_DOMAIN=api.qase.lo
|
|
265
|
+
QASE_API_PROTOCOL=http
|
|
339
266
|
```
|
|
340
267
|
|
|
341
|
-
|
|
268
|
+
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.
|
|
342
269
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
Full HTTP-based transport — there is no session; every request is served on its own:
|
|
270
|
+
Use `http` only for deployments you control on a trusted network: the API token travels in a request header, unencrypted, on every call.
|
|
346
271
|
|
|
347
|
-
|
|
348
|
-
npm run start:http
|
|
349
|
-
# Server runs on http://localhost:3000/mcp
|
|
350
|
-
# Health check: http://localhost:3000/health
|
|
351
|
-
# Metrics: http://localhost:3000/metrics
|
|
352
|
-
```
|
|
272
|
+
### Corporate networks that inspect traffic
|
|
353
273
|
|
|
354
|
-
|
|
274
|
+
If the server fails with `unable to get local issuer certificate`, your network replaces certificates on the way out. Point Node.js at your company's CA certificate with `NODE_EXTRA_CA_CERTS`, next to your token. See [SSL Certificate Errors](troubleshooting.md#ssl-certificate-errors).
|
|
355
275
|
|
|
356
|
-
|
|
276
|
+
### Installing the package globally
|
|
357
277
|
|
|
358
|
-
|
|
278
|
+
Not needed for any setup on this page. If you'd rather install once instead of letting `npx` fetch the package:
|
|
359
279
|
|
|
360
280
|
```bash
|
|
361
|
-
|
|
362
|
-
node build/index.js --transport streamable-http --port 8080 --host 0.0.0.0
|
|
363
|
-
|
|
364
|
-
# Available options:
|
|
365
|
-
# --transport: stdio | sse | streamable-http (default: stdio)
|
|
366
|
-
# --port: Port number (default: 3000)
|
|
367
|
-
# --host: Host address (default: 0.0.0.0)
|
|
281
|
+
npm install -g @qase/mcp-server
|
|
368
282
|
```
|
|
369
283
|
|
|
370
|
-
|
|
284
|
+
Then use `qase-mcp-server` as the command in your client configuration, with no arguments, and update it with `npm update -g @qase/mcp-server`.
|
|
371
285
|
|
|
372
|
-
|
|
286
|
+
## Check it works
|
|
373
287
|
|
|
374
|
-
|
|
375
|
-
curl http://localhost:3000/metrics
|
|
376
|
-
```
|
|
288
|
+
Start a new chat in your tool and ask:
|
|
377
289
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
- `qase_mcp_circuit_breaker_state` - Redis circuit breaker state (0=closed, 1=half_open, 2=open)
|
|
382
|
-
- `qase_mcp_requests_total` - Requests served, labelled by `protocol` (the revision the client
|
|
383
|
-
negotiated, e.g. `2026-07-28`, or `legacy` for 2025-11-25) and `client` (the client's own name).
|
|
384
|
-
This is what tells you whether anyone still needs the older protocol revision before it is
|
|
385
|
-
dropped. A 2025-era client reaches a stateless HTTP request without ever identifying itself, so
|
|
386
|
-
it is counted as `client="unknown"`; on stdio and SSE the name comes from the connection's
|
|
387
|
-
`initialize`. The number of distinct client names is capped at 20 per process — the label comes
|
|
388
|
-
from the wire, and past the cap everything new is counted as `client="other"`.
|
|
389
|
-
- `qase_mcp_tool_calls_total` - Tool calls by tool name
|
|
390
|
-
|
|
391
|
-
> **Note:** This page covers running the server yourself with your own `QASE_API_TOKEN` (self-run). It does not cover operating the hosted OAuth proxy — that is internal operator documentation, not part of this guide.
|
|
290
|
+
> List my Qase projects.
|
|
291
|
+
|
|
292
|
+
Your tool may ask permission to use a Qase tool the first time. If your projects come back, you're done.
|
|
392
293
|
|
|
393
294
|
## Troubleshooting
|
|
394
295
|
|
|
395
|
-
|
|
296
|
+
| What you see | What to do |
|
|
297
|
+
| --- | --- |
|
|
298
|
+
| Qase doesn't appear in your tool at all | Check the configuration for a missing comma, save, and fully restart the tool. Run `node -v` to confirm Node.js 20 or newer. |
|
|
299
|
+
| `Authentication failed: Please check your QASE_API_TOKEN` | Copy the token again and remove any extra spaces or quotes. Make sure it was created in the same region as your `QASE_API_DOMAIN`. |
|
|
300
|
+
| `Network error` or `ECONNREFUSED` | Check `QASE_API_DOMAIN`: domain only, no `https://`. On the main cloud, remove the line entirely. |
|
|
301
|
+
| `unable to get local issuer certificate` | Your network inspects traffic. See [SSL Certificate Errors](troubleshooting.md#ssl-certificate-errors). |
|
|
302
|
+
| `npx` not found (macOS, Node.js installed with nvm) | Run `which npx` in Terminal and use that full path as the command. |
|
|
303
|
+
| `Unknown tool` | You may be on an older cached version. See [Tool Not Found](troubleshooting.md#tool-not-found). |
|
|
304
|
+
|
|
305
|
+
More issues and fixes: [Troubleshooting](troubleshooting.md).
|
|
306
|
+
|
|
307
|
+
## Going further
|
|
308
|
+
|
|
309
|
+
- **Running one server for a team, behind a URL** (Streamable HTTP, several replicas, metrics): [Host a shared server](hosting.md)
|
|
310
|
+
- **Building a plugin, agent or wrapper on top of the server:** [Building on top of the server](integrations.md)
|
|
311
|
+
- **Changing the server's code or running it from source:** [CONTRIBUTING.md](../CONTRIBUTING.md)
|
package/docs/troubleshooting.md
CHANGED
|
@@ -212,7 +212,7 @@ Only `http` and `https` are recognised; any other value falls back to `https`, s
|
|
|
212
212
|
|
|
213
213
|
1. Check that your client supports confirmation prompts (MCP elicitation) and that none of its settings suppress them. A client that never declares the capability gets a refusal saying so instead of a prompt
|
|
214
214
|
2. If the prompt appears but times out, answer it sooner — a confirmation stays answerable for 10 minutes, and an unanswered one refuses the call
|
|
215
|
-
3. Running more than one replica, self-hosted? Set `QASE_MCP_REQUEST_STATE_KEY` to the same value on all of them — see [
|
|
215
|
+
3. Running more than one replica, self-hosted? Set `QASE_MCP_REQUEST_STATE_KEY` to the same value on all of them — see [hosting.md](hosting.md#running-more-than-one-replica). Without it the answer is verified by a different replica than the one that asked, and the deletion is refused
|
|
216
216
|
4. Either way nothing was deleted. Retry and answer the prompt, or delete it in the Qase UI
|
|
217
217
|
|
|
218
218
|
## Tool Not Found
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -4,16 +4,23 @@
|
|
|
4
4
|
"title": "Qase Test Management",
|
|
5
5
|
"description": "Official MCP server for Qase — manage test cases, runs, suites, defects via AI tools.",
|
|
6
6
|
"websiteUrl": "https://qase.io",
|
|
7
|
+
"icons": [
|
|
8
|
+
{
|
|
9
|
+
"src": "https://raw.githubusercontent.com/qase-tms/qase-mcp-server/main/icon.png",
|
|
10
|
+
"mimeType": "image/png",
|
|
11
|
+
"sizes": ["512x512"]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
7
14
|
"repository": {
|
|
8
15
|
"url": "https://github.com/qase-tms/qase-mcp-server",
|
|
9
16
|
"source": "github"
|
|
10
17
|
},
|
|
11
|
-
"version": "3.0.
|
|
18
|
+
"version": "3.0.6",
|
|
12
19
|
"packages": [
|
|
13
20
|
{
|
|
14
21
|
"registryType": "npm",
|
|
15
22
|
"identifier": "@qase/mcp-server",
|
|
16
|
-
"version": "3.0.
|
|
23
|
+
"version": "3.0.6",
|
|
17
24
|
"transport": {
|
|
18
25
|
"type": "stdio"
|
|
19
26
|
},
|