JIRA MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides access to JIRA data including searching issues, retrieving epic children, getting detailed issue information, creating and updating issues, extracting issue mentions, tracking issue relationships, handling file attachments, and transforming JIRA content for AI context windows

JIRA MCP 服务器

模型上下文协议 (MCP) 服务器实现,提供对 JIRA 数据的访问,包括关系跟踪、优化的数据负载以及 AI 上下文窗口的数据清理。

Confluence有一个单独的 MCP 服务器

特征

  • 使用 JQL 搜索 JIRA 问题(每个请求最多 50 个结果)
  • 检索具有评论历史记录和优化有效载荷的史诗子内容(每个请求最多 100 个问题)
  • 获取详细的问题信息,包括评论和相关问题
  • 创建、更新和管理 JIRA 问题
  • 对问题添加评论
  • 从 Atlassian 文档格式中提取问题提及
  • 跟踪问题关系(提及、链接、父/子、史诗)
  • 清理并转换丰富的 JIRA 内容以提高 AI 上下文效率
  • 支持文件附件的安全分段上传处理

先决条件

  • Bun (v1.0.0 或更高版本)
  • 具有 API 访问权限的 JIRA 帐户

环境变量

JIRA_API_TOKEN=your_api_token JIRA_BASE_URL=your_jira_instance_url # e.g., https://your-domain.atlassian.net JIRA_USER_EMAIL=your_email

安装和设置

1.克隆存储库:

git clone [repository-url] cd jira-mcp

2.安装依赖项并构建:

bun install bun run build

3. 配置MCP服务器:

编辑适当的配置文件:

macOS:

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

视窗:

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

Linux:

  • Cline: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Claude Desktop:遗憾的是尚不存在

mcpServers对象下添加以下配置:

{ "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" } } } }

4. 重新启动 MCP 服务器。

在 Cline 的 MCP 设置中,重启 MCP 服务器。重启 Claude Desktop 以加载新的 MCP 服务器。

发展

运行测试:

bun test

观察开发模式:

bun run dev

更改后重建:

bun run build

可用的 MCP 工具

搜索问题

使用 JQL 搜索 JIRA 问题。每次请求最多返回 50 条结果。

输入模式:

{ searchString: string; // JQL search string }

获取史诗般的孩子

获取史诗中的所有子问题,包括其评论和关系数据。每次请求限制获取 100 个问题。

输入模式:

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

获取问题

获取有关特定 JIRA 问题的详细信息,包括评论和所有关系。

输入模式:

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

创建问题

使用指定字段创建新的 JIRA 问题。

输入模式:

{ 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 } }

更新问题

更新现有 JIRA 问题的字段。

输入模式:

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

添加附件

向 JIRA 问题添加文件附件。

输入模式:

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

添加评论

向 JIRA 问题添加评论。接受纯文本并在内部将其转换为所需的 Atlassian 文档格式。

输入模式:

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

数据清理功能

  • 从 Atlassian 文档格式中提取文本
  • 跟踪描述和评论中提到的问题
  • 维护与关系类型的正式问题链接
  • 维护父母/子女关系
  • 追踪史诗般的联想
  • 包含带有作者信息的评论历史记录
  • 从响应中删除不必要的元数据
  • 递归处理提及的内容节点
  • 删除重复的问题提及

技术细节

  • 使用 TypeScript 在严格模式下构建
  • 使用 Bun 运行时来提高性能
  • Vite 用于优化构建
  • 使用 JIRA REST API v3
  • 使用 API 令牌进行基本身份验证
  • 相关数据的批量 API 请求
  • 针对 AI 上下文窗口优化的响应有效载荷
  • 高效转换复杂的 Atlassian 结构
  • 强大的错误处理
  • 速率限制注意事项
  • 最大限制:
    • 搜索结果:每次请求 50 个问题
    • Epic Children:每次请求 100 个问题
  • 支持安全文件附件的多部分表单数据
  • 自动内容类型检测和验证

错误处理

服务器实现了全面的错误处理策略:

  • 网络错误检测和适当的消息传递
  • HTTP 状态代码处理(特别是 404 问题)
  • 带有状态代码的详细错误消息
  • 错误详细信息记录到控制台
  • 所有参数的输入验证
  • 通过 MCP 协议安全传播错误
  • 针对常见 JIRA API 错误的专门处理
  • 附件的 Base64 验证
  • 多部分请求失败处理
  • 速率限制检测
  • 附件参数验证

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENCE文件。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

提供通过模型上下文协议访问和管理 JIRA 数据的接口,为 AI 应用程序提供关系跟踪、数据清理和上下文洞察等功能。

  1. Features
    1. Prerequisites
      1. Environment Variables
        1. Installation & Setup
          1. 1. Clone the repository:
          2. 2. Install dependencies and build:
          3. 3. Configure the MCP server:
          4. 4. Restart the MCP server.
        2. Development
          1. Available MCP Tools
            1. search_issues
            2. get_epic_children
            3. get_issue
            4. create_issue
            5. update_issue
            6. add_attachment
            7. add_comment
          2. Data Cleaning Features
            1. Technical Details
              1. Error Handling
                1. LICENCE
                  ID: q659niazed