Enables searching for issues using JQL queries, retrieving comprehensive issue details including subtasks, linked issues, comments, and metadata for project management and release planning.
JIRA MCP Server
A Model Context Protocol (MCP) server that enables Claude AI to interact with JIRA for project management, issue tracking, and release planning. This server provides seamless integration between Claude and your JIRA instance.
Features
MCP Tools
1. search_jira_issues
Search for JIRA issues using JQL (JIRA Query Language).
Parameters:
jql_query(str, required): JQL query stringmax_results(int, optional): Maximum number of results (default: 100)include_comments(bool, optional): Include issue comments (default: False)
Example:
2. get_jira_issue_details (Enhanced)
Get comprehensive details about a specific JIRA issue, including subtasks and linked issues.
Parameters:
issue_key(str, required): JIRA issue key (e.g., "PROJECT-123")include_comments(bool, optional): Include comments (default: True)include_subtasks(bool, optional): Include child issues/subtasks (default: True)include_linked_issues(bool, optional): Include related issues with link types (default: True)
Returns:
Example:
Key Enhancements
šÆ Single API Call Efficiency
The enhanced get_jira_issue_details uses JIRA's expand parameters to fetch issue details, subtasks, and linked issues in a single API call, reducing latency and API usage.
š Automatic Relationship Resolution
No need for separate JQL queries like:
ā
parent = PROJECT-123(for subtasks)ā
issue in linkedIssues(PROJECT-123)(for linked issues)
Everything is fetched automatically!
šļø Flexible Options
Choose exactly what data you need with granular control over comments, subtasks, and linked issues.
Installation
Prerequisites
Python 3.8+
JIRA API Bearer token
Setup
Clone or download the repository
Install dependencies:
Key dependencies:
fastmcp==0.4.1- MCP server frameworkmcp==1.5.0- Model Context Protocol SDKrequests==2.32.3- HTTP client for JIRA API
Set up environment variables:
Create a .env file or set environment variables:
On Windows:
Getting Your JIRA API Token
Log in to your JIRA instance
Navigate to Profile ā Personal Access Tokens
Create a new token with appropriate permissions
Copy the token and store it securely
Required Permissions:
Read issues
Browse projects
View comments
Usage
Starting the MCP Server
The server will start and listen for MCP protocol messages from Claude.
Using with Claude Desktop
Add to your Claude Desktop MCP configuration:
macOS/Linux: ~/.config/claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Example Workflows
1. Finding and Analyzing Issues
2. Getting Complete Issue Context
3. Release Planning Analysis
Architecture
Component Overview
API Endpoints Used
Function | Endpoint | Method | Purpose |
|
| GET | JQL-based issue search |
|
| GET | Single issue with relations |
|
| GET | Issue comments |
Data Flow
Testing
Running Unit Tests
Test Coverage
The test suite covers:
ā Fetching issues with subtasks
ā Fetching issues with linked issues
ā Handling issues with no relations
ā Optional parameter combinations
ā Error handling (404, API errors, exceptions)
ā Input validation
ā Missing authentication token
ā Backward compatibility
Manual Testing
Test the server with real JIRA issues:
Configuration
Environment Variables
Variable | Required | Description |
| Yes | Your JIRA instance URL (e.g., |
| Yes | Bearer token for JIRA authentication |
Development
Project Structure
Adding New Tools
To add a new MCP tool:
Define function with
@mcp.tool()decorator:
Add tests in
test_jira_mcp_tool.pyUpdate this README
Code Style
Type hints for all function parameters and returns
Comprehensive docstrings (Google style)
Error handling with try/except blocks
Null-safe field extraction from JIRA responses
Troubleshooting
Common Issues
Authentication Errors
Solution: Set the JIRA_API_TOKEN environment variable.
Connection Errors
Solution:
Check that your token is valid
Ensure the token has required permissions
Verify the token hasn't expired
Missing JIRA Server URL
Solution: Set the JIRA_SERVER_URL environment variable to your JIRA instance URL.
404 Errors
Solution:
Verify the issue key is correct
Check you have permission to view the issue
Ensure the issue exists in JIRA
Import Errors
Solution: Install dependencies:
Debug Mode
To enable debug output, uncomment the print statement in jira_mcp_server.py:
Security Considerations
Token Storage
ā Store tokens in environment variables or secure secret management
ā Never commit tokens to version control
ā Never hardcode tokens in source files
API Permissions
Grant minimal required permissions:
Read issues
Browse projects
View comments
Avoid:
Admin permissions
Issue creation/modification (unless needed)
Project administration
Network Security
All API calls use HTTPS
Bearer token authentication
No credentials stored in code
Performance
API Call Optimization
The enhanced get_jira_issue_details reduces API calls:
Before:
After:
Rate Limiting
JIRA Cloud typically limits:
~300 requests per minute per user
~100,000 requests per day per app
This server includes no built-in rate limiting. For high-volume usage, consider adding:
Request throttling
Response caching
Exponential backoff
Changelog
Version 2.0 (Current)
Enhanced get_jira_issue_details
⨠Added automatic subtask retrieval
⨠Added automatic linked issues retrieval
⨠Added optional parameters for granular control
ā” Optimized to use single API call with expand parameters
š Comprehensive docstrings and type hints
ā Full test coverage
Version 1.0
Initial Release
Basic
search_jira_issuesfunctionalityBasic
get_jira_issue_detailsfunctionalityBearer token authentication
Contributing
Guidelines
Code Quality
Add type hints
Write docstrings
Follow existing patterns
Testing
Add unit tests for new features
Ensure all tests pass
Maintain >80% coverage
Documentation
Update README for new features
Add inline comments for complex logic
Include usage examples
Submitting Changes
Test your changes thoroughly
Update tests and documentation
Submit with clear description of changes
License
MIT License - see LICENSE file for details.
Support
For issues or questions:
Check the Troubleshooting section
Review JIRA REST API documentation
Check MCP protocol documentation at https://modelcontextprotocol.io
References
Enabling AI-powered JIRA analysis and project management