@lvmk/jira-mcp 1.0.2 → 1.0.3
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 +146 -409
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,178 +1,24 @@
|
|
|
1
1
|
# @lvmk/jira-mcp
|
|
2
2
|
|
|
3
|
-
MCP
|
|
4
|
-
|
|
5
|
-
> **🔔 Using Jira Cloud or newer Jira Data Center?**
|
|
6
|
-
>
|
|
7
|
-
> If you're using **Jira Cloud** or **Jira Data Center 8.14+** that supports Personal Access Tokens (PAT), OAuth, or API tokens, we recommend using [**mcp-atlassian**](https://github.com/sooperset/mcp-atlassian) instead. It provides broader authentication options and supports both Jira and Confluence.
|
|
8
|
-
>
|
|
9
|
-
> This package (`@lvmk/jira-mcp`) is specifically for legacy Jira Server deployments where basic auth (username/password) is the only available authentication method.
|
|
10
|
-
|
|
11
|
-
## 📑 Table of Contents
|
|
12
|
-
|
|
13
|
-
- [Features](#features)
|
|
14
|
-
- [Installation](#installation)
|
|
15
|
-
- [⚡ Quick CLI Setup](#-quick-cli-setup)
|
|
16
|
-
- [Environment Variables](#environment-variables)
|
|
17
|
-
- [Available Tools](#available-tools)
|
|
18
|
-
- [MCP Configuration Examples](#mcp-configuration-examples)
|
|
19
|
-
- [Usage Examples](#usage-examples)
|
|
20
|
-
- [Development Guide](#development-guide)
|
|
21
|
-
- [Contributing](#contributing)
|
|
22
|
-
- [License](#license)
|
|
23
|
-
|
|
24
|
-
## Features
|
|
25
|
-
|
|
26
|
-
- 🔐 **Basic Authentication** - Username/password auth for legacy Jira Server
|
|
27
|
-
- 📋 **Issue Management** - Create, read, update, delete issues
|
|
28
|
-
- 🔍 **JQL Search** - Powerful issue search with JQL
|
|
29
|
-
- 📁 **Project Tools** - List and inspect projects
|
|
30
|
-
- 🔄 **Workflow Transitions** - Move issues through workflow states
|
|
31
|
-
- 👤 **User Information** - Get current and other user details
|
|
32
|
-
|
|
33
|
-
## Installation
|
|
3
|
+
MCP server for **legacy Jira Server** (v7.x) with Basic Authentication. Works with any MCP-compatible AI tool.
|
|
34
4
|
|
|
35
|
-
|
|
36
|
-
npx @lvmk/jira-mcp
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Or install globally:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm install -g @lvmk/jira-mcp
|
|
43
|
-
```
|
|
5
|
+
> **🔔 Using Jira Cloud or Data Center 8.14+?** Use [mcp-atlassian](https://github.com/sooperset/mcp-atlassian) instead for OAuth/PAT support.
|
|
44
6
|
|
|
45
7
|
---
|
|
46
8
|
|
|
47
|
-
##
|
|
9
|
+
## 📦 Installation
|
|
48
10
|
|
|
49
|
-
|
|
11
|
+
### Quick Start
|
|
50
12
|
|
|
51
13
|
```bash
|
|
52
|
-
npx @lvmk/jira-mcp
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Arguments
|
|
56
|
-
|
|
57
|
-
| Short | Long | Description |
|
|
58
|
-
|-------|------|-------------|
|
|
59
|
-
| `-c` | `--cli` | Target CLI tool (**required**) |
|
|
60
|
-
| `-b` | `--base-url` | Jira base URL (**required**) |
|
|
61
|
-
| `-u` | `--username` | Jira username (**required**) |
|
|
62
|
-
| `-p` | `--password` | Jira password (**required**) |
|
|
63
|
-
| `-s` | `--scope` | `user` or `project` (default: `user`) |
|
|
64
|
-
|
|
65
|
-
### Supported CLI Tools
|
|
66
|
-
|
|
67
|
-
| CLI Tool | Command | Config Locations |
|
|
68
|
-
|----------|---------|------------------|
|
|
69
|
-
| **Claude Code** | `claude-code` | `~/.claude.json` (user) / `.mcp.json` (project) |
|
|
70
|
-
| **Claude Desktop** | `claude-desktop` | `~/Library/Application Support/Claude/...` |
|
|
71
|
-
| **GitHub Copilot** | `github-copilot` | `~/.mcp.json` (user) / `.vscode/mcp.json` (project) |
|
|
72
|
-
| **Cursor** | `cursor` | `~/.cursor/mcp.json` (user) / `.cursor/mcp.json` (project) |
|
|
73
|
-
| **Windsurf** | `windsurf` | `~/.codeium/windsurf/mcp_config.json` |
|
|
74
|
-
| **Roo Code** | `roo-code` | `~/.roo/mcp.json` (user) / `.roo/mcp.json` (project) |
|
|
75
|
-
| **Zed** | `zed` | `~/.config/zed/settings.json` |
|
|
76
|
-
| **Factory Droid** | `factory-droid` | `~/.factory/mcp.json` (user) / `.factory/mcp.json` (project) |
|
|
77
|
-
| **Google Antigravity** | `antigravity` | `~/.gemini/antigravity/mcp_config.json` (user only) |
|
|
78
|
-
| **Gemini CLI** | `gemini-cli` | `~/.gemini/settings.json` (user) / `.gemini/settings.json` (project) |
|
|
79
|
-
|
|
80
|
-
### Setup Examples
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
# Claude Code (user scope - available in all projects)
|
|
84
|
-
npx @lvmk/jira-mcp setup -c claude-code -b https://jira.example.com -u admin -p secret
|
|
85
|
-
|
|
86
|
-
# Cursor (project scope - only in current project)
|
|
87
|
-
npx @lvmk/jira-mcp setup -c cursor -b https://jira.example.com -u admin -p secret -s project
|
|
88
|
-
|
|
89
|
-
# GitHub Copilot (VS Code project config)
|
|
90
|
-
npx @lvmk/jira-mcp setup -c github-copilot -b https://jira.example.com -u admin -p secret -s project
|
|
91
|
-
|
|
92
|
-
# Claude Desktop
|
|
93
|
-
npx @lvmk/jira-mcp setup -c claude-desktop -b https://jira.example.com -u admin -p secret
|
|
94
|
-
|
|
95
|
-
# Gemini CLI
|
|
96
|
-
npx @lvmk/jira-mcp setup -c gemini-cli -b https://jira.example.com -u admin -p secret
|
|
97
|
-
|
|
98
|
-
# Factory Droid
|
|
99
|
-
npx @lvmk/jira-mcp setup -c factory-droid -b https://jira.example.com -u admin -p secret
|
|
100
|
-
|
|
101
|
-
# Windsurf
|
|
102
|
-
npx @lvmk/jira-mcp setup -c windsurf -b https://jira.example.com -u admin -p secret
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Other Commands
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
# Show help
|
|
109
|
-
npx @lvmk/jira-mcp --help
|
|
110
|
-
|
|
111
|
-
# List supported CLI tools
|
|
112
|
-
npx @lvmk/jira-mcp list-clis
|
|
113
|
-
|
|
114
|
-
# Show version
|
|
115
|
-
npx @lvmk/jira-mcp --version
|
|
14
|
+
npx @lvmk/jira-mcp
|
|
116
15
|
```
|
|
117
16
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
## Environment Variables
|
|
121
|
-
|
|
122
|
-
| Variable | Required | Description |
|
|
123
|
-
|----------|----------|-------------|
|
|
124
|
-
| `JIRA_BASE_URL` | ✅ | Base URL of Jira instance (e.g., `http://jira.example.com:8080`) |
|
|
125
|
-
| `JIRA_USERNAME` | ✅ | Username for authentication |
|
|
126
|
-
| `JIRA_PASSWORD` | ✅ | Password for authentication |
|
|
127
|
-
| `JIRA_API_VERSION` | ❌ | API version (default: `2`) |
|
|
128
|
-
|
|
129
|
-
## Available Tools
|
|
17
|
+
### Configuration Formats
|
|
130
18
|
|
|
131
|
-
|
|
19
|
+
<details>
|
|
20
|
+
<summary><strong>JSON (camelCase)</strong> - Claude Code, Antigravity, Cursor</summary>
|
|
132
21
|
|
|
133
|
-
| Tool | Description |
|
|
134
|
-
|------|-------------|
|
|
135
|
-
| `jira_get_issue` | Get issue details by key |
|
|
136
|
-
| `jira_create_issue` | Create a new issue |
|
|
137
|
-
| `jira_update_issue` | Update issue fields |
|
|
138
|
-
| `jira_delete_issue` | Delete an issue |
|
|
139
|
-
| `jira_add_comment` | Add comment to issue |
|
|
140
|
-
| `jira_get_comments` | Get issue comments |
|
|
141
|
-
|
|
142
|
-
### Search Tools
|
|
143
|
-
|
|
144
|
-
| Tool | Description |
|
|
145
|
-
|------|-------------|
|
|
146
|
-
| `jira_search` | Search issues using JQL |
|
|
147
|
-
|
|
148
|
-
### Project Tools
|
|
149
|
-
|
|
150
|
-
| Tool | Description |
|
|
151
|
-
|------|-------------|
|
|
152
|
-
| `jira_list_projects` | List all accessible projects |
|
|
153
|
-
| `jira_get_project` | Get project details |
|
|
154
|
-
|
|
155
|
-
### Transition Tools
|
|
156
|
-
|
|
157
|
-
| Tool | Description |
|
|
158
|
-
|------|-------------|
|
|
159
|
-
| `jira_get_transitions` | Get available transitions for issue |
|
|
160
|
-
| `jira_transition_issue` | Transition issue to new status |
|
|
161
|
-
|
|
162
|
-
### User Tools
|
|
163
|
-
|
|
164
|
-
| Tool | Description |
|
|
165
|
-
|------|-------------|
|
|
166
|
-
| `jira_get_current_user` | Get authenticated user info |
|
|
167
|
-
| `jira_get_user` | Get user by username |
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## MCP Configuration Examples
|
|
172
|
-
|
|
173
|
-
### Claude Code
|
|
174
|
-
|
|
175
|
-
**Project-level** (`.mcp.json` in project root):
|
|
176
22
|
```json
|
|
177
23
|
{
|
|
178
24
|
"mcpServers": {
|
|
@@ -188,12 +34,16 @@ npx @lvmk/jira-mcp --version
|
|
|
188
34
|
}
|
|
189
35
|
}
|
|
190
36
|
```
|
|
37
|
+
</details>
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<summary><strong>JSON (dash-case)</strong> - VS Code, GitHub Copilot</summary>
|
|
191
41
|
|
|
192
|
-
**User-level** (`~/.claude.json`):
|
|
193
42
|
```json
|
|
194
43
|
{
|
|
195
|
-
"
|
|
44
|
+
"servers": {
|
|
196
45
|
"jira": {
|
|
46
|
+
"type": "stdio",
|
|
197
47
|
"command": "npx",
|
|
198
48
|
"args": ["-y", "@lvmk/jira-mcp"],
|
|
199
49
|
"env": {
|
|
@@ -205,59 +55,110 @@ npx @lvmk/jira-mcp --version
|
|
|
205
55
|
}
|
|
206
56
|
}
|
|
207
57
|
```
|
|
58
|
+
</details>
|
|
59
|
+
|
|
60
|
+
<details>
|
|
61
|
+
<summary><strong>YAML (Codex)</strong></summary>
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
mcp_servers:
|
|
65
|
+
jira:
|
|
66
|
+
command: npx
|
|
67
|
+
args:
|
|
68
|
+
- -y
|
|
69
|
+
- "@lvmk/jira-mcp"
|
|
70
|
+
env:
|
|
71
|
+
JIRA_BASE_URL: http://jira.example.com:8080
|
|
72
|
+
JIRA_USERNAME: your-username
|
|
73
|
+
JIRA_PASSWORD: your-password
|
|
74
|
+
```
|
|
75
|
+
</details>
|
|
208
76
|
|
|
209
77
|
---
|
|
210
78
|
|
|
211
|
-
|
|
79
|
+
## 🔧 Available Tools
|
|
212
80
|
|
|
213
|
-
|
|
81
|
+
| Tool | Description |
|
|
82
|
+
|------|-------------|
|
|
83
|
+
| `jira_get_issue` | Get issue details by key |
|
|
84
|
+
| `jira_create_issue` | Create a new issue |
|
|
85
|
+
| `jira_update_issue` | Update issue fields |
|
|
86
|
+
| `jira_delete_issue` | Delete an issue |
|
|
87
|
+
| `jira_add_comment` | Add comment to issue |
|
|
88
|
+
| `jira_get_comments` | Get issue comments |
|
|
89
|
+
| `jira_search` | Search issues using JQL |
|
|
90
|
+
| `jira_list_projects` | List all accessible projects |
|
|
91
|
+
| `jira_get_project` | Get project details |
|
|
92
|
+
| `jira_get_transitions` | Get available transitions |
|
|
93
|
+
| `jira_transition_issue` | Transition issue to new status |
|
|
94
|
+
| `jira_get_current_user` | Get authenticated user info |
|
|
95
|
+
| `jira_get_user` | Get user by username |
|
|
214
96
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
"enabled": true
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
```
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## ⚙️ Environment Variables
|
|
100
|
+
|
|
101
|
+
| Variable | Required | Description |
|
|
102
|
+
|----------|----------|-------------|
|
|
103
|
+
| `JIRA_BASE_URL` | ✅ | Jira instance URL |
|
|
104
|
+
| `JIRA_USERNAME` | ✅ | Username |
|
|
105
|
+
| `JIRA_PASSWORD` | ✅ | Password |
|
|
106
|
+
| `JIRA_API_VERSION` | ❌ | API version (default: `2`) |
|
|
231
107
|
|
|
232
108
|
---
|
|
233
109
|
|
|
234
|
-
|
|
110
|
+
<details>
|
|
111
|
+
<summary><h2>⚡ Quick Setup CLI</h2></summary>
|
|
235
112
|
|
|
236
|
-
|
|
113
|
+
Inject MCP configuration into your AI tool's config file:
|
|
237
114
|
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
115
|
+
```bash
|
|
116
|
+
npx @lvmk/jira-mcp setup -c <tool> -b <url> -u <user> -p <pass> [-s <scope>]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Arguments
|
|
120
|
+
|
|
121
|
+
| Arg | Description |
|
|
122
|
+
|-----|-------------|
|
|
123
|
+
| `-c` | Tool name (see below) |
|
|
124
|
+
| `-b` | Jira base URL |
|
|
125
|
+
| `-u` | Username |
|
|
126
|
+
| `-p` | Password |
|
|
127
|
+
| `-s` | `user` or `project` (default: `user`) |
|
|
128
|
+
|
|
129
|
+
### Supported Tools
|
|
130
|
+
|
|
131
|
+
| Tool | Config Path |
|
|
132
|
+
|------|-------------|
|
|
133
|
+
| `claude-code` | `~/.claude.json` / `.mcp.json` |
|
|
134
|
+
| `claude-desktop` | `~/Library/Application Support/Claude/...` |
|
|
135
|
+
| `github-copilot` | `~/.mcp.json` / `.vscode/mcp.json` |
|
|
136
|
+
| `cursor` | `~/.cursor/mcp.json` |
|
|
137
|
+
| `windsurf` | `~/.codeium/windsurf/mcp_config.json` |
|
|
138
|
+
| `roo-code` | `~/.roo/mcp.json` |
|
|
139
|
+
| `zed` | `~/.config/zed/settings.json` |
|
|
140
|
+
| `factory-droid` | `~/.factory/mcp.json` |
|
|
141
|
+
| `antigravity` | `~/.gemini/antigravity/mcp_config.json` |
|
|
142
|
+
| `gemini-cli` | `~/.gemini/settings.json` |
|
|
143
|
+
|
|
144
|
+
### Examples
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npx @lvmk/jira-mcp setup -c claude-code -b https://jira.example.com -u admin -p secret
|
|
148
|
+
npx @lvmk/jira-mcp setup -c cursor -b https://jira.example.com -u admin -p secret -s project
|
|
149
|
+
npx @lvmk/jira-mcp list-clis # List all tools
|
|
252
150
|
```
|
|
253
151
|
|
|
152
|
+
</details>
|
|
153
|
+
|
|
254
154
|
---
|
|
255
155
|
|
|
256
|
-
|
|
156
|
+
<details>
|
|
157
|
+
<summary><h2>📖 Configuration Examples by Tool</h2></summary>
|
|
257
158
|
|
|
258
|
-
|
|
159
|
+
### Claude Code
|
|
259
160
|
|
|
260
|
-
|
|
161
|
+
**Project** (`.mcp.json`):
|
|
261
162
|
```json
|
|
262
163
|
{
|
|
263
164
|
"mcpServers": {
|
|
@@ -274,11 +175,9 @@ MCP configuration (same format as Claude):
|
|
|
274
175
|
}
|
|
275
176
|
```
|
|
276
177
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
### GitHub Copilot
|
|
178
|
+
### GitHub Copilot (VS Code)
|
|
280
179
|
|
|
281
|
-
**Project
|
|
180
|
+
**Project** (`.vscode/mcp.json`):
|
|
282
181
|
```json
|
|
283
182
|
{
|
|
284
183
|
"servers": {
|
|
@@ -296,12 +195,13 @@ MCP configuration (same format as Claude):
|
|
|
296
195
|
}
|
|
297
196
|
```
|
|
298
197
|
|
|
299
|
-
|
|
198
|
+
### Claude Desktop
|
|
199
|
+
|
|
200
|
+
**macOS** `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
300
201
|
```json
|
|
301
202
|
{
|
|
302
|
-
"
|
|
203
|
+
"mcpServers": {
|
|
303
204
|
"jira": {
|
|
304
|
-
"type": "stdio",
|
|
305
205
|
"command": "npx",
|
|
306
206
|
"args": ["-y", "@lvmk/jira-mcp"],
|
|
307
207
|
"env": {
|
|
@@ -314,35 +214,32 @@ MCP configuration (same format as Claude):
|
|
|
314
214
|
}
|
|
315
215
|
```
|
|
316
216
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
### Claude Desktop
|
|
320
|
-
|
|
321
|
-
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
322
|
-
|
|
323
|
-
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
324
|
-
|
|
325
|
-
**Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
217
|
+
### OpenCode
|
|
326
218
|
|
|
219
|
+
**File** `~/.opencode.json`:
|
|
327
220
|
```json
|
|
328
221
|
{
|
|
329
222
|
"mcpServers": {
|
|
330
223
|
"jira": {
|
|
331
|
-
"
|
|
332
|
-
"
|
|
224
|
+
"type": "local",
|
|
225
|
+
"command": ["npx", "-y", "@lvmk/jira-mcp"],
|
|
333
226
|
"env": {
|
|
334
227
|
"JIRA_BASE_URL": "http://jira.example.com:8080",
|
|
335
228
|
"JIRA_USERNAME": "your-username",
|
|
336
229
|
"JIRA_PASSWORD": "your-password"
|
|
337
|
-
}
|
|
230
|
+
},
|
|
231
|
+
"enabled": true
|
|
338
232
|
}
|
|
339
233
|
}
|
|
340
234
|
}
|
|
341
235
|
```
|
|
342
236
|
|
|
237
|
+
</details>
|
|
238
|
+
|
|
343
239
|
---
|
|
344
240
|
|
|
345
|
-
|
|
241
|
+
<details>
|
|
242
|
+
<summary><h2>💡 Usage Examples</h2></summary>
|
|
346
243
|
|
|
347
244
|
### Search for open bugs
|
|
348
245
|
```
|
|
@@ -355,234 +252,74 @@ Use jira_create_issue with:
|
|
|
355
252
|
- projectKey: "PROJ"
|
|
356
253
|
- summary: "Implement new feature"
|
|
357
254
|
- issueType: "Task"
|
|
358
|
-
- description: "Details about the feature..."
|
|
359
255
|
```
|
|
360
256
|
|
|
361
257
|
### Transition an issue
|
|
362
258
|
```
|
|
363
|
-
1.
|
|
364
|
-
2.
|
|
365
|
-
- issueKey: "PROJ-123"
|
|
366
|
-
- transitionId: "21" (from step 1)
|
|
367
|
-
- comment: "Moving to In Progress"
|
|
259
|
+
1. jira_get_transitions with issueKey: "PROJ-123"
|
|
260
|
+
2. jira_transition_issue with issueKey: "PROJ-123", transitionId: "21"
|
|
368
261
|
```
|
|
369
262
|
|
|
370
|
-
|
|
263
|
+
</details>
|
|
371
264
|
|
|
372
|
-
|
|
265
|
+
---
|
|
373
266
|
|
|
374
|
-
|
|
267
|
+
<details>
|
|
268
|
+
<summary><h2>🛠️ Development Guide</h2></summary>
|
|
375
269
|
|
|
376
270
|
### Prerequisites
|
|
377
|
-
|
|
378
|
-
-
|
|
379
|
-
- **npm** >= 9.0.0
|
|
380
|
-
- A Jira Server instance for testing
|
|
271
|
+
- Node.js >= 18.0.0
|
|
272
|
+
- npm >= 9.0.0
|
|
381
273
|
|
|
382
274
|
### Getting Started
|
|
383
275
|
|
|
384
276
|
```bash
|
|
385
|
-
# Clone repository
|
|
386
277
|
git clone git@github.com:stommazh/jira-mcp.git
|
|
387
278
|
cd jira-mcp
|
|
388
|
-
|
|
389
|
-
# Install dependencies
|
|
390
279
|
npm install
|
|
391
|
-
|
|
392
|
-
# Build TypeScript
|
|
393
280
|
npm run build
|
|
394
281
|
```
|
|
395
282
|
|
|
396
|
-
###
|
|
397
|
-
|
|
398
|
-
```
|
|
399
|
-
jira-mcp/
|
|
400
|
-
├── src/
|
|
401
|
-
│ ├── index.ts # Main entry - CLI commands & MCP server
|
|
402
|
-
│ ├── config.ts # Environment config with Zod validation
|
|
403
|
-
│ ├── client.ts # Jira REST API client (Basic Auth)
|
|
404
|
-
│ ├── setup.ts # CLI setup for AI tool configuration
|
|
405
|
-
│ └── tools/
|
|
406
|
-
│ ├── index.ts # Tool exports
|
|
407
|
-
│ ├── issues.ts # Issue CRUD & comments
|
|
408
|
-
│ ├── search.ts # JQL search
|
|
409
|
-
│ ├── projects.ts # Project listing
|
|
410
|
-
│ ├── transitions.ts # Workflow transitions
|
|
411
|
-
│ └── users.ts # User info
|
|
412
|
-
├── test/
|
|
413
|
-
│ ├── client.test.ts # Client integration tests
|
|
414
|
-
│ └── tools.test.ts # Tool handler tests
|
|
415
|
-
├── dist/ # Compiled output
|
|
416
|
-
├── package.json
|
|
417
|
-
├── tsconfig.json
|
|
418
|
-
└── tsconfig.test.json
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
### Environment Setup
|
|
422
|
-
|
|
423
|
-
Create a `.env` file in the project root:
|
|
424
|
-
|
|
425
|
-
```bash
|
|
426
|
-
JIRA_BASE_URL=https://your-jira-instance.com
|
|
427
|
-
JIRA_USERNAME=your-username
|
|
428
|
-
JIRA_PASSWORD=your-password
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
### Available Scripts
|
|
283
|
+
### Scripts
|
|
432
284
|
|
|
433
285
|
| Script | Description |
|
|
434
286
|
|--------|-------------|
|
|
435
|
-
| `npm run build` | Compile TypeScript
|
|
436
|
-
| `npm run dev` | Watch mode
|
|
437
|
-
| `npm run
|
|
438
|
-
| `npm run test:
|
|
439
|
-
| `npm run
|
|
440
|
-
| `npm run test:tools` | Run tool handler tests only |
|
|
441
|
-
| `npm run test:integration` | Run MCP integration tests (Claude Code, OpenCode) |
|
|
442
|
-
| `npm run clean` | Remove `dist/` and `dist-test/` |
|
|
443
|
-
|
|
444
|
-
### Running Locally
|
|
445
|
-
|
|
446
|
-
```bash
|
|
447
|
-
# Method 1: With environment variables
|
|
448
|
-
JIRA_BASE_URL=https://jira.example.com \
|
|
449
|
-
JIRA_USERNAME=admin \
|
|
450
|
-
JIRA_PASSWORD=secret \
|
|
451
|
-
node dist/index.js
|
|
452
|
-
|
|
453
|
-
# Method 2: With .env file (requires dotenv in your test)
|
|
454
|
-
npm run test:all
|
|
455
|
-
```
|
|
287
|
+
| `npm run build` | Compile TypeScript |
|
|
288
|
+
| `npm run dev` | Watch mode |
|
|
289
|
+
| `npm run test:all` | Run all tests |
|
|
290
|
+
| `npm run test:integration` | Integration tests |
|
|
291
|
+
| `npm run clean` | Clean dist |
|
|
456
292
|
|
|
457
|
-
###
|
|
293
|
+
### Environment
|
|
458
294
|
|
|
295
|
+
Create `.env`:
|
|
459
296
|
```bash
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
# Setup command help
|
|
464
|
-
node dist/index.js setup --help
|
|
465
|
-
|
|
466
|
-
# List supported CLIs
|
|
467
|
-
node dist/index.js list-clis
|
|
468
|
-
|
|
469
|
-
# Test setup (creates config in current directory)
|
|
470
|
-
node dist/index.js setup -c cursor -b https://jira.test.com -u test -p test -s project
|
|
297
|
+
JIRA_BASE_URL=https://your-jira.com
|
|
298
|
+
JIRA_USERNAME=your-username
|
|
299
|
+
JIRA_PASSWORD=your-password
|
|
471
300
|
```
|
|
472
301
|
|
|
473
302
|
### Adding New Tools
|
|
474
303
|
|
|
475
|
-
1.
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
// src/tools/my-tool.ts
|
|
479
|
-
import { z } from 'zod';
|
|
480
|
-
import { JiraClient } from '../client.js';
|
|
481
|
-
|
|
482
|
-
export const myToolSchema = z.object({
|
|
483
|
-
param1: z.string().describe('Description'),
|
|
484
|
-
});
|
|
485
|
-
|
|
486
|
-
export function createMyTools(client: JiraClient) {
|
|
487
|
-
return {
|
|
488
|
-
jira_my_tool: async (args: z.infer<typeof myToolSchema>) => {
|
|
489
|
-
// Implementation
|
|
490
|
-
return {
|
|
491
|
-
content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
|
|
492
|
-
};
|
|
493
|
-
},
|
|
494
|
-
};
|
|
495
|
-
}
|
|
304
|
+
1. Create tool file in `src/tools/`
|
|
305
|
+
2. Export from `src/tools/index.ts`
|
|
306
|
+
3. Register in `src/index.ts`
|
|
496
307
|
|
|
497
|
-
|
|
498
|
-
{
|
|
499
|
-
name: 'jira_my_tool',
|
|
500
|
-
description: 'Tool description',
|
|
501
|
-
inputSchema: {
|
|
502
|
-
type: 'object' as const,
|
|
503
|
-
properties: { param1: { type: 'string', description: 'Description' } },
|
|
504
|
-
required: ['param1'],
|
|
505
|
-
},
|
|
506
|
-
},
|
|
507
|
-
];
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
2. **Export from `src/tools/index.ts`**:
|
|
511
|
-
|
|
512
|
-
```typescript
|
|
513
|
-
export * from './my-tool.js';
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
3. **Register in `src/index.ts`**:
|
|
517
|
-
|
|
518
|
-
```typescript
|
|
519
|
-
import { createMyTools, myToolDefinitions } from './tools/index.js';
|
|
520
|
-
|
|
521
|
-
// In runMcpServer():
|
|
522
|
-
const myTools = createMyTools(jiraClient);
|
|
523
|
-
|
|
524
|
-
const allToolHandlers = {
|
|
525
|
-
...issueTools,
|
|
526
|
-
...myTools, // Add here
|
|
527
|
-
};
|
|
528
|
-
|
|
529
|
-
const allToolDefinitions = [
|
|
530
|
-
...issueToolDefinitions,
|
|
531
|
-
...myToolDefinitions, // Add here
|
|
532
|
-
];
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
### Adding Support for New CLI Tools
|
|
536
|
-
|
|
537
|
-
Edit `src/setup.ts` and add your CLI to the `configs` object in `getConfigFileInfo()`:
|
|
538
|
-
|
|
539
|
-
```typescript
|
|
540
|
-
'my-new-cli': {
|
|
541
|
-
user: { path: path.join(home, '.my-cli', 'config.json'), wrapperKey: 'mcpServers', serverKey: 'jira' },
|
|
542
|
-
project: { path: path.join(cwd, '.my-cli', 'config.json'), wrapperKey: 'mcpServers', serverKey: 'jira' },
|
|
543
|
-
},
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
Then add it to the `SupportedCli` type and `validClis` array.
|
|
308
|
+
### Adding CLI Support
|
|
547
309
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
```bash
|
|
551
|
-
# Update package.json with your package name
|
|
552
|
-
npm version patch # or minor/major
|
|
553
|
-
|
|
554
|
-
# Build and publish
|
|
555
|
-
npm run build
|
|
556
|
-
npm publish --access public
|
|
557
|
-
```
|
|
310
|
+
Edit `src/setup.ts` and add to `configs` object in `getConfigFileInfo()`.
|
|
558
311
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
- Uses **stdio transport** for npx execution
|
|
562
|
-
- All tools return `{ content: [{ type: 'text', text: '...' }] }`
|
|
563
|
-
- Errors return `{ content: [...], isError: true }`
|
|
564
|
-
- Server logs go to `stderr` (not `stdout`) to avoid protocol interference
|
|
565
|
-
|
|
566
|
-
### Claude Code Lazy Loading (2025+)
|
|
567
|
-
|
|
568
|
-
Claude Code v2.1.7+ supports lazy tool loading via "Tool Search":
|
|
569
|
-
- Tools are discovered dynamically instead of pre-loaded
|
|
570
|
-
- Dramatically reduces context token usage (134k → ~5k tokens)
|
|
571
|
-
- No changes needed on MCP server side - it's handled by Claude Code
|
|
312
|
+
</details>
|
|
572
313
|
|
|
573
314
|
---
|
|
574
315
|
|
|
575
316
|
## Contributing
|
|
576
317
|
|
|
577
318
|
1. Fork the repository
|
|
578
|
-
2. Create
|
|
579
|
-
3. Commit
|
|
580
|
-
4.
|
|
581
|
-
5. Open a Pull Request
|
|
582
|
-
|
|
583
|
-
---
|
|
319
|
+
2. Create feature branch
|
|
320
|
+
3. Commit changes
|
|
321
|
+
4. Open Pull Request
|
|
584
322
|
|
|
585
323
|
## License
|
|
586
324
|
|
|
587
325
|
MIT
|
|
588
|
-
|
package/package.json
CHANGED