jira-mcp-server

jira-mcp-server

Enables Claude Code CLI to interact with Jira, including fetching issue details, searching issues with JQL, retrieving comments, and getting user info, with support for multiple Jira environments.

Category
访问服务器

README

Jira MCP Server

For Claude Code CLI

A Model Context Protocol (MCP) server that provides seamless Jira integration for Claude Code CLI.

Features

  • Get Issue Details - Fetch complete information about any Jira issue
  • Search Issues - Query issues using JQL (Jira Query Language)
  • Get Comments - Retrieve all comments on an issue
  • User Info - Get authenticated user details
  • Multi-Environment Support - Connect to multiple Jira instances simultaneously
  • Project-Specific Configuration - Different Jira environments per project via .mcp.json

Quick Start

1. Install

cd /var/home/mrwilde/mcp/jira-mcp-server
./install.sh

2. Configure (Per-Project)

Create .mcp.json in your project root:

cd /path/to/your/project

cat > .mcp.json <<'EOF'
{
  "mcpServers": {
    "jira": {
      "command": "python",
      "args": ["-m", "jira_mcp.server"],
      "env": {
        "JIRA_HOST": "https://your-company.atlassian.net",
        "JIRA_EMAIL": "your-email@company.com",
        "JIRA_API_TOKEN": "your-api-token",
        "JIRA_DEFAULT_PROJECT": "PROJ"
      }
    }
  }
}
EOF

# Don't commit tokens!
echo ".mcp.json" >> .gitignore

3. Verify

claude mcp list

4. Use

In Claude Code CLI, simply ask:

  • "Get details for issue LXP-449"
  • "Search for all my open tasks"
  • "Show comments on PROJ-123"

Installation & Configuration

See INSTALLATION.md for complete setup instructions including:

  • System-wide installation
  • Per-project configuration (.mcp.json)
  • Global user configuration
  • Multiple Jira environments
  • CLI commands (claude mcp add)
  • Security best practices

Configuration Methods

Method 1: Project .mcp.json File (Recommended)

{
  "mcpServers": {
    "jira": {
      "command": "python",
      "args": ["-m", "jira_mcp.server"],
      "env": {
        "JIRA_HOST": "https://company.atlassian.net",
        "JIRA_EMAIL": "you@company.com",
        "JIRA_API_TOKEN": "your-token"
      }
    }
  }
}

Method 2: Claude Code CLI Command

# Add to current project
cd /path/to/project
claude mcp add --scope project jira \
  --env JIRA_HOST=https://company.atlassian.net \
  --env JIRA_EMAIL=you@company.com \
  --env JIRA_API_TOKEN=your-token \
  -- python -m jira_mcp.server

# Add globally for all projects
claude mcp add --scope user jira \
  --env JIRA_HOST=https://company.atlassian.net \
  --env JIRA_EMAIL=you@company.com \
  --env JIRA_API_TOKEN=your-token \
  -- python -m jira_mcp.server

Development

Testing

# Test connection and authentication
source venv/bin/activate
python tests/test_connection.py

# Test with specific issue
python tests/test_connection.py LXP-449

Project Structure

jira-mcp-server/
├── src/jira_mcp/
│   ├── server.py       # MCP server implementation
│   └── jira_client.py  # Jira API wrapper
├── tests/
│   └── test_connection.py
├── config-examples/    # Configuration templates
│   ├── project-mcp.json
│   └── multi-environment-mcp.json
├── pyproject.toml
├── requirements.txt
├── install.sh          # Quick install script
└── INSTALLATION.md     # Complete setup guide

MCP Tools

get_issue

Fetch detailed information about a Jira issue.

Input: issue_key (string) - e.g., "LXP-449"

Returns: Full issue details including summary, description, status, assignee, priority, dates, and project info.

search_issues

Search for issues using JQL (Jira Query Language).

Input:

  • jql (string) - Query string, e.g., "project = LXP AND status = 'To Do'"
  • max_results (number, optional) - Default: 50

Returns: List of matching issues with key details.

get_issue_comments

Get all comments on a specific issue.

Input: issue_key (string)

Returns: List of comments with author, body, and timestamps.

get_current_user

Get information about the authenticated user.

Input: None

Returns: User details including username, email, and display name.

JQL Query Examples

# All issues in a project
project = LXP

# Your open issues
assignee = currentUser() AND status != Done

# Recent updates
updated >= -7d ORDER BY updated DESC

# Complex query
project = LXP AND status = "In Progress" AND assignee = currentUser()

Multiple Environments Example

{
  "mcpServers": {
    "jira-prod": {
      "command": "python",
      "args": ["-m", "jira_mcp.server"],
      "env": {
        "JIRA_HOST": "https://prod.atlassian.net",
        "JIRA_EMAIL": "you@company.com",
        "JIRA_API_TOKEN": "prod-token",
        "JIRA_DEFAULT_PROJECT": "LXP"
      }
    },
    "jira-staging": {
      "command": "python",
      "args": ["-m", "jira_mcp.server"],
      "env": {
        "JIRA_HOST": "https://staging.atlassian.net",
        "JIRA_EMAIL": "you@company.com",
        "JIRA_API_TOKEN": "staging-token",
        "JIRA_DEFAULT_PROJECT": "LXL"
      }
    }
  }
}

Claude Code CLI Commands

# List MCP servers
claude mcp list

# Get server details
claude mcp get jira

# Remove server
claude mcp remove --scope project jira

# Debug MCP issues
claude --mcp-debug

Getting a Jira API Token

  1. Visit: https://id.atlassian.com/manage-profile/security/api-tokens
  2. Click "Create API token"
  3. Name it (e.g., "MCP Server - Project X")
  4. Copy the token immediately
  5. Add it to your .mcp.json

Security

  • Never commit tokens to version control
  • Add .mcp.json to .gitignore in every project
  • Use project-specific tokens with minimal permissions
  • Rotate tokens regularly (every 90 days)
  • Revoke unused tokens
  • Create .mcp.json.example templates for team onboarding

Requirements

  • Python >= 3.10
  • Claude Code CLI
  • Jira Cloud account with API access
  • API token for authentication

Dependencies

  • mcp >= 1.0.0 - Model Context Protocol SDK
  • jira >= 3.5.0 - Python Jira library
  • python-dotenv >= 1.0.0 - Environment variable management
  • httpx >= 0.27.0 - HTTP client

Troubleshooting

Module Not Found

Use full Python path in .mcp.json:

{
  "mcpServers": {
    "jira": {
      "command": "/var/home/mrwilde/mcp/jira-mcp-server/venv/bin/python",
      "args": ["-m", "jira_mcp.server"],
      ...
    }
  }
}

Check MCP Status

claude mcp list
claude --mcp-debug

See INSTALLATION.md for detailed troubleshooting.

License

MIT

Contributing

Contributions welcome! Please submit issues or pull requests.

Support

Changelog

0.1.0 (2025-10-28)

  • Initial release for Claude Code CLI
  • Core MCP server implementation
  • Four essential Jira tools (get_issue, search_issues, get_issue_comments, get_current_user)
  • Multi-environment support via .mcp.json
  • Project-specific configuration
  • Comprehensive documentation

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选