Jira MCP server

Integrates with Jira's API to enable issue searching, data cleaning, and project management automation using natural language commands.
Back to servers
Setup instructions
Provider
Dimosthenis Kaponis
Release date
Jan 11, 2025
Language
TypeScript
Stats
21 stars

This MCP server provides a convenient interface to access JIRA data through the Model Context Protocol, optimizing data payloads and handling relationship tracking for AI context windows. It supports both Jira Cloud and Jira Server/Data Center instances with various authentication methods.

Prerequisites

  • Bun (v1.0.0 or higher)
  • JIRA account with API access

Installation & Setup

Clone and build the repository

git clone [repository-url]
cd jira-mcp
bun install
bun run build

Configure environment variables

Set up the following environment variables for your JIRA instance:

JIRA_API_TOKEN=your_api_token            # API token for Cloud, PAT or password for Server/DC
JIRA_BASE_URL=your_jira_instance_url     # e.g., https://your-domain.atlassian.net
JIRA_USER_EMAIL=your_email               # Your Jira account email
JIRA_TYPE=cloud                          # 'cloud' or 'server' (optional, defaults to 'cloud')
JIRA_AUTH_TYPE=basic                     # 'basic' or 'bearer' (optional, defaults to 'basic')

Authentication methods

  • Jira Cloud: Use API tokens with Basic authentication

  • Jira Server/Data Center:

    • Basic Auth: Use username/password or API tokens
      • Set JIRA_AUTH_TYPE=basic (default)
    • Bearer Auth: Use Personal Access Tokens (PATs) - available in Data Center 8.14.0+
      • Create a PAT in your profile settings
      • Set JIRA_AUTH_TYPE=bearer
      • Use the PAT as your JIRA_API_TOKEN

Configure the MCP server

Edit the appropriate configuration file based on your operating system:

macOS:

  • Cline: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows:

  • Cline: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
  • Claude Desktop: %APPDATA%\Claude Desktop\claude_desktop_config.json

Linux:

  • Cline: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Add the following configuration under the mcpServers object:

{
  "mcpServers": {
    "jira": {
      "command": "node",
      "args": ["/absolute/path/to/jira-mcp/build/index.js"],
      "env": {
        "JIRA_API_TOKEN": "your_api_token",
        "JIRA_BASE_URL": "your_jira_instance_url",
        "JIRA_USER_EMAIL": "your_email",
        "JIRA_TYPE": "cloud",
        "JIRA_AUTH_TYPE": "basic"
      }
    }
  }
}

Restart the MCP server

Within Cline's MCP settings, restart the MCP server. Restart Claude Desktop to load the new MCP server.

Using the MCP Tools

Search issues

Search JIRA issues using JQL. Returns up to 50 results per request.

{
  searchString: string; // JQL search string
}

Get epic children

Get all child issues in an epic including their comments and relationship data. Limited to 100 issues per request.

{
  epicKey: string; // The key of the epic issue
}

Get issue details

Get detailed information about a specific JIRA issue including comments and all relationships.

{
  issueId: string; // The ID or key of the JIRA issue
}

Create a new issue

Create a new JIRA issue with specified fields.

{
  projectKey: string, // The project key where the issue will be created
  issueType: string, // The type of issue (e.g., "Bug", "Story", "Task")
  summary: string, // The issue summary/title
  description?: string, // Optional issue description
  fields?: { // Optional additional fields
    [key: string]: any
  }
}

Update an existing issue

Update fields of an existing JIRA issue.

{
  issueKey: string, // The key of the issue to update
  fields: { // Fields to update
    [key: string]: any
  }
}

Add an attachment

Add a file attachment to a JIRA issue.

{
  issueKey: string, // The key of the issue
  fileContent: string, // Base64 encoded file content
  filename: string // Name of the file to be attached
}

Add a comment

Add a comment to a JIRA issue. Accepts plain text and converts it to the required Atlassian Document Format internally.

{
  issueIdOrKey: string, // The ID or key of the issue to add the comment to
  body: string // The content of the comment (plain text)
}

Data Cleaning Features

The MCP server optimizes JIRA data for AI context windows by:

  • Extracting text from Atlassian Document Format
  • Tracking issue mentions in descriptions and comments
  • Maintaining formal issue links with relationship types
  • Preserving parent/child relationships
  • Tracking epic associations
  • Including comment history with author information
  • Removing unnecessary metadata from responses
  • Recursively processing content nodes for mentions
  • Deduplicating issue mentions

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "jira" '{"command":"node","args":["/absolute/path/to/jira-mcp/build/index.js"],"env":{"JIRA_API_TOKEN":"your_api_token","JIRA_BASE_URL":"your_jira_instance_url","JIRA_USER_EMAIL":"your_email","JIRA_TYPE":"cloud"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "jira": {
            "command": "node",
            "args": [
                "/absolute/path/to/jira-mcp/build/index.js"
            ],
            "env": {
                "JIRA_API_TOKEN": "your_api_token",
                "JIRA_BASE_URL": "your_jira_instance_url",
                "JIRA_USER_EMAIL": "your_email",
                "JIRA_TYPE": "cloud"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "jira": {
            "command": "node",
            "args": [
                "/absolute/path/to/jira-mcp/build/index.js"
            ],
            "env": {
                "JIRA_API_TOKEN": "your_api_token",
                "JIRA_BASE_URL": "your_jira_instance_url",
                "JIRA_USER_EMAIL": "your_email",
                "JIRA_TYPE": "cloud"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later