Skip to main content
Glama

Personal JIRA MCP

by yuezheng2006
MIT License
1
  • Linux
  • Apple

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

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

  1. 什么是MCP?
    1. 主要功能
      1. 安装
        1. 前提条件
        2. 安装 uv
        3. 从PyPI安装
        4. 从GitHub安装
        5. 本地开发安装
      2. 配置
        1. Cursor配置
        2. 其他MCP客户端配置
      3. 快速开始
        1. 启动MCP服务器
        2. 命令行工具
        3. 在Cursor中使用
      4. 详细文档
        1. MCP提供的工具
          1. 开发
            1. 安装开发依赖
          2. 发布
            1. 使用自动化脚本发布
            2. 手动构建并发布到PyPI
          3. 许可证

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              Enables AI applications to manage JIRA issues, workflows, and tasks through a standardized MCP interface, facilitating real-time updates and seamless interaction with JIRA's API.
              Last updated -
              6
              Python
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              An MCP server that enables AI agents to interact with Atlassian products (Confluence and Jira) for content management, issue tracking, and project management through a standardized interface.
              Last updated -
              2
              TypeScript
            • A
              security
              F
              license
              A
              quality
              An MCP server implementation that enables AI assistants to interact with and manage Sakura Cloud infrastructure, including servers, disks, networks, and containerized applications.
              Last updated -
              46
              2
              JavaScript
              • Apple
              • Linux
            • -
              security
              F
              license
              -
              quality
              A MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.
              Last updated -
              5
              TypeScript

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuezheng2006/mcp-server-jira'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server