jira_mcp_py

MCP.Pizza Chef: Ivlad003

jira_mcp_py is a Model Context Protocol (MCP) server designed to integrate Jira with large language models like Claude. It provides tools to execute JQL queries, retrieve detailed Jira ticket information, and automatically detect pull request links within ticket descriptions and comments. The server supports customizable project context, enhancing the relevance and precision of Jira data interactions. It requires Python 3.10+, a Jira account with API access, and works with MCP clients such as Claude Desktop. This server streamlines Jira data access and manipulation for AI-driven workflows and automation.

Use This MCP server To

Run JQL queries on Jira instances Retrieve detailed Jira ticket information Automatically extract pull request links from tickets Customize project context for Jira operations

README

MCP Jira Server

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

  1. Clone this repository or download the source code

  2. Install dependencies:

    pip install mcp[cli] httpx
  3. 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

  1. First, ensure Claude Desktop is installed and updated to the latest version

  2. Edit your Claude Desktop configuration file:

    macOS:

    code ~/Library/Application\ Support/Claude/claude_desktop_config.json

    Windows:

    code $env:APPDATA\Claude\claude_desktop_config.json
  3. 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"
          }
        }
      }
    }
  4. Save the configuration file and restart Claude Desktop

  5. 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

  1. Authentication Errors:

    • Verify your Jira credentials are set correctly in environment variables
    • Check that your API token is valid and has not expired
  2. Connection Problems:

    • Ensure you have internet connectivity
    • Verify your Jira domain is correct
  3. 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

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:

  1. Adding new methods to the JiraAPI class
  2. 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

jira_mcp_py FAQ

How do I install jira_mcp_py?
Clone the repository, install dependencies with 'pip install mcp[cli] httpx', and configure Jira credentials as environment variables.
What Python version is required for jira_mcp_py?
Python 3.10 or higher is required to run jira_mcp_py.
How do I configure Jira credentials for jira_mcp_py?
Set environment variables like JIRA_DOMAIN, JIRA_EMAIL, and JIRA_API_TOKEN with your Jira account details.
Can jira_mcp_py detect pull request links automatically?
Yes, it extracts pull request links from Jira ticket descriptions and comments automatically.
Which MCP clients are compatible with jira_mcp_py?
It works with MCP clients such as Claude Desktop and other compatible MCP clients.
Is jira_mcp_py limited to a specific Jira project?
No, it supports customizable project context for all operations.
Does jira_mcp_py support multiple LLM providers?
Yes, it is designed to work with LLMs like Claude, and can be integrated with others such as OpenAI and Gemini.
How secure is the Jira API access in jira_mcp_py?
Jira API access uses your account credentials securely via environment variables, minimizing exposure risks.