jira-mcp-tools 0.2.0__tar.gz → 0.2.2__tar.gz

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,335 @@
1
+ Metadata-Version: 2.4
2
+ Name: jira-mcp-tools
3
+ Version: 0.2.2
4
+ Summary: Model Context Protocol server for Jira integration
5
+ Project-URL: Homepage, https://github.com/IBM/jira-mcp-tools
6
+ Project-URL: Repository, https://github.com/IBM/jira-mcp-tools
7
+ Project-URL: Issues, https://github.com/IBM/jira-mcp-tools/issues
8
+ Author-email: IBM <opensource@ibm.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,jira,llm,mcp,model-context-protocol
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: click>=8.0.0
22
+ Requires-Dist: fastmcp>=2.6.1
23
+ Requires-Dist: jira>=3.4.0
24
+ Requires-Dist: python-dotenv>=1.0.0
25
+ Requires-Dist: requests>=2.32.5
26
+ Requires-Dist: ruff>=0.11.0
27
+ Description-Content-Type: text/markdown
28
+
29
+ # MCP Server for JIRA
30
+
31
+ A Model Context Protocol (MCP) server that provides seamless integration with Jira. This server enables AI assistants to retrieve issue information, comments, and attachments from any Jira instance.
32
+
33
+ ## Features
34
+
35
+ - 🎫 **Issue Management**: Get, create, update, and transition issues
36
+ - 🔍 **Advanced Search**: JQL-based issue search with custom fields
37
+ - 📊 **Epic & Sprint Tracking**: Monitor progress, story points, and completion
38
+ - 🔗 **Issue Relationships**: View and manage issue links
39
+ - 💬 **Comments**: Add and retrieve issue comments
40
+ - 📎 **Attachments**: Download issue attachments
41
+ - 📜 **History**: Track all changes to issues
42
+ - 🚀 **Release Management**: View project versions and releases
43
+ - 👥 **Assignment**: Assign/unassign issues to users
44
+ - 🔒 **Secure Authentication**: Uses Jira API tokens
45
+
46
+ ## Installation
47
+
48
+ ### Using uvx (Recommended)
49
+
50
+ ```bash
51
+ uvx jira-mcp-tools
52
+ ```
53
+
54
+ ### Using pip
55
+
56
+ ```bash
57
+ pip3 install jira-mcp-tools
58
+ ```
59
+
60
+ ## Prerequisites
61
+
62
+ - Python 3.10 or higher
63
+ - Jira API token ([How to create](https://jsw.ibm.com/plugins/servlet/de.resolution.apitokenauth/admin))
64
+ - UV package manager ([Installation guide](https://docs.astral.sh/uv/getting-started/installation/))
65
+
66
+ ## Configuration
67
+
68
+ ### Environment Variables
69
+
70
+ The server requires three environment variables:
71
+
72
+ - `JIRA_URL`: Your Jira instance URL
73
+ - `JIRA_EMAIL`: Your Jira account email
74
+ - `JIRA_TOKEN`: Your Jira API token
75
+
76
+ ### MCP Client Configuration
77
+
78
+ Add to your MCP client configuration (e.g., Claude Desktop, Bob):
79
+
80
+ ```json
81
+ {
82
+ "mcpServers": {
83
+ "jira": {
84
+ "command": "uvx",
85
+ "args": ["jira-mcp-tools"],
86
+ "env": {
87
+ "JIRA_URL": "https://jsw.ibm.com/",
88
+ "JIRA_EMAIL": "your-email@ibm.com",
89
+ "JIRA_TOKEN": "your-api-token"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ ## Available Tools
97
+
98
+ ### Issue Information
99
+
100
+ #### `get_jira_ticket_info`
101
+ Get detailed information about a Jira issue including description and comments.
102
+
103
+ **Parameters:**
104
+ - `issue_key` (string): Issue key (e.g., "PROJ-123")
105
+
106
+ **Example:** `get_jira_ticket_info("PROJ-123")`
107
+
108
+ #### `get_jira_ticket_attachments`
109
+ Download attachments from a Jira issue.
110
+
111
+ **Parameters:**
112
+ - `issue_key` (string): Issue key
113
+
114
+ **Example:** `get_jira_ticket_attachments("PROJ-456")`
115
+
116
+ #### `get_issue_history`
117
+ Get complete change history of an issue including status transitions and field updates.
118
+
119
+ **Parameters:**
120
+ - `issue_key` (string): Issue key
121
+
122
+ **Example:** `get_issue_history("PROJ-123")`
123
+
124
+ #### `get_issue_links`
125
+ Get all linked issues (blocks, relates to, etc.).
126
+
127
+ **Parameters:**
128
+ - `issue_key` (string): Issue key
129
+
130
+ **Example:** `get_issue_links("PROJ-123")`
131
+
132
+ ### Search & Discovery
133
+
134
+ #### `search_issues`
135
+ Search for issues using JQL (Jira Query Language).
136
+
137
+ **Parameters:**
138
+ - `jql` (string): JQL query (e.g., 'project = PROJ AND status = "In Progress"')
139
+ - `max_results` (int, optional): Maximum results (default: 50)
140
+ - `fields` (string, optional): Comma-separated field list
141
+
142
+ **Examples:**
143
+ ```python
144
+ search_issues('project = MYPROJ')
145
+ search_issues('assignee = currentUser() AND status != Done')
146
+ search_issues('updated >= -7d ORDER BY updated DESC')
147
+ ```
148
+
149
+ ### Epic & Sprint Management
150
+
151
+ #### `get_epic_details`
152
+ Get epic information including child issues, progress metrics, and story points.
153
+
154
+ **Parameters:**
155
+ - `epic_key` (string): Epic issue key
156
+
157
+ **Example:** `get_epic_details("PROJ-123")`
158
+
159
+ #### `get_sprint_info`
160
+ Get sprint information for a board.
161
+
162
+ **Parameters:**
163
+ - `board_id` (int): Jira board ID
164
+ - `sprint_id` (int, optional): Specific sprint ID (omit for all sprints)
165
+
166
+ **Examples:**
167
+ ```python
168
+ get_sprint_info(42) # All sprints for board 42
169
+ get_sprint_info(42, 123) # Specific sprint
170
+ ```
171
+
172
+ ### Project Management
173
+
174
+ #### `get_project_releases`
175
+ Get all releases/versions for a project with associated issues.
176
+
177
+ **Parameters:**
178
+ - `project_key` (string): Project key (e.g., "PROJ")
179
+
180
+ **Example:** `get_project_releases("PROJ")`
181
+
182
+ ### Issue Modification
183
+
184
+ #### `create_issue`
185
+ Create a new Jira issue.
186
+
187
+ **Parameters:**
188
+ - `project_key` (string): Project key
189
+ - `summary` (string): Issue title
190
+ - `description` (string): Issue description
191
+ - `issue_type` (string, optional): Issue type (default: "Task")
192
+
193
+ **Example:** `create_issue("PROJ", "Fix bug", "Description here", "Bug")`
194
+
195
+ #### `update_issue`
196
+ Update fields of an existing issue.
197
+
198
+ **Parameters:**
199
+ - `issue_key` (string): Issue key
200
+ - `fields` (dict): Fields to update
201
+
202
+ **Examples:**
203
+ ```python
204
+ update_issue("PROJ-123", {"summary": "New title"})
205
+ update_issue("PROJ-123", {"priority": {"name": "High"}})
206
+ update_issue("PROJ-123", {"labels": ["bug", "urgent"]})
207
+ ```
208
+
209
+ #### `transition_issue`
210
+ Move an issue to a new status.
211
+
212
+ **Parameters:**
213
+ - `issue_key` (string): Issue key
214
+ - `transition_name` (string): Transition name (e.g., "In Progress", "Done")
215
+
216
+ **Example:** `transition_issue("PROJ-123", "In Progress")`
217
+
218
+ #### `assign_issue`
219
+ Assign an issue to a user.
220
+
221
+ **Parameters:**
222
+ - `issue_key` (string): Issue key
223
+ - `assignee` (string): Username/email (use "none" to unassign)
224
+
225
+ **Example:** `assign_issue("PROJ-123", "user@company.com")`
226
+
227
+ #### `add_comment`
228
+ Add a comment to an issue.
229
+
230
+ **Parameters:**
231
+ - `issue_key` (string): Issue key
232
+ - `comment_text` (string): Comment text
233
+
234
+ **Example:** `add_comment("PROJ-123", "This is a comment")`
235
+
236
+ ## Development
237
+
238
+ ### Local Development Setup
239
+
240
+ 1. **Clone the repository**
241
+ ```bash
242
+ git clone <repository-url>
243
+ cd mcp-jira
244
+ ```
245
+
246
+ 2. **Install dependencies**
247
+ ```bash
248
+ uv sync
249
+ ```
250
+
251
+ 3. **Configure environment**
252
+ ```bash
253
+ cp env.template .env
254
+ # Edit .env with your Jira credentials:
255
+ # JIRA_URL=https://your-instance.atlassian.net/
256
+ # JIRA_EMAIL=your-email@company.com
257
+ # JIRA_TOKEN=your-api-token
258
+ ```
259
+
260
+ 4. **Run the server**
261
+ ```bash
262
+ uv run mcp_jira/server.py
263
+ ```
264
+
265
+ ### Testing with Bob
266
+
267
+ 1. **Add to Bob's MCP settings** (`~/.bob/mcp_settings.json` or via Bob UI):
268
+ ```json
269
+ {
270
+ "mcpServers": {
271
+ "jira": {
272
+ "command": "uv",
273
+ "args": ["--directory", "/path/to/mcp-jira", "run", "mcp_jira/server.py"],
274
+ "env": {
275
+ "JIRA_URL": "https://your-instance.atlassian.net/",
276
+ "JIRA_EMAIL": "your-email@company.com",
277
+ "JIRA_TOKEN": "your-api-token"
278
+ }
279
+ }
280
+ }
281
+ }
282
+ ```
283
+
284
+ 2. **Restart Bob** to load the MCP server
285
+
286
+ 3. **Switch to Advanced mode** in Bob to access MCP tools
287
+
288
+ 4. **Test the connection**:
289
+ - Ask Bob: "Search for issues in project PROJ"
290
+ - Or: "Get details for issue PROJ-123"
291
+
292
+ ### Running Tests
293
+
294
+ ```bash
295
+ # Run tests
296
+ uv run pytest
297
+
298
+ # Run with coverage
299
+ uv run pytest --cov
300
+ ```
301
+
302
+ ## Use Cases
303
+
304
+ - **AI-Assisted Development**: Let AI assistants fetch and analyze Jira issues
305
+ - **Automated Workflows**: Integrate Jira data into automated processes
306
+ - **Context-Aware Coding**: Provide issue context to AI coding assistants
307
+ - **Documentation**: Auto-generate documentation from Jira issues
308
+
309
+ ## Roadmap
310
+
311
+ - [ ] Support for creating and updating issues
312
+ - [ ] Advanced search capabilities
313
+ - [ ] Support for Jira workflows and transitions
314
+ - [ ] Enhanced attachment handling (PDFs, images)
315
+ - [ ] Bulk operations support
316
+
317
+ ## Contributing
318
+
319
+ Contributions are welcome! Please feel free to submit a Pull Request.
320
+
321
+ ## License
322
+
323
+ MIT License - see [LICENSE](LICENSE) file for details.
324
+
325
+ ## Support
326
+
327
+ - **Issues**: [GitHub Issues](https://github.com/IBM/mcp-jira/issues)
328
+ - **Documentation**: [Full Documentation](https://github.com/IBM/mcp-jira)
329
+
330
+ ## Acknowledgments
331
+
332
+ Built with:
333
+ - [FastMCP](https://github.com/jlowin/fastmcp) - Fast MCP server framework
334
+ - [jira-python](https://github.com/pycontribs/jira) - Python Jira library
335
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP specification
@@ -0,0 +1,307 @@
1
+ # MCP Server for JIRA
2
+
3
+ A Model Context Protocol (MCP) server that provides seamless integration with Jira. This server enables AI assistants to retrieve issue information, comments, and attachments from any Jira instance.
4
+
5
+ ## Features
6
+
7
+ - 🎫 **Issue Management**: Get, create, update, and transition issues
8
+ - 🔍 **Advanced Search**: JQL-based issue search with custom fields
9
+ - 📊 **Epic & Sprint Tracking**: Monitor progress, story points, and completion
10
+ - 🔗 **Issue Relationships**: View and manage issue links
11
+ - 💬 **Comments**: Add and retrieve issue comments
12
+ - 📎 **Attachments**: Download issue attachments
13
+ - 📜 **History**: Track all changes to issues
14
+ - 🚀 **Release Management**: View project versions and releases
15
+ - 👥 **Assignment**: Assign/unassign issues to users
16
+ - 🔒 **Secure Authentication**: Uses Jira API tokens
17
+
18
+ ## Installation
19
+
20
+ ### Using uvx (Recommended)
21
+
22
+ ```bash
23
+ uvx jira-mcp-tools
24
+ ```
25
+
26
+ ### Using pip
27
+
28
+ ```bash
29
+ pip3 install jira-mcp-tools
30
+ ```
31
+
32
+ ## Prerequisites
33
+
34
+ - Python 3.10 or higher
35
+ - Jira API token ([How to create](https://jsw.ibm.com/plugins/servlet/de.resolution.apitokenauth/admin))
36
+ - UV package manager ([Installation guide](https://docs.astral.sh/uv/getting-started/installation/))
37
+
38
+ ## Configuration
39
+
40
+ ### Environment Variables
41
+
42
+ The server requires three environment variables:
43
+
44
+ - `JIRA_URL`: Your Jira instance URL
45
+ - `JIRA_EMAIL`: Your Jira account email
46
+ - `JIRA_TOKEN`: Your Jira API token
47
+
48
+ ### MCP Client Configuration
49
+
50
+ Add to your MCP client configuration (e.g., Claude Desktop, Bob):
51
+
52
+ ```json
53
+ {
54
+ "mcpServers": {
55
+ "jira": {
56
+ "command": "uvx",
57
+ "args": ["jira-mcp-tools"],
58
+ "env": {
59
+ "JIRA_URL": "https://jsw.ibm.com/",
60
+ "JIRA_EMAIL": "your-email@ibm.com",
61
+ "JIRA_TOKEN": "your-api-token"
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ ## Available Tools
69
+
70
+ ### Issue Information
71
+
72
+ #### `get_jira_ticket_info`
73
+ Get detailed information about a Jira issue including description and comments.
74
+
75
+ **Parameters:**
76
+ - `issue_key` (string): Issue key (e.g., "PROJ-123")
77
+
78
+ **Example:** `get_jira_ticket_info("PROJ-123")`
79
+
80
+ #### `get_jira_ticket_attachments`
81
+ Download attachments from a Jira issue.
82
+
83
+ **Parameters:**
84
+ - `issue_key` (string): Issue key
85
+
86
+ **Example:** `get_jira_ticket_attachments("PROJ-456")`
87
+
88
+ #### `get_issue_history`
89
+ Get complete change history of an issue including status transitions and field updates.
90
+
91
+ **Parameters:**
92
+ - `issue_key` (string): Issue key
93
+
94
+ **Example:** `get_issue_history("PROJ-123")`
95
+
96
+ #### `get_issue_links`
97
+ Get all linked issues (blocks, relates to, etc.).
98
+
99
+ **Parameters:**
100
+ - `issue_key` (string): Issue key
101
+
102
+ **Example:** `get_issue_links("PROJ-123")`
103
+
104
+ ### Search & Discovery
105
+
106
+ #### `search_issues`
107
+ Search for issues using JQL (Jira Query Language).
108
+
109
+ **Parameters:**
110
+ - `jql` (string): JQL query (e.g., 'project = PROJ AND status = "In Progress"')
111
+ - `max_results` (int, optional): Maximum results (default: 50)
112
+ - `fields` (string, optional): Comma-separated field list
113
+
114
+ **Examples:**
115
+ ```python
116
+ search_issues('project = MYPROJ')
117
+ search_issues('assignee = currentUser() AND status != Done')
118
+ search_issues('updated >= -7d ORDER BY updated DESC')
119
+ ```
120
+
121
+ ### Epic & Sprint Management
122
+
123
+ #### `get_epic_details`
124
+ Get epic information including child issues, progress metrics, and story points.
125
+
126
+ **Parameters:**
127
+ - `epic_key` (string): Epic issue key
128
+
129
+ **Example:** `get_epic_details("PROJ-123")`
130
+
131
+ #### `get_sprint_info`
132
+ Get sprint information for a board.
133
+
134
+ **Parameters:**
135
+ - `board_id` (int): Jira board ID
136
+ - `sprint_id` (int, optional): Specific sprint ID (omit for all sprints)
137
+
138
+ **Examples:**
139
+ ```python
140
+ get_sprint_info(42) # All sprints for board 42
141
+ get_sprint_info(42, 123) # Specific sprint
142
+ ```
143
+
144
+ ### Project Management
145
+
146
+ #### `get_project_releases`
147
+ Get all releases/versions for a project with associated issues.
148
+
149
+ **Parameters:**
150
+ - `project_key` (string): Project key (e.g., "PROJ")
151
+
152
+ **Example:** `get_project_releases("PROJ")`
153
+
154
+ ### Issue Modification
155
+
156
+ #### `create_issue`
157
+ Create a new Jira issue.
158
+
159
+ **Parameters:**
160
+ - `project_key` (string): Project key
161
+ - `summary` (string): Issue title
162
+ - `description` (string): Issue description
163
+ - `issue_type` (string, optional): Issue type (default: "Task")
164
+
165
+ **Example:** `create_issue("PROJ", "Fix bug", "Description here", "Bug")`
166
+
167
+ #### `update_issue`
168
+ Update fields of an existing issue.
169
+
170
+ **Parameters:**
171
+ - `issue_key` (string): Issue key
172
+ - `fields` (dict): Fields to update
173
+
174
+ **Examples:**
175
+ ```python
176
+ update_issue("PROJ-123", {"summary": "New title"})
177
+ update_issue("PROJ-123", {"priority": {"name": "High"}})
178
+ update_issue("PROJ-123", {"labels": ["bug", "urgent"]})
179
+ ```
180
+
181
+ #### `transition_issue`
182
+ Move an issue to a new status.
183
+
184
+ **Parameters:**
185
+ - `issue_key` (string): Issue key
186
+ - `transition_name` (string): Transition name (e.g., "In Progress", "Done")
187
+
188
+ **Example:** `transition_issue("PROJ-123", "In Progress")`
189
+
190
+ #### `assign_issue`
191
+ Assign an issue to a user.
192
+
193
+ **Parameters:**
194
+ - `issue_key` (string): Issue key
195
+ - `assignee` (string): Username/email (use "none" to unassign)
196
+
197
+ **Example:** `assign_issue("PROJ-123", "user@company.com")`
198
+
199
+ #### `add_comment`
200
+ Add a comment to an issue.
201
+
202
+ **Parameters:**
203
+ - `issue_key` (string): Issue key
204
+ - `comment_text` (string): Comment text
205
+
206
+ **Example:** `add_comment("PROJ-123", "This is a comment")`
207
+
208
+ ## Development
209
+
210
+ ### Local Development Setup
211
+
212
+ 1. **Clone the repository**
213
+ ```bash
214
+ git clone <repository-url>
215
+ cd mcp-jira
216
+ ```
217
+
218
+ 2. **Install dependencies**
219
+ ```bash
220
+ uv sync
221
+ ```
222
+
223
+ 3. **Configure environment**
224
+ ```bash
225
+ cp env.template .env
226
+ # Edit .env with your Jira credentials:
227
+ # JIRA_URL=https://your-instance.atlassian.net/
228
+ # JIRA_EMAIL=your-email@company.com
229
+ # JIRA_TOKEN=your-api-token
230
+ ```
231
+
232
+ 4. **Run the server**
233
+ ```bash
234
+ uv run mcp_jira/server.py
235
+ ```
236
+
237
+ ### Testing with Bob
238
+
239
+ 1. **Add to Bob's MCP settings** (`~/.bob/mcp_settings.json` or via Bob UI):
240
+ ```json
241
+ {
242
+ "mcpServers": {
243
+ "jira": {
244
+ "command": "uv",
245
+ "args": ["--directory", "/path/to/mcp-jira", "run", "mcp_jira/server.py"],
246
+ "env": {
247
+ "JIRA_URL": "https://your-instance.atlassian.net/",
248
+ "JIRA_EMAIL": "your-email@company.com",
249
+ "JIRA_TOKEN": "your-api-token"
250
+ }
251
+ }
252
+ }
253
+ }
254
+ ```
255
+
256
+ 2. **Restart Bob** to load the MCP server
257
+
258
+ 3. **Switch to Advanced mode** in Bob to access MCP tools
259
+
260
+ 4. **Test the connection**:
261
+ - Ask Bob: "Search for issues in project PROJ"
262
+ - Or: "Get details for issue PROJ-123"
263
+
264
+ ### Running Tests
265
+
266
+ ```bash
267
+ # Run tests
268
+ uv run pytest
269
+
270
+ # Run with coverage
271
+ uv run pytest --cov
272
+ ```
273
+
274
+ ## Use Cases
275
+
276
+ - **AI-Assisted Development**: Let AI assistants fetch and analyze Jira issues
277
+ - **Automated Workflows**: Integrate Jira data into automated processes
278
+ - **Context-Aware Coding**: Provide issue context to AI coding assistants
279
+ - **Documentation**: Auto-generate documentation from Jira issues
280
+
281
+ ## Roadmap
282
+
283
+ - [ ] Support for creating and updating issues
284
+ - [ ] Advanced search capabilities
285
+ - [ ] Support for Jira workflows and transitions
286
+ - [ ] Enhanced attachment handling (PDFs, images)
287
+ - [ ] Bulk operations support
288
+
289
+ ## Contributing
290
+
291
+ Contributions are welcome! Please feel free to submit a Pull Request.
292
+
293
+ ## License
294
+
295
+ MIT License - see [LICENSE](LICENSE) file for details.
296
+
297
+ ## Support
298
+
299
+ - **Issues**: [GitHub Issues](https://github.com/IBM/mcp-jira/issues)
300
+ - **Documentation**: [Full Documentation](https://github.com/IBM/mcp-jira)
301
+
302
+ ## Acknowledgments
303
+
304
+ Built with:
305
+ - [FastMCP](https://github.com/jlowin/fastmcp) - Fast MCP server framework
306
+ - [jira-python](https://github.com/pycontribs/jira) - Python Jira library
307
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP specification
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "jira-mcp-tools"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = "Model Context Protocol server for Jira integration"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -34,11 +34,11 @@ Repository = "https://github.com/IBM/jira-mcp-tools"
34
34
  Issues = "https://github.com/IBM/jira-mcp-tools/issues"
35
35
 
36
36
  [project.scripts]
37
- jira-mcp-tools = "mcp-jira.server:main"
37
+ jira-mcp-tools = "mcp_jira.server:main"
38
38
 
39
39
  [build-system]
40
40
  requires = ["hatchling"]
41
41
  build-backend = "hatchling.build"
42
42
 
43
43
  [tool.hatch.build.targets.wheel]
44
- packages = ["src/mcp-jira"]
44
+ packages = ["src/mcp_jira"]
@@ -461,6 +461,66 @@ class JiraApiClient:
461
461
 
462
462
  except Exception as e:
463
463
  raise ValueError(f"Failed to assign issue: {str(e)}")
464
+
465
+ async def get_development_links(self, issue_key: str):
466
+ """Get development links (GitHub branches, PRs, commits) for a Jira issue."""
467
+ try:
468
+ issue = self.jira.issue(issue_key)
469
+
470
+ # Get remote links which contain development information
471
+ remote_links = self.jira.remote_links(issue)
472
+
473
+ dev_links = {
474
+ 'issue_key': issue_key,
475
+ 'summary': issue.fields.summary,
476
+ 'branches': [],
477
+ 'pull_requests': [],
478
+ 'commits': [],
479
+ 'other_links': []
480
+ }
481
+
482
+ for link in remote_links:
483
+ link_obj = link.object if hasattr(link, 'object') else {}
484
+ url = link_obj.get('url', '') if isinstance(link_obj, dict) else ''
485
+ title = link_obj.get('title', '') if isinstance(link_obj, dict) else ''
486
+
487
+ # Categorize based on URL patterns
488
+ if 'github.com' in url or 'gitlab.com' in url or 'bitbucket.org' in url:
489
+ if '/pull/' in url or '/merge_requests/' in url:
490
+ dev_links['pull_requests'].append({
491
+ 'url': url,
492
+ 'title': title,
493
+ 'status': link_obj.get('status', {}).get('resolved', False) if isinstance(link_obj, dict) else None
494
+ })
495
+ elif '/tree/' in url or '/branch/' in url:
496
+ dev_links['branches'].append({
497
+ 'url': url,
498
+ 'title': title
499
+ })
500
+ elif '/commit/' in url:
501
+ dev_links['commits'].append({
502
+ 'url': url,
503
+ 'title': title
504
+ })
505
+ else:
506
+ dev_links['other_links'].append({
507
+ 'url': url,
508
+ 'title': title
509
+ })
510
+ else:
511
+ dev_links['other_links'].append({
512
+ 'url': url,
513
+ 'title': title
514
+ })
515
+
516
+ dev_links['total_branches'] = len(dev_links['branches'])
517
+ dev_links['total_pull_requests'] = len(dev_links['pull_requests'])
518
+ dev_links['total_commits'] = len(dev_links['commits'])
519
+
520
+ return json.dumps(dev_links, indent=2)
521
+
522
+ except Exception as e:
523
+ raise ValueError(f"Failed to get development links: {str(e)}")
464
524
 
465
525
  class JiraContext:
466
526
  def __init__(self, connector: JiraApiClient):
@@ -738,6 +798,25 @@ async def assign_issue(issue_key: str, assignee: str, ctx: Context) -> str:
738
798
  except ValueError as e:
739
799
  return f"Error: {str(e)}"
740
800
 
801
+ @mcp.tool()
802
+ async def get_development_links(issue_key: str, ctx: Context) -> str:
803
+ """Get development links (GitHub branches, PRs, commits) for a Jira issue.
804
+
805
+ Args:
806
+ issue_key: The issue key (e.g., 'PROJ-123')
807
+
808
+ Returns:
809
+ Development links including GitHub/GitLab/Bitbucket branches, pull requests, and commits
810
+ """
811
+ if not issue_key:
812
+ return "Error: Missing required parameter 'issue_key'"
813
+
814
+ connector = ctx.request_context.lifespan_context.connector
815
+ try:
816
+ return await connector.get_development_links(issue_key)
817
+ except ValueError as e:
818
+ return f"Error: {str(e)}"
819
+
741
820
  def main():
742
821
  mcp.run()
743
822
 
@@ -1,189 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: jira-mcp-tools
3
- Version: 0.2.0
4
- Summary: Model Context Protocol server for Jira integration
5
- Project-URL: Homepage, https://github.com/IBM/jira-mcp-tools
6
- Project-URL: Repository, https://github.com/IBM/jira-mcp-tools
7
- Project-URL: Issues, https://github.com/IBM/jira-mcp-tools/issues
8
- Author-email: IBM <opensource@ibm.com>
9
- License: MIT
10
- License-File: LICENSE
11
- Keywords: ai,jira,llm,mcp,model-context-protocol
12
- Classifier: Development Status :: 4 - Beta
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
- Requires-Python: >=3.10
21
- Requires-Dist: click>=8.0.0
22
- Requires-Dist: fastmcp>=2.6.1
23
- Requires-Dist: jira>=3.4.0
24
- Requires-Dist: python-dotenv>=1.0.0
25
- Requires-Dist: requests>=2.32.5
26
- Requires-Dist: ruff>=0.11.0
27
- Description-Content-Type: text/markdown
28
-
29
- # MCP Server for JIRA
30
-
31
- A Model Context Protocol (MCP) server that provides seamless integration with Jira. This server enables AI assistants to retrieve issue information, comments, and attachments from any Jira instance.
32
-
33
- ## Features
34
-
35
- - 🎫 **Get Issue Information**: Retrieve detailed issue descriptions and comments
36
- - 📎 **Download Attachments**: Access and download issue attachments
37
- - 🔒 **Secure Authentication**: Uses Jira API tokens for secure access
38
- - 🌐 **Universal Compatibility**: Works with Jira Cloud, Server, and Data Center
39
-
40
- ## Installation
41
-
42
- ### Using uvx (Recommended)
43
-
44
- ```bash
45
- uvx mcp-jira
46
- ```
47
-
48
- ### Using pip
49
-
50
- ```bash
51
- pip install mcp-jira
52
- ```
53
-
54
- ## Prerequisites
55
-
56
- - Python 3.10 or higher
57
- - Jira account with API access
58
- - Jira API token ([How to create](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/))
59
-
60
- ## Configuration
61
-
62
- ### Environment Variables
63
-
64
- The server requires three environment variables:
65
-
66
- - `JIRA_URL`: Your Jira instance URL (e.g., `https://your-company.atlassian.net/`)
67
- - `JIRA_EMAIL`: Your Jira account email
68
- - `JIRA_TOKEN`: Your Jira API token
69
-
70
- ### MCP Client Configuration
71
-
72
- Add to your MCP client configuration (e.g., Claude Desktop, Bob):
73
-
74
- ```json
75
- {
76
- "mcpServers": {
77
- "jira": {
78
- "command": "uvx",
79
- "args": ["mcp-jira"],
80
- "env": {
81
- "JIRA_URL": "https://your-jira-instance.com/",
82
- "JIRA_EMAIL": "your-email@company.com",
83
- "JIRA_TOKEN": "your-api-token"
84
- }
85
- }
86
- }
87
- }
88
- ```
89
-
90
- ## Available Tools
91
-
92
- ### `get_jira_ticket_info`
93
-
94
- Retrieves comprehensive information about a Jira issue.
95
-
96
- **Parameters:**
97
- - `issue_key` (string): The Jira issue key (e.g., "PROJ-123")
98
-
99
- **Returns:**
100
- - Issue description
101
- - All comments with author and timestamp
102
- - Comment bodies
103
-
104
- **Example:**
105
- ```python
106
- get_jira_ticket_info("PROJ-123")
107
- ```
108
-
109
- ### `get_jira_ticket_attachments`
110
-
111
- Downloads and retrieves attachments from a Jira issue.
112
-
113
- **Parameters:**
114
- - `issue_key` (string): The Jira issue key (e.g., "PROJ-123")
115
-
116
- **Returns:**
117
- - List of attachments with filenames and content
118
-
119
- **Example:**
120
- ```python
121
- get_jira_ticket_attachments("PROJ-456")
122
- ```
123
-
124
- ## Development
125
-
126
- ### Setup
127
-
128
- 1. Clone the repository
129
- 2. Install dependencies:
130
- ```bash
131
- uv sync
132
- ```
133
-
134
- 3. Create a `.env` file based on `env.template`:
135
- ```bash
136
- cp env.template .env
137
- # Edit .env with your credentials
138
- ```
139
-
140
- ### Running Locally
141
-
142
- ```bash
143
- uv run server.py
144
- ```
145
-
146
- ### Testing
147
-
148
- ```bash
149
- # Run tests
150
- uv run pytest
151
-
152
- # Run with coverage
153
- uv run pytest --cov
154
- ```
155
-
156
- ## Use Cases
157
-
158
- - **AI-Assisted Development**: Let AI assistants fetch and analyze Jira issues
159
- - **Automated Workflows**: Integrate Jira data into automated processes
160
- - **Context-Aware Coding**: Provide issue context to AI coding assistants
161
- - **Documentation**: Auto-generate documentation from Jira issues
162
-
163
- ## Roadmap
164
-
165
- - [ ] Support for creating and updating issues
166
- - [ ] Advanced search capabilities
167
- - [ ] Support for Jira workflows and transitions
168
- - [ ] Enhanced attachment handling (PDFs, images)
169
- - [ ] Bulk operations support
170
-
171
- ## Contributing
172
-
173
- Contributions are welcome! Please feel free to submit a Pull Request.
174
-
175
- ## License
176
-
177
- MIT License - see [LICENSE](LICENSE) file for details.
178
-
179
- ## Support
180
-
181
- - **Issues**: [GitHub Issues](https://github.com/IBM/mcp-jira/issues)
182
- - **Documentation**: [Full Documentation](https://github.com/IBM/mcp-jira)
183
-
184
- ## Acknowledgments
185
-
186
- Built with:
187
- - [FastMCP](https://github.com/jlowin/fastmcp) - Fast MCP server framework
188
- - [jira-python](https://github.com/pycontribs/jira) - Python Jira library
189
- - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP specification
@@ -1,161 +0,0 @@
1
- # MCP Server for JIRA
2
-
3
- A Model Context Protocol (MCP) server that provides seamless integration with Jira. This server enables AI assistants to retrieve issue information, comments, and attachments from any Jira instance.
4
-
5
- ## Features
6
-
7
- - 🎫 **Get Issue Information**: Retrieve detailed issue descriptions and comments
8
- - 📎 **Download Attachments**: Access and download issue attachments
9
- - 🔒 **Secure Authentication**: Uses Jira API tokens for secure access
10
- - 🌐 **Universal Compatibility**: Works with Jira Cloud, Server, and Data Center
11
-
12
- ## Installation
13
-
14
- ### Using uvx (Recommended)
15
-
16
- ```bash
17
- uvx mcp-jira
18
- ```
19
-
20
- ### Using pip
21
-
22
- ```bash
23
- pip install mcp-jira
24
- ```
25
-
26
- ## Prerequisites
27
-
28
- - Python 3.10 or higher
29
- - Jira account with API access
30
- - Jira API token ([How to create](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/))
31
-
32
- ## Configuration
33
-
34
- ### Environment Variables
35
-
36
- The server requires three environment variables:
37
-
38
- - `JIRA_URL`: Your Jira instance URL (e.g., `https://your-company.atlassian.net/`)
39
- - `JIRA_EMAIL`: Your Jira account email
40
- - `JIRA_TOKEN`: Your Jira API token
41
-
42
- ### MCP Client Configuration
43
-
44
- Add to your MCP client configuration (e.g., Claude Desktop, Bob):
45
-
46
- ```json
47
- {
48
- "mcpServers": {
49
- "jira": {
50
- "command": "uvx",
51
- "args": ["mcp-jira"],
52
- "env": {
53
- "JIRA_URL": "https://your-jira-instance.com/",
54
- "JIRA_EMAIL": "your-email@company.com",
55
- "JIRA_TOKEN": "your-api-token"
56
- }
57
- }
58
- }
59
- }
60
- ```
61
-
62
- ## Available Tools
63
-
64
- ### `get_jira_ticket_info`
65
-
66
- Retrieves comprehensive information about a Jira issue.
67
-
68
- **Parameters:**
69
- - `issue_key` (string): The Jira issue key (e.g., "PROJ-123")
70
-
71
- **Returns:**
72
- - Issue description
73
- - All comments with author and timestamp
74
- - Comment bodies
75
-
76
- **Example:**
77
- ```python
78
- get_jira_ticket_info("PROJ-123")
79
- ```
80
-
81
- ### `get_jira_ticket_attachments`
82
-
83
- Downloads and retrieves attachments from a Jira issue.
84
-
85
- **Parameters:**
86
- - `issue_key` (string): The Jira issue key (e.g., "PROJ-123")
87
-
88
- **Returns:**
89
- - List of attachments with filenames and content
90
-
91
- **Example:**
92
- ```python
93
- get_jira_ticket_attachments("PROJ-456")
94
- ```
95
-
96
- ## Development
97
-
98
- ### Setup
99
-
100
- 1. Clone the repository
101
- 2. Install dependencies:
102
- ```bash
103
- uv sync
104
- ```
105
-
106
- 3. Create a `.env` file based on `env.template`:
107
- ```bash
108
- cp env.template .env
109
- # Edit .env with your credentials
110
- ```
111
-
112
- ### Running Locally
113
-
114
- ```bash
115
- uv run server.py
116
- ```
117
-
118
- ### Testing
119
-
120
- ```bash
121
- # Run tests
122
- uv run pytest
123
-
124
- # Run with coverage
125
- uv run pytest --cov
126
- ```
127
-
128
- ## Use Cases
129
-
130
- - **AI-Assisted Development**: Let AI assistants fetch and analyze Jira issues
131
- - **Automated Workflows**: Integrate Jira data into automated processes
132
- - **Context-Aware Coding**: Provide issue context to AI coding assistants
133
- - **Documentation**: Auto-generate documentation from Jira issues
134
-
135
- ## Roadmap
136
-
137
- - [ ] Support for creating and updating issues
138
- - [ ] Advanced search capabilities
139
- - [ ] Support for Jira workflows and transitions
140
- - [ ] Enhanced attachment handling (PDFs, images)
141
- - [ ] Bulk operations support
142
-
143
- ## Contributing
144
-
145
- Contributions are welcome! Please feel free to submit a Pull Request.
146
-
147
- ## License
148
-
149
- MIT License - see [LICENSE](LICENSE) file for details.
150
-
151
- ## Support
152
-
153
- - **Issues**: [GitHub Issues](https://github.com/IBM/mcp-jira/issues)
154
- - **Documentation**: [Full Documentation](https://github.com/IBM/mcp-jira)
155
-
156
- ## Acknowledgments
157
-
158
- Built with:
159
- - [FastMCP](https://github.com/jlowin/fastmcp) - Fast MCP server framework
160
- - [jira-python](https://github.com/pycontribs/jira) - Python Jira library
161
- - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP specification
File without changes