MCP Jira Server
February 27, 2025 ยท View on GitHub
A Model Context Protocol (MCP) server that provides Jira integration for LLMs like Claude. This server exposes tools for executing JQL queries and retrieving detailed ticket information.
Features
- JQL Query Tool: Run JQL (Jira Query Language) queries against your Jira instance
- Ticket Details Tool: Get comprehensive information about specific Jira tickets
- PR Link Detection: Automatically extracts pull request links from descriptions and comments
- Project Context: Customizable project context for all operations
Installation
Prerequisites
- Python 3.10 or higher
- A Jira account with API access
- Claude Desktop or another MCP client
Setup
-
Clone this repository or download the source code
-
Install dependencies:
pip install mcp[cli] httpx -
Configure your Jira credentials as environment variables:
export JIRA_DOMAIN="your-domain" # e.g., "mycompany" if your Jira URL is https://mycompany.atlassian.net export JIRA_EMAIL="your-email@example.com" export JIRA_API_TOKEN="your-api-token"Note: You can generate a Jira API token from Atlassian Account Settings.
Usage with Claude Desktop
-
First, ensure Claude Desktop is installed and updated to the latest version
-
Edit your Claude Desktop configuration file:
macOS:
code ~/Library/Application\ Support/Claude/claude_desktop_config.jsonWindows:
code $env:APPDATA\Claude\claude_desktop_config.json -
Add the following configuration to enable the Jira server:
{ "mcpServers": { "jira": { "command": "python", "args": ["/absolute/path/to/jira_mcp_server.py"], "env": { "JIRA_DOMAIN": "your-domain", "JIRA_EMAIL": "your-email@example.com", "JIRA_API_TOKEN": "your-api-token" } } } } -
Save the configuration file and restart Claude Desktop
-
Verify the server is running by checking for the hammer icon in Claude's interface, which indicates available tools
Tools
execute_jql
Execute JQL queries against your Jira instance.
Arguments:
query: A JQL snippet (e.g.,summary ~ NFR ORDER BY created DESC)project_name: (Optional) The Jira project key (defaults to "LAN")
Examples:
Ask Claude to:
- "Find all open tickets in project ABC"
- "Search for high priority bugs in the LAN project"
- "Show me tickets assigned to me that were updated this week"
get_ticket_details
Get comprehensive information about a specific Jira ticket.
Arguments:
ticket_key: The full ticket key (e.g., "LAN-123")project_name: (Optional) The Jira project key (defaults to "LAN")
Examples:
Ask Claude to:
- "What's the status of ticket LAN-123?"
- "Get me details about PROJ-456 including any PR links"
- "Show me the comments on ticket ABC-789"
Troubleshooting
Common Issues
-
Authentication Errors:
- Verify your Jira credentials are set correctly in environment variables
- Check that your API token is valid and has not expired
-
Connection Problems:
- Ensure you have internet connectivity
- Verify your Jira domain is correct
-
MCP Integration Issues:
- Check Claude Desktop logs:
tail -f ~/Library/Logs/Claude/mcp*.log - Ensure the path to the server script in the configuration is absolute and correct
- Check Claude Desktop logs:
Debug Logging
To enable verbose logging, modify the setup_logging function in the code to use logging.DEBUG instead of logging.INFO.
Advanced Configuration
Customizing the Default Project
The default project is set to "LAN". You can modify this by changing the default value for the project_name parameter in both tool functions.
Adding More Tools
You can extend this server with additional Jira functionality by:
- Adding new methods to the
JiraAPIclass - Creating new tool functions with the
@mcp.tool()decorator
License
This project is open source and available under the MIT License.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
For more information about MCP, visit https://modelcontextprotocol.io