@rui.branco/jira-mcp 1.7.5 → 1.7.7

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.
Files changed (3) hide show
  1. package/README.md +128 -10
  2. package/index.js +692 -112
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Jira MCP Server
2
2
 
3
- A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that brings Jira ticket context directly into Claude Code. Fetch complete ticket information including descriptions, comments, attachments, and linked Figma designs without leaving your development environment.
3
+ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that brings Jira ticket context directly into any MCP-compatible AI client — Claude Code, Codex CLI, Google's Antigravity (Gemini), Cursor, Windsurf, Zed, and others. Fetch complete ticket information including descriptions, comments, attachments, and linked Figma designs without leaving your development environment.
4
4
 
5
5
  ## Overview
6
6
 
@@ -9,7 +9,7 @@ When working on development tasks, context switching between Jira and your code
9
9
  - **Fetching complete ticket context** - Get descriptions, comments, status, and metadata instantly
10
10
  - **Downloading attachments** - Image attachments are downloaded and displayed inline
11
11
  - **Auto-fetching Figma designs** - Linked Figma URLs are automatically detected and exported as images
12
- - **Enabling natural queries** - Search tickets with JQL directly from Claude Code
12
+ - **Enabling natural queries** - Search tickets with JQL directly from your AI client
13
13
 
14
14
  ## Features
15
15
 
@@ -27,20 +27,44 @@ When working on development tasks, context switching between Jira and your code
27
27
  ### Prerequisites
28
28
 
29
29
  - Node.js 18+
30
- - [Claude Code](https://claude.ai/code) CLI
30
+ - An MCP-compatible AI client (see [Step 1](#step-1-register-with-your-mcp-client) below)
31
31
  - Jira Cloud account with API access
32
32
 
33
- ### Step 1: Add to Claude Code
33
+ ### Step 1: Register with your MCP client
34
+
35
+ Pick the snippet for your client. All of them launch the server over stdio.
36
+
37
+ **Claude Code:**
34
38
 
35
39
  ```bash
36
40
  claude mcp add --transport stdio jira -- npx -y @rui.branco/jira-mcp
37
41
  ```
38
42
 
43
+ **Codex CLI:** add to `~/.codex/config.toml`:
44
+
45
+ ```toml
46
+ [mcp_servers.jira]
47
+ command = "npx"
48
+ args = ["-y", "@rui.branco/jira-mcp"]
49
+ ```
50
+
51
+ **Google Antigravity / Gemini CLI:** add to `~/.gemini/settings.json`:
52
+
53
+ ```json
54
+ {
55
+ "mcpServers": {
56
+ "jira": { "command": "npx", "args": ["-y", "@rui.branco/jira-mcp"] }
57
+ }
58
+ }
59
+ ```
60
+
61
+ **Cursor, Windsurf, Zed, Cline, Continue, etc.:** add the same `command`/`args` pair to whatever JSON config that client uses for MCP servers (the exact path varies, but the shape is standard across clients).
62
+
39
63
  ### Step 2: Get Your Jira API Token
40
64
 
41
65
  1. Go to [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens)
42
66
  2. Click **"Create API token"**
43
- 3. Enter a label (e.g., "Claude Code MCP")
67
+ 3. Enter a label (e.g., "jira-mcp")
44
68
  4. Click **"Create"**
45
69
  5. Copy the token (you won't be able to see it again)
46
70
 
@@ -66,7 +90,7 @@ npx @rui.branco/jira-mcp setup
66
90
 
67
91
  ### Step 4: Verify
68
92
 
69
- Restart Claude Code and run `/mcp` to verify the server is connected.
93
+ Restart your AI client and check its MCP status (e.g. `/mcp` in Claude Code, `mcp` in Codex CLI, or the equivalent panel in your client) to verify the server is connected.
70
94
 
71
95
  ### Alternative: Manual Installation
72
96
 
@@ -78,7 +102,7 @@ cd ~/.config/jira-mcp && npm install
78
102
  node setup.js
79
103
  ```
80
104
 
81
- Then add to Claude Code:
105
+ Then register the local entry point with your MCP client (replace the `npx -y @rui.branco/jira-mcp` command from Step 1 with `node $HOME/.config/jira-mcp/index.js`). Example for Claude Code:
82
106
 
83
107
  ```bash
84
108
  claude mcp add --transport stdio jira -- node $HOME/.config/jira-mcp/index.js
@@ -146,11 +170,11 @@ This MCP automatically detects Figma URLs in ticket descriptions and comments. W
146
170
  - Figma links are automatically fetched
147
171
  - Large frames are split into sections for better readability
148
172
  - Images are exported at 2x scale for clarity
149
- - All images are displayed inline in Claude Code
173
+ - All images are displayed inline in clients that support image content blocks (Claude Code, Codex, Antigravity, etc.)
150
174
 
151
175
  To enable Figma integration:
152
176
  1. Install and configure [figma-mcp](https://github.com/rui-branco/figma-mcp)
153
- 2. Restart Claude Code
177
+ 2. Restart your AI client
154
178
  3. Figma links will be auto-fetched when you get a ticket
155
179
 
156
180
  ## API Reference
@@ -201,6 +225,19 @@ For Server / Data Center deployments where Confluence lives on a different host,
201
225
 
202
226
  **Why ADF for `confluence_get_page`?** The v1 `body.atlas_doc_format` expand is unreliable on modern Cloud pages — table cell background colors and some newer node types only survive the v2 `/api/v2/pages/<id>?body-format=atlas_doc_format` endpoint. `confluence_get_page` therefore does both requests in parallel and merges the v2 ADF body onto the v1 response, so callers get `body.view`, `body.storage` and `body.atlas_doc_format` in one shot.
203
227
 
228
+ ### Confluence On-Demand Activation
229
+
230
+ By default, the 21 `confluence_*` tools are hidden from `tools/list` to reduce token footprint. A lightweight `confluence_enable` gateway tool is exposed instead. When a task needs Confluence, the client calls `confluence_enable` and the full tool set appears (the server sends `notifications/tools/list_changed`). Activation is per-process (not persisted to config) and does not bypass instance scopes.
231
+
232
+ To expose Confluence tools from boot (skip the activation step), set the `confluence` config key or the `JIRA_MCP_CONFLUENCE` environment variable:
233
+
234
+ | Method | Value |
235
+ |--------|-------|
236
+ | Config (`~/.config/jira-mcp/config.json`) | `"confluence": "always"` |
237
+ | Environment variable | `JIRA_MCP_CONFLUENCE=always` |
238
+
239
+ The default value is `"on-demand"`.
240
+
204
241
  ### Configuration
205
242
 
206
243
  Config stored at `~/.config/jira-mcp/config.json`:
@@ -230,11 +267,92 @@ The server provides clear error messages:
230
267
  - Tokens are never logged or transmitted except to Jira/Figma APIs
231
268
  - Attachments are downloaded to `~/.config/jira-mcp/attachments/`
232
269
 
270
+ ## Safety & Observability
271
+
272
+ Four opt-in controls limit what an agent can do without your approval and give you a trail when something goes wrong. All four are off by default for existing installs — drop the relevant config block into `~/.config/jira-mcp/config.json` to turn them on.
273
+
274
+ ### Per-tool scopes
275
+
276
+ Restrict which tools each instance can call. Useful for "this Atlassian instance is read-only" or "this one only allows comments".
277
+
278
+ ```json
279
+ {
280
+ "instances": [
281
+ {
282
+ "name": "prod",
283
+ "email": "you@company.com",
284
+ "token": "...",
285
+ "baseUrl": "https://company.atlassian.net",
286
+ "scopes": { "preset": "read-only" }
287
+ },
288
+ {
289
+ "name": "sandbox",
290
+ "email": "you@company.com",
291
+ "token": "...",
292
+ "baseUrl": "https://sandbox.atlassian.net",
293
+ "scopes": { "preset": "no-destructive", "deny": ["jira_remove_attachment"] }
294
+ }
295
+ ]
296
+ }
297
+ ```
298
+
299
+ Presets: `read-only`, `comments-only`, `no-destructive`, `unrestricted`. You can combine a preset with `allow: [...]` and `deny: [...]` — deny wins. If `scopes` is present, an unknown tool name fails closed. If `scopes` is omitted, the instance behaves as before (no restrictions).
300
+
301
+ ### Dry-run mode
302
+
303
+ For any mutating tool call, return the HTTP request that *would* be sent without actually calling Atlassian. Useful for previewing what an agent is about to do.
304
+
305
+ Three layers of precedence (most-specific wins):
306
+
307
+ 1. **Per call:** pass `dryRun: true` to any mutating tool.
308
+ 2. **Per instance:** add `"dryRun": true` to an instance in `config.json`.
309
+ 3. **Environment:** export `JIRA_MCP_DRY_RUN=1` before launching your AI client.
310
+
311
+ Read tools ignore the flag. The response looks like:
312
+
313
+ ```json
314
+ {
315
+ "dryRun": true,
316
+ "plan": [{ "api": "jira", "method": "POST", "endpoint": "/issue/PROJ-1/comment", "body": { ... } }]
317
+ }
318
+ ```
319
+
320
+ For multi-step tools (e.g. `jira_transition` with intermediate statuses) only the first write is captured.
321
+
322
+ ### Audit log
323
+
324
+ Every write attempt — successful, failed, denied by scope, denied by rate limit, or dry-run — is appended as a JSON line to `~/.config/jira-mcp/audit.log`. Token-like fields (`token`, `authorization`, `password`, `apiKey`, `fileContent`, etc.) are redacted before they hit disk. Rotates at 10 MB, keeps 5 historical files.
325
+
326
+ Disable with `"audit": { "enabled": false }` at the top level of `config.json`.
327
+
328
+ ### Rate limiting
329
+
330
+ Layered in-memory token buckets prevent runaway loops. Defaults:
331
+
332
+ - **global:** 60 writes/minute
333
+ - **per-instance:** 30 writes/minute
334
+ - **destructive tools** (`*_delete_*`, `jira_remove_*`, `confluence_delete_*`): 5/minute
335
+
336
+ On limit hit the tool call fails immediately with a `Rate limit exceeded` error — no sleeping, no queueing. Reads bypass the limiter entirely. Dry-runs don't consume tokens.
337
+
338
+ Override or disable in `config.json`:
339
+
340
+ ```json
341
+ {
342
+ "rateLimit": {
343
+ "enabled": true,
344
+ "global": 120,
345
+ "perInstance": 60,
346
+ "destructive": 10
347
+ }
348
+ }
349
+ ```
350
+
233
351
  ## License
234
352
 
235
353
  MIT
236
354
 
237
355
  ## Related
238
356
 
239
- - [figma-mcp](https://github.com/rui-branco/figma-mcp) - Figma MCP server for Claude Code
357
+ - [figma-mcp](https://github.com/rui-branco/figma-mcp) - Figma MCP server (works with any MCP-compatible AI client)
240
358
  - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP specification