@qase/mcp-server 3.0.3 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- # Self-Run Guide (Local / stdio)
1
+ # Run the Qase MCP server yourself
2
2
 
3
- Run the Qase MCP Server yourself, using your own `QASE_API_TOKEN`. This is the local/stdio path: you install the package (or build from source) and your MCP client launches it as a subprocess.
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 zero-install? Connect to the Qase-hosted MCP server instead — no local setup, no API token. See [Connect to the hosted Qase MCP](connect.md).
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
- ## Prerequisites
7
+ **On this page**
8
8
 
9
- - Node.js 20+
10
- - Qase account with API token ([Get your token](https://app.qase.io/user/api/token))
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
- ## Installation
14
+ ## Before you start
13
15
 
14
- ### Option 1: Install from NPM (Recommended)
16
+ Do these three things once, whichever tool you use.
15
17
 
16
- ```bash
17
- npm install -g @qase/mcp-server
18
- ```
18
+ ### 1. Check that Node.js 20 or newer is installed
19
19
 
20
- ### Option 2: Install from Source (Development)
20
+ The server runs on Node.js. Open a terminal (macOS: Terminal; Windows: PowerShell) and run:
21
21
 
22
22
  ```bash
23
- # Clone the repository
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
- ## Configuration
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
- ### Environment Variables
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 `.env` file or set environment variables:
30
+ ### 2. Create a Qase API token
39
31
 
40
- ```bash
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
- # Optional: Custom API domain for enterprise customers
45
- QASE_API_DOMAIN=api.qase.io
34
+ - Main cloud: <https://app.qase.io/user/api/token>
35
+ - EU cluster: <https://app-eu.qase.io/user/api/token>
46
36
 
47
- # Optional: Scheme used to reach that domain — http or https (default: https)
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
- Get your API token from: https://app.qase.io/user/api/token
39
+ ### 3. Note your Qase region
52
40
 
53
- ### Integration Marker (for integration authors)
41
+ Look at your browser's address bar while you're signed in to Qase:
54
42
 
55
- Skip this section if you are using the server directly — it changes nothing for you.
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
- 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:
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
- ```bash
60
- # <name>/<version> — the version is optional
61
- QASE_MCP_INTEGRATION=quality-supervisor/1.4.0
62
- ```
51
+ ## Pick your tool
63
52
 
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.
53
+ Jump to the section for the tool you'll use Qase from. Each one ends with a quick test.
65
54
 
66
- Rules:
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
- - 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.
64
+ In every block, replace `your_api_token_here` with your token and keep the quotes around it.
72
65
 
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. The query parameter is the fallback for clients that do not pass custom headers through.
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
- ```bash
86
- # Required when running more than one replica: the HMAC key that signs a pending
87
- # destructive-action confirmation. At least 32 bytes, identical on every replica.
88
- QASE_MCP_REQUEST_STATE_KEY=<a shared random string of 32+ bytes>
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
- # Optional: share the L2 cache across replicas.
91
- QASE_MCP_REDIS_URL=redis://host:6379
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
- `QASE_MCP_REQUEST_STATE_KEY` is what makes a confirmation survive the trip through the client. The
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
- `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.
101
-
102
- ### Other Regions and Custom Domains
101
+ ### Claude Code
103
102
 
104
- `QASE_API_DOMAIN` defaults to `api.qase.io`, which is Qase's main cloud. Point it elsewhere when your workspace is not there:
103
+ Run one command, with your token in place of `your_api_token_here`:
105
104
 
106
105
  ```bash
107
- # EU cluster — workspaces on app-eu.qase.io
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
- Issue the token from the workspace you are naming: a token is valid only in the region that minted it, and one from the main cloud will be rejected by the EU API. The EU token page is <https://app-eu.qase.io/user/api/token>.
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.lo
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
- 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`.
115
+ Then run `claude mcp list` and check that `qase` is listed as connected.
130
116
 
131
- Use `http` only for deployments you control on a trusted network: the API token travels in a request header, unencrypted, on every call.
132
-
133
- ## Security of network transports
117
+ The `--scope` flag decides where Qase is available:
134
118
 
135
- `stdio` has no network listener: the client starts the process and the token
136
- lives in the client's configuration. The `sse` and `streamable-http` transports
137
- listen on a port, and two things follow from that.
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
- **The client supplies the token.** Every request must carry
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": "your_api_token_here"
134
+ "QASE_API_TOKEN": "${QASE_API_TOKEN}"
182
135
  }
183
136
  }
184
137
  }
185
138
  }
186
139
  ```
187
140
 
188
- Or, if installed from source:
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
- > Prefer no install and no API token? Connect Cursor to the hosted server instead — see [Connect to the hosted Qase MCP](connect.md).
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
- To run the server locally with your own token:
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
- 1. Open Cursor Settings
211
- 2. Navigate to MCP settings
212
- 3. Add the Qase MCP server:
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
- ```json
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
- ### Claude Code
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
- You can add the Qase MCP server to Claude Code using the CLI command:
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
- claude mcp add qase -- npx -y @qase/mcp-server
176
+ codex mcp add qase --env QASE_API_TOKEN=your_api_token_here -- npx -y @qase/mcp-server
234
177
  ```
235
178
 
236
- Set the required environment variable:
179
+ **EU region or custom domain:** add a second `--env`:
237
180
 
238
181
  ```bash
239
- export QASE_API_TOKEN=your_api_token_here
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
- Alternatively, add a `.mcp.json` file to your project root for automatic project-scoped configuration:
185
+ Then run `codex mcp list` and check that `qase` is listed. Inside Codex, `/mcp` shows the active servers.
243
186
 
244
- ```json
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
- ```bash
261
- # Project-scoped (saved in .mcp.json)
262
- claude mcp add --scope project qase -- npx -y @qase/mcp-server
189
+ ```toml
190
+ [mcp_servers.qase]
191
+ command = "npx"
192
+ args = ["-y", "@qase/mcp-server"]
263
193
 
264
- # User-scoped (available in all projects)
265
- claude mcp add --scope user qase -- npx -y @qase/mcp-server
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
- ### OpenAI Codex CLI
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
- Add a `.codex/config.json` file to your project root:
203
+ ### OpenCode
271
204
 
272
- ```json
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
- Set the required environment variable before running Codex:
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
- ```bash
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
- ### OpenCode
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
- Add an `opencode.json` file to your project root (or `~/.config/opencode/opencode.json` for global configuration):
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
- ```json
297
- {
298
- "mcp": {
299
- "qase": {
300
- "type": "local",
301
- "command": ["npx", "-y", "@qase/mcp-server"],
302
- "environment": {
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
- > **Note:** OpenCode uses a different format from other MCP clients — the command and args are combined into a single `command` array, env vars go under `environment`, and servers are nested under `mcp` (not `mcpServers`).
237
+ Most clients accept the same JSON block as [Claude Desktop](#claude-desktop).
311
238
 
312
- ## Transports
239
+ ## Advanced settings
313
240
 
314
- The server supports multiple transport types for different use cases.
241
+ These are environment variables, set in the same place as your token.
315
242
 
316
- ### Stdio Transport (Default)
243
+ ### Other regions and custom domains
317
244
 
318
- Used by MCP clients like Claude Desktop and Cursor:
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
- npm start
322
- # or
323
- npm run start:stdio
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
- ### SSE Transport
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
- > **Deprecated.** The SSE transport was deprecated in the MCP specification on
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
- Server-Sent Events for web-based clients:
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
- npm run start:sse
336
- # Server runs on http://localhost:3000/sse
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
- Clients must send a bearer token — see [Security of network transports](#security-of-network-transports).
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
- ### Streamable HTTP Transport
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
- ```bash
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
- Clients must send a bearer token — see [Security of network transports](#security-of-network-transports).
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
- **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.
276
+ ### Installing the package globally
357
277
 
358
- ### Custom Configuration
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
- # Custom port and host
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
- ### Monitoring
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
- When using SSE or Streamable HTTP transport, a Prometheus-compatible `/metrics` endpoint is available:
286
+ ## Check it works
373
287
 
374
- ```bash
375
- curl http://localhost:3000/metrics
376
- ```
288
+ Start a new chat in your tool and ask:
377
289
 
378
- Metrics include:
379
- - `qase_mcp_cache_hits_total` / `qase_mcp_cache_misses_total` - Cache hit/miss rates by tier (l1/l2)
380
- - `qase_mcp_cache_errors_total` - Cache errors by tier
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
- Server not starting, authentication errors, or connection issues? See [Troubleshooting](troubleshooting.md).
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)
@@ -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 [self-run.md](self-run.md#environment-variables). Without it the answer is verified by a different replica than the one that asked, and the deletion is refused
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