Skip to main content
Glama
JIRA MCP Server

JIRA MCP Server

by cosmix

JIRA MCP 服务器

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

Confluence有一个单独的 MCP 服务器


Jira Cloud 和 Jira Server(数据中心)支持

此 MCP 服务器支持Jira Cloud和**Jira Server(数据中心)**实例。您可以通过设置JIRA_TYPE环境变量来选择使用哪种类型:

  • cloud (默认):适用于 Jira Cloud(Atlassian 托管)

  • server :适用于 Jira 服务器/数据中心(自托管)

服务器将自动为所选类型使用正确的 API 版本和身份验证方法。


Related MCP server: MCP JIRA Server

特征

  • 使用 JQL 搜索 JIRA 问题(每个请求最多 50 个结果)

  • 检索具有评论历史记录和优化有效载荷的史诗子内容(每个请求最多 100 个问题)

  • 获取详细的问题信息,包括评论和相关问题

  • 创建、更新和管理 JIRA 问题

  • 对问题添加评论

  • 从 Atlassian 文档格式中提取问题提及

  • 跟踪问题关系(提及、链接、父/子、史诗)

  • 清理并转换丰富的 JIRA 内容以提高 AI 上下文效率

  • 支持文件附件的安全分段上传处理

  • 支持 Jira Cloud 和 Jira Server(数据中心)API

先决条件

  • 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
JIRA_TYPE=cloud   # or 'server' for Jira Server/Data Center (optional, defaults to 'cloud')

安装和设置

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",
        "JIRA_TYPE": "cloud"
      }
    }
  }
}

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文件。

Available Tools

9 tools
add_attachmentB

Add a file attachment to a JIRA issue

Inputs: issueKey (required), fileContent (required), filename (required).

add_commentB

Add a comment to a JIRA issue

Inputs: issueIdOrKey (required), body (required).

create_issueB

Create a new JIRA issue

Inputs: projectKey (required), issueType (required), summary (required), description, +1 more.

get_epic_childrenB

Get all child issues in an epic including their comments

Inputs: epicKey (required).

get_issueA

Get detailed information about a specific JIRA issue including comments

Inputs: issueId (required).

get_transitionsA

Get available status transitions for a JIRA issue

Inputs: issueKey (required).

search_issuesB

Search JIRA issues using JQL

Inputs: searchString (required).

transition_issueC

Change the status of a JIRA issue by performing a transition

Inputs: issueKey (required), transitionId (required), comment.

update_issueB

Update an existing JIRA issue

Inputs: issueKey (required), fields (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific JIRA operations: create, get, update, search, transition, add attachments/comments, and get epic children. There is no overlap or ambiguity between tools like 'get_issue' and 'search_issues' or 'update_issue' and 'transition_issue', making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern with snake_case throughout (e.g., create_issue, get_issue, update_issue). The verbs are appropriate and predictable, with no mixing of conventions or styles, ensuring readability and coherence.

    Tool Count5/5

    With 9 tools, the server is well-scoped for JIRA operations, covering core workflows like issue management, searching, and status transitions. Each tool earns its place without being overly sparse or bloated, fitting typical server sizes of 3-15 tools.

    Completeness4/5

    The tool set provides strong coverage for JIRA issue lifecycle, including CRUD operations (create, get, update), searching, transitions, and attachments/comments. A minor gap exists with no delete_issue tool, but agents can work around this, and other operations like epic handling are partially covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language interaction with Jira for managing projects, issues, tasks, and workflows through the Model Context Protocol, allowing users to delegate PM tasks through Claude Desktop.
      64
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables comprehensive interaction with JIRA through the Model Context Protocol, supporting issue management, search, comments, attachments, workflow transitions, and custom fields with enterprise Kerberos authentication.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides comprehensive access to Jira Cloud and Data Center instances for managing issues, epics, and attachments with AI-optimized data cleaning. It supports relationship tracking and dual transport modes via STDIO and Streamable HTTP.
      708 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Jira instances via the Model Context Protocol, providing 36 tools for reading and writing issues, projects, sprints, metrics, and more.
      31 npm
      2
      MIT