@abdelrahmanhsn/jira-mcp 1.0.0 → 1.0.1
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/README.md +128 -0
- package/package.json +23 -4
- package/server.js +7 -6
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# @abdelrahmanhsn/jira-mcp
|
|
2
|
+
|
|
3
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that connects your AI IDE to Jira. Query your tickets, active sprint, and issue details directly from GitHub Copilot, Cursor, Claude Desktop, or any MCP-compatible client.
|
|
4
|
+
|
|
5
|
+
## Tools
|
|
6
|
+
|
|
7
|
+
| Tool | Description |
|
|
8
|
+
|------|-------------|
|
|
9
|
+
| `get_my_tickets` | Get all Jira tickets assigned to you, ordered by last updated |
|
|
10
|
+
| `get_active_sprint_tickets` | Get your tickets in the currently active sprint |
|
|
11
|
+
| `get_issue_details` | Get full details (description + attachments) for a specific issue key |
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
- Node.js 18 or later
|
|
16
|
+
- A Jira Cloud account
|
|
17
|
+
- A Jira API token ([generate one here](https://id.atlassian.com/manage-profile/security/api-tokens))
|
|
18
|
+
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
### 1. Get your Jira API token
|
|
22
|
+
|
|
23
|
+
1. Go to https://id.atlassian.com/manage-profile/security/api-tokens
|
|
24
|
+
2. Click **Create API token**
|
|
25
|
+
3. Copy the token — you'll need it below
|
|
26
|
+
|
|
27
|
+
### 2. Configure your MCP client
|
|
28
|
+
|
|
29
|
+
Pick your AI IDE below and add the config. Replace the `env` values with your own.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
#### GitHub Copilot (VS Code)
|
|
34
|
+
|
|
35
|
+
Open **User Settings (JSON)** via `Cmd+Shift+P` → `Open User Settings (JSON)` and add:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
"mcp": {
|
|
39
|
+
"servers": {
|
|
40
|
+
"jira-mcp": {
|
|
41
|
+
"command": "npx",
|
|
42
|
+
"args": ["-y", "@abdelrahmanhsn/jira-mcp"],
|
|
43
|
+
"env": {
|
|
44
|
+
"JIRA_EMAIL": "you@company.com",
|
|
45
|
+
"JIRA_TOKEN": "your-api-token",
|
|
46
|
+
"JIRA_DOMAIN": "yourcompany.atlassian.net",
|
|
47
|
+
"JIRA_PROJECT": "PROJ"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
#### Cursor
|
|
57
|
+
|
|
58
|
+
Open `~/.cursor/mcp.json` (or `Cursor Settings → MCP`) and add:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"jira-mcp": {
|
|
64
|
+
"command": "npx",
|
|
65
|
+
"args": ["-y", "@abdelrahmanhsn/jira-mcp"],
|
|
66
|
+
"env": {
|
|
67
|
+
"JIRA_EMAIL": "you@company.com",
|
|
68
|
+
"JIRA_TOKEN": "your-api-token",
|
|
69
|
+
"JIRA_DOMAIN": "yourcompany.atlassian.net",
|
|
70
|
+
"JIRA_PROJECT": "PROJ"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
#### Claude Desktop
|
|
80
|
+
|
|
81
|
+
Open `~/Library/Application Support/Claude/claude_desktop_config.json` and add:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"jira-mcp": {
|
|
87
|
+
"command": "npx",
|
|
88
|
+
"args": ["-y", "@abdelrahmanhsn/jira-mcp"],
|
|
89
|
+
"env": {
|
|
90
|
+
"JIRA_EMAIL": "you@company.com",
|
|
91
|
+
"JIRA_TOKEN": "your-api-token",
|
|
92
|
+
"JIRA_DOMAIN": "yourcompany.atlassian.net",
|
|
93
|
+
"JIRA_PROJECT": "PROJ"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Environment Variables
|
|
103
|
+
|
|
104
|
+
| Variable | Required | Description |
|
|
105
|
+
|----------|----------|-------------|
|
|
106
|
+
| `JIRA_EMAIL` | ✅ | Your Jira account email |
|
|
107
|
+
| `JIRA_TOKEN` | ✅ | Your Jira API token |
|
|
108
|
+
| `JIRA_DOMAIN` | ✅ | Your Jira domain, e.g. `yourcompany.atlassian.net` |
|
|
109
|
+
| `JIRA_PROJECT` | ✅ | Your Jira project key, e.g. `PROJ` |
|
|
110
|
+
|
|
111
|
+
## Usage Examples
|
|
112
|
+
|
|
113
|
+
Once configured, you can ask your AI assistant:
|
|
114
|
+
|
|
115
|
+
- *"Show me my current Jira tickets"*
|
|
116
|
+
- *"What's in my active sprint?"*
|
|
117
|
+
- *"Get me the details for PROJ-1234"*
|
|
118
|
+
- *"Summarize the description of PROJ-5678"*
|
|
119
|
+
|
|
120
|
+
## Security
|
|
121
|
+
|
|
122
|
+
- Credentials are **never** stored in code — they are injected at runtime by your MCP client
|
|
123
|
+
- Each user provides their own credentials in their local MCP config
|
|
124
|
+
- Your API token is only sent to your own Jira domain over HTTPS
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
ISC
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abdelrahmanhsn/jira-mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"description": "MCP server for Jira — query tickets, sprints, and issue details from any AI IDE",
|
|
4
|
+
"version": "1.0.1",
|
|
5
|
+
"description": "MCP server for Jira — query your tickets, active sprints, and issue details from any AI IDE (GitHub Copilot, Cursor, Claude Desktop)",
|
|
6
6
|
"main": "server.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"jira-mcp": "./server.js"
|
|
@@ -10,13 +10,32 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "node server.js"
|
|
12
12
|
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
|
|
13
|
+
"keywords": [
|
|
14
|
+
"mcp",
|
|
15
|
+
"jira",
|
|
16
|
+
"atlassian",
|
|
17
|
+
"model-context-protocol",
|
|
18
|
+
"ai",
|
|
19
|
+
"copilot",
|
|
20
|
+
"cursor",
|
|
21
|
+
"claude",
|
|
22
|
+
"sprint",
|
|
23
|
+
"tickets",
|
|
24
|
+
"devtools"
|
|
25
|
+
],
|
|
26
|
+
"author": {
|
|
27
|
+
"name": "Abdelrahman Hassan",
|
|
28
|
+
"email": "abdelrahmanhsn1@gmail.com"
|
|
29
|
+
},
|
|
15
30
|
"license": "ISC",
|
|
16
31
|
"repository": {
|
|
17
32
|
"type": "git",
|
|
18
33
|
"url": ""
|
|
19
34
|
},
|
|
35
|
+
"homepage": "https://www.npmjs.com/package/@abdelrahmanhsn/jira-mcp",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": ""
|
|
38
|
+
},
|
|
20
39
|
"engines": {
|
|
21
40
|
"node": ">=18"
|
|
22
41
|
},
|
package/server.js
CHANGED
|
@@ -5,11 +5,12 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
// ── Jira credentials (injected by MCP client via env) ──────────────────────
|
|
8
|
-
const JIRA_EMAIL
|
|
9
|
-
const JIRA_TOKEN
|
|
10
|
-
const JIRA_DOMAIN
|
|
8
|
+
const JIRA_EMAIL = process.env.JIRA_EMAIL;
|
|
9
|
+
const JIRA_TOKEN = process.env.JIRA_TOKEN;
|
|
10
|
+
const JIRA_DOMAIN = process.env.JIRA_DOMAIN;
|
|
11
|
+
const JIRA_PROJECT = process.env.JIRA_PROJECT;
|
|
11
12
|
|
|
12
|
-
const missing = ["JIRA_EMAIL", "JIRA_TOKEN", "JIRA_DOMAIN"].filter(k => !process.env[k]);
|
|
13
|
+
const missing = ["JIRA_EMAIL", "JIRA_TOKEN", "JIRA_DOMAIN", "JIRA_PROJECT"].filter(k => !process.env[k]);
|
|
13
14
|
if (missing.length) {
|
|
14
15
|
process.stderr.write(
|
|
15
16
|
`[jira-mcp] Missing required environment variables: ${missing.join(", ")}\n` +
|
|
@@ -58,11 +59,11 @@ server.tool(
|
|
|
58
59
|
// Tool: get_active_sprint_tickets
|
|
59
60
|
server.tool(
|
|
60
61
|
"get_active_sprint_tickets",
|
|
61
|
-
"Get user tickets in the active sprint
|
|
62
|
+
"Get user tickets in the active sprint for the configured Jira project",
|
|
62
63
|
{},
|
|
63
64
|
async () => {
|
|
64
65
|
const result = await searchJira(
|
|
65
|
-
|
|
66
|
+
`project = '${JIRA_PROJECT}' AND sprint IN openSprints() AND assignee = currentUser()`
|
|
66
67
|
);
|
|
67
68
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
68
69
|
}
|