Personal JIRA MCP

Personal JIRA MCP

An MCP server that enables AI assistants to interact with JIRA, allowing for querying issue details, creating and updating work items, and managing attachments through a standardized interface.

Category
Visit Server

README

Personal JIRA MCP

一个基于FastMCP框架的个人JIRA集成插件,用于查询JIRA问题详情、列表及进行基本操作,支持JIRA附件管理。

什么是MCP?

MCP (Model Context Protocol) 是一种为大型语言模型(LLM)提供上下文和工具的标准化协议。它被称为"AI的USB-C接口",提供了统一的方式连接LLM与各种资源和功能。

本项目是一个MCP服务器,专门针对JIRA集成,允许AI通过标准化接口访问JIRA数据和功能,使得人工智能助手能够:

  • 查询和检索JIRA问题
  • 创建和更新工作项
  • 下载和管理附件
  • 执行JIRA相关操作

主要功能

  • 查询JIRA问题详情和问题列表
  • 创建和更新JIRA问题
  • 获取项目列表和详情
  • 管理和下载JIRA问题附件
    • 自动将附件保存到~/.jira_mcp目录
    • 按问题ID组织的子目录结构
    • 支持下载单个或所有附件

安装

前提条件

  • Python 3.10 或更高版本
  • 安装 uv (推荐) 或 pip

安装 uv

uv 是一个快速的 Python 包管理器,推荐用于安装和管理 Python 包。

Linux / macOS

# 使用 curl 安装
curl -sSf https://astral.sh/uv/install.sh | sh

# 或使用 pip 安装
pip install uv

Windows

# 使用 PowerShell 安装
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# 或使用 pip 安装
pip install uv

验证安装

uv --version

从PyPI安装

# 使用 uv (推荐)
uv pip install personal-jira-mcp

# 或使用 pip
pip install personal-jira-mcp

从GitHub安装

# 使用 uv (推荐)
uv pip install git+https://github.com/yuezheng2006/mcp-server-jira.git

# 或使用 pip
pip install git+https://github.com/yuezheng2006/mcp-server-jira.git

本地开发安装

# 克隆仓库
git clone https://github.com/yuezheng2006/mcp-server-jira.git
cd mcp-server-jira

# 使用 uv 安装依赖并开发模式安装
uv pip install -e .

# 或使用 pip
pip install -e .

配置

创建一个.env文件,设置以下环境变量:

JIRA_SERVER_URL=http://your-jira-instance.com
JIRA_USERNAME=your_username
JIRA_PASSWORD=your_password
# 或者使用API令牌
JIRA_API_TOKEN=your_api_token

Cursor配置

.cursor/mcp.json 中添加以下配置(推荐使用uvx方式):

{
  "mcpServers": {
    "personal-jira-mcp": {
      "command": "uvx",
      "args": [
        "--from=personal-jira-mcp",
        "personal-jira-mcp",
        "--transport",
        "stdio"
      ],
      "env": {
        "JIRA_SERVER_URL": "http://your-jira-instance.com",
        "JIRA_USERNAME": "your_username",
        "JIRA_PASSWORD": "your_password"
      }
    }
  }
}

如果您已经本地安装了personal-jira-mcp(不推荐),也可以直接使用命令:

{
  "mcpServers": {
    "personal-jira-mcp": {
      "command": "personal-jira-mcp",
      "args": ["--transport", "stdio"],
      "env": {
        "JIRA_SERVER_URL": "http://your-jira-instance.com",
        "JIRA_USERNAME": "your_username",
        "JIRA_PASSWORD": "your_password"
      }
    }
  }
}

其他MCP客户端配置

如果你使用其他支持MCP协议的客户端或IDE,可以使用以下两种方式配置:

基于命令行方式

{
  "command": "personal-jira-mcp",
  "args": ["--transport", "stdio"],
  "env": {
    "JIRA_SERVER_URL": "http://your-jira-instance.com",
    "JIRA_USERNAME": "your_username",
    "JIRA_PASSWORD": "your_password"
  }
}

基于HTTP方式(需要单独运行服务器)

{
  "url": "http://localhost:8000/mcp",
  "headers": {
    "Authorization": "Bearer your_token_if_needed"
  }
}

快速开始

启动MCP服务器

# 使用stdio传输模式(默认,适合IDE集成)
personal-jira-mcp --transport stdio

# 使用sse传输模式(适合Web集成)
personal-jira-mcp --transport sse

# 使用streamable-http模式(适合HTTP调用)
personal-jira-mcp --transport streamable-http --port 8000

命令行工具

# 下载单个附件
personal-jira-extract ERP-161 example.png --output saved_file.png

# 下载问题的所有附件
personal-jira-attachments ERP-161

# 仅列出问题的所有附件,不下载
personal-jira-attachments ERP-161 --list-only

# 输出附件信息到JSON文件
personal-jira-attachments ERP-161 --output attachments.json

在Cursor中使用

配置好mcp.json后,可以在Cursor中使用以下自然语言命令:

查看JIRA问题ERP-161的详情
下载JIRA问题ERP-161的所有附件
搜索所有处于"进行中"状态的JIRA问题

详细文档

更详细的使用指南和API参考,请查看使用指南

MCP提供的工具

本MCP服务器提供以下工具:

工具名称 描述 示例
get_issue 获取JIRA问题详情 ERP-123
search_issues 搜索JIRA问题列表 project = ERP AND status = "In Progress"
create_issue 创建JIRA问题 创建一个标题为"修复登录问题"的任务
update_issue 更新JIRA问题 将ERP-123的状态改为"已完成"
get_projects 获取JIRA项目列表 列出所有可访问的项目
get_project 获取项目详情 获取ERP项目的详细信息
get_issue_attachments 获取问题的所有附件 列出ERP-123的所有附件
download_all_attachments 下载问题的所有附件 下载ERP-123的全部附件
get_attachment_by_filename 获取特定附件 从ERP-123获取名为"截图.png"的附件

开发

安装开发依赖

# 使用 uv
uv pip install -e ".[dev]"

# 或使用 pip
pip install -e ".[dev]"

发布

使用自动化脚本发布

# 使用包含的发布脚本
./scripts/publish.sh

手动构建并发布到PyPI

# 确保已安装构建工具
pip install build twine

# 构建包
python -m build

# 上传到PyPI
python -m twine upload dist/*

许可证

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured