Skip to main content
Glama
Jira MCP Server for Cursor

Jira MCP Server for Cursor

by kornbed

用于 Cursor 的 Jira MCP 服务器

基于 TypeScript 的 MCP 服务器与 Jira 集成,允许 Cursor 与 Jira 票证进行交互。

特征

  • 列出 Jira 票证

  • 获取票务详情

  • 获取票证评论

  • 创建新票证

  • 向票证添加评论

  • 更新票证状态

  • 完整的 MCP 协议支持 Cursor 集成

Related MCP server: JIRA MCP Server

设置

  1. 安装依赖项:

npm install
  1. 根据.env.example创建一个.env文件并填写您的 Jira 凭据:

JIRA_HOST=https://your-domain.atlassian.net
JIRA_EMAIL=your-email@example.com
JIRA_API_TOKEN=your-api-token
PORT=3000

要获取您的 Jira API 令牌:

  1. 登录https://id.atlassian.com/manage/api-tokens

  2. 点击“创建 API 令牌”

  3. 复制令牌并将其粘贴到您的.env文件中

发展

运行开发服务器:

npm run dev

构建并运行

构建项目:

npm run build

启动服务器:

npm start

光标集成

要将此 MCP 服务器与 Cursor 一起使用,您有两个选择:

选项 1:基于命令的集成(推荐)

  1. 构建项目:

npm run build
  1. 打开光标的设置:

    • 点击光标菜单

    • 选择“设置”(或使用键盘快捷键)

    • 导航至“扩展”或“集成”部分

  2. 添加 MCP 配置:

{
  "mcpServers": {
    "jira": {
      "command": "node",
      "args": ["/path/to/jira-mcp-cursor/dist/server.js"]
    }
  }
}

将/path/to/jira-mcp-cursor替换为项目的绝对路径。

选项 2:基于 HTTP 的集成(替代)

  1. 启动 MCP 服务器(如果尚未运行):

npm start
  1. 打开光标的设置:

    • 点击光标菜单

    • 选择“设置”(或使用键盘快捷键)

    • 导航至“扩展”或“集成”部分

  2. 添加 MCP 配置:

{
  "mcpServers": {
    "jira": {
      "url": "http://localhost:3000",
      "capabilities": [
        "list_tickets",
        "get_ticket",
        "get_comments",
        "create_ticket",
        "update_status",
        "add_comment"
      ]
    }
  }
}

在 Cursor 中使用 Jira

配置完 MCP 服务器后,就可以在 Cursor 中直接使用 Jira 命令了:

  • /jira list – 列出您的票证

  • /jira view TICKET-123 - 查看工单详情

  • /jira comments TICKET-123 - 获取工单评论

  • /jira create创建新票据

  • /jira comment TICKET-123 - 添加评论

  • /jira status TICKET-123 - 更新票据状态

MCP 协议支持

服务器实现了 Cursor 所需的模型-客户端协议 (MCP):

  • 基于命令的集成的 Stdio 通信

  • Jira 操作工具注册

API 端点

列出门票

检索 Jira 票证列表,可选择通过 JQL 查询进行过滤。

端点: GET /api/tickets

查询参数:

范围

类型

必需的

描述

jql

细绳

不

用于过滤工单的 Jira 查询语言 (JQL) 字符串

示例请求:

GET /api/tickets?jql=project=TEST+AND+status=Open

响应示例:

TEST-123: Example ticket (Open)
TEST-124: Another ticket (In Progress)

获取门票

检索有关特定票证的详细信息。

端点: GET /api/tickets/:id

路径参数:

范围

类型

必需的

描述

ID

细绳

是的

Jira 票证 ID(例如,TEST-123)

示例请求:

GET /api/tickets/TEST-123

响应示例:

Key: TEST-123
Summary: Example ticket
Status: Open
Type: Task
Description:
Detailed ticket description

获取票务评论

检索特定票证的所有评论。

端点: GET /api/tickets/:id/comments

路径参数:

范围

类型

必需的

描述

ID

细绳

是的

Jira 票证 ID(例如,TEST-123)

示例请求:

GET /api/tickets/TEST-123/comments

响应示例:

[3/20/2024, 10:00:00 AM] John Doe:
Comment text
---

[3/20/2024, 9:30:00 AM] Jane Smith:
Another comment
---

创建工单

创建一个新的 Jira 票证。

端点: POST /api/tickets

请求正文:

范围

类型

必需的

描述

概括

细绳

是的

票务摘要

描述

细绳

是的

票证描述

项目密钥

细绳

是的

项目密钥(例如,TEST)

问题类型

细绳

是的

问题类型(例如,任务、错误)

示例请求:

POST /api/tickets
Content-Type: application/json

{
  "summary": "New feature request",
  "description": "Implement new functionality",
  "projectKey": "TEST",
  "issueType": "Task"
}

响应示例:

Created ticket: TEST-124

添加评论

向现有票证添加新评论。

端点: POST /api/tickets/:id/comments

路径参数:

范围

类型

必需的

描述

ID

细绳

是的

Jira 票证 ID(例如,TEST-123)

请求正文:

范围

类型

必需的

描述

身体

细绳

是的

评论文本

示例请求:

POST /api/tickets/TEST-123/comments
Content-Type: application/json

{
  "body": "This is a new comment"
}

响应示例:

Added comment to TEST-123

更新状态

更新现有票证的状态。

端点: POST /api/tickets/:id/status

路径参数:

范围

类型

必需的

描述

ID

细绳

是的

Jira 票证 ID(例如,TEST-123)

请求正文:

范围

类型

必需的

描述

转换ID

细绳

是的

要执行的转换的 ID

示例请求:

POST /api/tickets/TEST-123/status
Content-Type: application/json

{
  "transitionId": "21"
}

响应示例:

Updated status of TEST-123

搜索门票

使用文本搜索在指定项目中搜索票证。

端点: GET /api/tickets/search

查询参数:

范围

类型

必需的

描述

搜索文本

细绳

是的

在票证中搜索的文本

项目密钥

细绳

是的

要搜索的项目键的逗号分隔列表

最大结果

数字

不

返回的最大结果数(默认值:50)

示例请求:

GET /api/tickets/search?searchText=login+bug&projectKeys=TEST,PROD&maxResults=10

响应示例:

Found 2 tickets matching "login bug"

[TEST] TEST-123: Login page bug
Status: Open (Updated: 3/20/2024, 10:00:00 AM)
Description:
Users unable to login using SSO
----------------------------------------

[PROD] PROD-456: Fix login performance
Status: In Progress (Updated: 3/19/2024, 3:30:00 PM)
Description:
Login page taking too long to load
----------------------------------------

Available Tools

7 tools
add_commentC

Add a comment to a Jira ticket

Inputs: ticketId (required), comment (required).

create_ticketC

Create a new Jira ticket

Inputs: ticket (required).

get_commentsB

Get comments for a specific Jira ticket

Inputs: ticketId (required).

get_ticketC

Get details of a specific Jira ticket

Inputs: ticketId (required).

list_ticketsB

List Jira tickets assigned to you

Inputs: jql.

search_ticketsB

Search for tickets in specific projects using text search

Inputs: searchText (required), projectKeys (required), maxResults.

update_statusB

Update the status of a Jira ticket

Inputs: ticketId (required), status (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific Jira operations: list_tickets vs. search_tickets differentiate between personal assignment and project-wide text search, while get_ticket vs. get_comments separate ticket details from comment retrieval. No tools appear to overlap in functionality, making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern using snake_case (e.g., add_comment, create_ticket, get_comments). The verbs are appropriately chosen for each action (add, create, get, list, search, update), creating a predictable and readable naming convention throughout the set.

    Tool Count5/5

    With 7 tools, this server is well-scoped for Jira ticket management. Each tool earns its place by covering essential operations like creating, retrieving, listing, searching, updating status, and managing comments, without being overly sparse or bloated for the domain.

    Completeness4/5

    The tool set provides strong coverage for core Jira ticket workflows, including CRUD-like operations (create, get, list, update_status) and comment management. A minor gap exists in the lack of a tool to update ticket details beyond status (e.g., edit description or fields), but agents can work around this by creating new tickets or using comments.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A TypeScript-based server that enables interaction with Jira, providing tools to execute JQL queries, manage tickets, list projects and statuses through natural language.
      11
      26
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Model Context Protocol server that allows AI assistants to interact with Jira, supporting operations like creating tickets and fetching project information directly from the cursor.
      1
      -
    • F
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that provides tools for interacting with Jira. Enables Cursor and other MCP clients to fetch tickets, manage linked tickets, and update ticket status.
      3
      -