Skip to main content
Glama
jira-mcp-server

jira-mcp-server

by hieutv-dng

jira-mcp-server

MCP (Model Context Protocol) server tích hợp Jira cho Claude AI. Hỗ trợ Claude Desktop, Cursor, Windsurf, và LangChain tương tác trực tiếp với Jira Server/Data Center (không Cloud).

Thông tin

Giá trị

Phiên bản

v1.4.0

Trạng thái

Production-ready

Xác thực

Personal Access Token (PAT)

Transports

Stdio (Claude Desktop), HTTP (LangChain, remote)

Tính năng

  • 8 Tools: get_current_user, list_issues, get_issue_detail, log_work, list_worklogs, delete_worklog, update_issue, create_issue

  • Drift Detection: Cảnh báo khi description lỗi thời so với comments

  • Tool Chaining: Gợi ý hành động tiếp theo sau mỗi tool

  • Safety-First: Write operations yêu cầu xác nhận từ user

  • Markdown Output: Format AI-friendly với priority emojis, quality analysis

Related MCP server: jira-mcp-server

Bắt đầu nhanh

Yêu cầu

  • Node.js 18+

  • Jira Server/Data Center v7+ (không Cloud)

  • Personal Access Token (PAT)

Setup

  1. Clone & install:

git clone <repo-url> && cd jira-mcp-server && npm install
  1. Cấu hình .env.local:

JIRA_BASE_URL=https://jira.company.com
JIRA_PAT=<your-pat-token>
JIRA_DEFAULT_PROJECT=XYZ  # Tùy chọn
  1. Build & Run:

npm run build                                    # Stdio transport
HTTP_PORT=3000 MCP_AUTH_TOKEN=secret npm start   # HTTP transport

Share cho Team (không cần .env file)

Mỗi thành viên tự config trực tiếp trong MCP client của mình:

Claude Desktop (~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "jira-mcp-server": {
      "command": "node",
      "args": ["/path/to/jira-mcp-server/dist/index.js"],
      "env": {
        "JIRA_BASE_URL": "https://jira.company.com",
        "JIRA_PAT": "your-personal-pat-token"
      }
    }
  }
}

Cursor/Windsurf (.cursor/mcp.json hoặc .windsurf/mcp.json):

{
  "mcpServers": {
    "jira-mcp-server": {
      "command": "node",
      "args": ["/path/to/jira-mcp-server/dist/index.js"],
      "env": {
        "JIRA_BASE_URL": "https://jira.company.com",
        "JIRA_PAT": "your-personal-pat-token"
      }
    }
  }
}

Lưu ý: File .env.local chỉ cần khi dev local (npm run dev). Production dùng env block trong MCP config.

Kết nối Clients

Test

npm run inspect    # MCP Inspector at http://localhost:8000

Hoặc trong Claude Desktop, thử: "Show me open issues"

Tools Reference

Tất cả write operations (log_work, update_issue, create_issue, delete_worklog) yêu cầu xác nhận từ user.

Tool

Mô tả

Chủ yếu dùng cho

get_current_user

Lấy thông tin user hiện tại (từ PAT)

Verify PAT, biết username cho JQL

list_issues

Filter issues (assignee, status, custom JQL)

Xem danh sách work items

get_issue_detail

Chi tiết issue + drift detection

Hiểu issue trước khi làm việc

log_work

Ghi nhận giờ làm (yêu cầu startedAt)

Timesheet, tracking

list_worklogs

Tổng giờ đã log (summary hoặc detail per-entry)

Báo cáo timesheet, lấy worklogId

delete_worklog

Xoá worklog (batch + dryRun + best-effort)

Sửa log nhầm

update_issue

Assign, labels, transition, comment, set/clear due date, sửa summary (tiêu đề) + description (mô tả)

Cập nhật trạng thái, nhãn, deadline, tiêu đề, mô tả

create_issue

Tạo issue (Task, Bug, Story)

Tạo work item mới

Ví dụ nhanh:

# Xem issues của tôi
list_issues({ statusFilter: "open" })

# Chi tiết issue
get_issue_detail({ issueKey: "PROJ-123" })

# Log 2 tiếng hôm qua
log_work({ 
  issueKey: "PROJ-123", 
  timeSpent: "2h", 
  comment: "Fixed UI bug",
  startedAt: "2026-04-12"
})

# Tổng giờ đã log tháng này (summary)
list_worklogs({})

# Xem detail từng worklog entry (kèm worklogId)
list_worklogs({ detail: true })

# Preview trước khi xoá
delete_worklog({
  issueKey: "PROJ-123",
  worklogIds: ["12345", "12346"],
  dryRun: true
})

# Xoá thật sau khi user xác nhận
delete_worklog({
  issueKey: "PROJ-123",
  worklogIds: ["12345", "12346"]
})

# Chuyển sang Done
update_issue({ 
  issueKey: "PROJ-123", 
  transitionName: "Done", 
  resolution: "Fixed"
})

# Update due date
update_issue({
  issueKey: "PROJ-123",
  dueDate: "2026-06-30"
})

# Gỡ due date
update_issue({
  issueKey: "PROJ-123",
  dueDate: "clear"
})

# Thêm labels
update_issue({
  issueKey: "PROJ-123",
  addLabels: ["backend", "urgent"]
})

# Xoá labels
update_issue({
  issueKey: "PROJ-123",
  removeLabels: ["blocked", "needs-info"]
})

# Xoá toàn bộ labels rồi set lại
update_issue({
  issueKey: "PROJ-123",
  clearLabels: true,
  addLabels: ["triaged", "ready"]
})

# Đổi tiêu đề (summary)
update_issue({
  issueKey: "PROJ-123",
  summary: "Tiêu đề mới rõ ràng hơn"
})

# Replace toàn bộ mô tả (description, wiki markup)
update_issue({
  issueKey: "PROJ-123",
  description: "Mô tả mới\n\n* Bước 1\n* Bước 2"
})

# Combine: labels + assignee + transition
update_issue({
  issueKey: "PROJ-123",
  addLabels: ["urgent"],
  assignee: "hieutv",
  transitionName: "In Progress"
})

# Tạo task mới
create_issue({
  projectKey: "PROJ",
  issueType: "Task",
  summary: "Implement feature",
  description: "Add OAuth support",
  priority: "High"
})

Xem chi tiết: Tool Examples (nếu cần)

Development

Scripts

npm run build      # TypeScript → dist/
npm run dev        # Watch mode
npm start          # Run server (stdio or HTTP)
npm run inspect    # MCP Inspector (http://localhost:8000)

Project Structure

src/
├── index.ts              # Entry + transport selection
├── jira/
│   ├── client.ts         # REST API wrapper
│   ├── tools/            # Tool registration split theo concern
│   │   ├── index.ts              # Barrel — registerJiraTools()
│   │   ├── user-tools.ts         # get_current_user
│   │   ├── issue-tools.ts        # list_issues, get_issue_detail, update_issue
│   │   ├── issue-drift-warning.ts # Helper drift heuristic
│   │   ├── create-issue-tool.ts  # create_issue (schema lớn)
│   │   └── worklog-tools.ts      # log_work, list_worklogs, delete_worklog
│   └── formatter.ts      # AI-friendly output
├── transports/
│   ├── stdio-transport.ts
│   └── http-transport.ts # Express + Bearer auth
└── shared/utils.ts       # Error handling, chaining

Multi-Tenant Deployment

Cho phép nhiều users dùng chung một MCP server, mỗi user có credentials Jira riêng.

Architecture

Client (headers) → Nginx (:443 SSL) → Node.js (:3000) → Jira API

Client Config

Thêm X-Jira-* headers vào MCP client config:

{
  "mcpServers": {
    "jira": {
      "type": "http",
      "url": "https://mcp.company.com/mcp",
      "headers": {
        "Authorization": "Bearer <MCP_AUTH_TOKEN>",
        "X-Jira-Base-Url": "https://jira.company.com",
        "X-Jira-Pat": "<your-personal-token>"
      }
    }
  }
}

Headers

Header

Required

Description

Authorization

Yes

Bearer token (MCP_AUTH_TOKEN trên server)

X-Jira-Base-Url

No*

Jira server URL

X-Jira-Pat

No*

Personal Access Token

*Fallback to server env vars nếu không truyền headers.

Server Setup

  1. Chạy MCP server:

HTTP_PORT=3000 MCP_AUTH_TOKEN=<secret> npm start
  1. Cấu hình Nginx: Copy deploy/nginx.conf.example và sửa domain.

  2. SSL: certbot --nginx -d mcp.company.com


Documentation

Setup & Connection

Architecture & Standards

Available Tools

8 tools
create_issueA

Tạo một Jira issue mới (Task, Sub-task, Bug, Story). Dùng dryRun=true để xem metadata (custom fields, users, epics) — không tạo issue. Dùng khi phân rã một task lớn thành các sub-task nhỏ hơn, hoặc khi tạo task từ file mô tả nghiệp vụ .md. Nếu người dùng yêu cầu tạo task mới như 'tạo task mới cho tôi nhé', hãy yêu cầu họ cung cấp các thông tin dựa trên ví dụ sau:

  • Dự án (Project Key): PROJECT_KEY

  • Loại Issue: Task

  • Tiêu đề: Phối hợp thực AM UBNB Hoài Hôi

  • Mô tả: Phối hợp thực AM UBNB Hoài Hôi

  • Mức độ ưu tiên: Low

  • Nhãn (Labels): ProjectLabels

  • Mã SPDA: PROJ ProjectSPDA

  • Công đoạn: Nghiên cứu và phát triển

  • Due Date: 2026-04-03

  • Assign cho: nghiath (optional)

  • Epic: PROJECT-100 (optional) ⚠️ PHẢI hỏi user xác nhận TRƯỚC KHI gọi tool này — hiển thị nội dung issue sẽ tạo cho user duyệt.

Inputs: projectKey (required), dryRun, issueType, summary, +9 more.

delete_worklogA

Xoá 1 hoặc nhiều worklog trên 1 Jira issue. ⚠️ DESTRUCTIVE. BẮT BUỘC chạy dryRun=true trước, show preview cho user, đợi xác nhận rồi mới chạy dryRun=false. adjustEstimate=auto (Jira tự cộng giờ đã xoá vào remaining estimate). Chỉ xoá được worklog của chính mình (hoặc admin). Dùng list_worklogs với detail=true để lấy worklogId.

Inputs: issueKey (required), worklogIds (required), dryRun.

get_current_userA

Lấy thông tin user Jira hiện tại (ứng với PAT đang dùng). Trả về username, display name, email, timezone. Dùng để: (1) verify PAT hợp lệ, (2) biết username để dùng trong JQL hoặc assigneeFilter, (3) xác nhận đúng account khi dùng multi-tenant.

Inputs: no named parameters.

get_issue_detailA

Đọc toàn bộ thông tin chi tiết của 1 Jira issue: mô tả đầy đủ, comments, sub-tasks, priority, status hiện tại. Dùng trước khi phân tích hoặc implement một task cụ thể.

Inputs: issueKey (required).

list_issuesB

Lấy danh sách Jira issues theo filter linh hoạt. Mặc định: issues được assign cho tôi, đang mở. Có thể lọc theo user khác (assigneeFilter), role (assignee/reporter/watcher), trạng thái (statusFilter), hoặc JQL tùy chỉnh (customJql = full override). Trước đây có tên list_my_open_issues.

Inputs: projectKey, assigneeFilter, roleFilter, statusFilter, +2 more.

list_worklogsA

Truy vấn worklog của 1 user trong khoảng thời gian. Mặc định: current user, tháng hiện tại, summary aggregate theo issue. detail=true: show từng worklog entry với worklogId (dùng để lấy ID cho delete_worklog). Use case: 'tháng này tôi log bao nhiêu giờ', 'liệt kê chi tiết worklog tuần qua'.

Inputs: username, dateFrom, dateTo, projectKey, +1 more.

log_workA

Ghi nhận thời gian làm việc (logwork) lên một Jira issue. Dùng sau khi hoàn thành công việc để track effort. Ví dụ: đã làm 2 tiếng fix bug VNPTAI-456. ⚠️ PHẢI hỏi user xác nhận TRƯỚC KHI gọi tool này — không được tự động submit. Hiển thị nội dung sẽ log cho user review trước.

Inputs: issueKey (required), timeSpent (required), comment (required), startedAt (required).

update_issueA

Cập nhật Jira issue: assign/unassign user, chuyển trạng thái, thêm comment, hoặc xem transitions khả dụng. Dùng dryRun=true để xem danh sách transitions mà không thay đổi gì. Truyền assignee để gán/gỡ người làm. Truyền dueDate để đổi/gỡ deadline ('clear' = gỡ). Truyền chỉ comment (không transitionName) để thêm ghi chú mà không đổi status. Truyền transitionName để chuyển trạng thái (kèm comment, resolution nếu cần). Có thể combine assignee + dueDate + transitionName + comment trong cùng 1 call. ⚠️ PHẢI hỏi user xác nhận TRƯỚC KHI thay đổi assignee, due date, status hoặc thêm comment.

Inputs: issueKey (required), dryRun, transitionName, resolution, +3 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinct action or resource: creating issues, managing worklogs, retrieving user info, fetching issue details, listing issues, listing worklogs, logging work, and updating issues. No overlap in functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_issue, list_worklogs, update_issue). The verbs are descriptive and the nouns clearly indicate the resource being acted upon.

    Tool Count4/5

    With 8 tools, the set is well-scoped for core Jira issue management tasks. It covers creation, updates, reads, and worklog operations. Slightly on the lower side, but sufficient for typical workflows.

    Completeness4/5

    The tool set covers most common operations: create, read, update issues, and manage worklogs. Missing a delete issue tool, but the inclusion of get_current_user and list_worklogs fills ancillary needs. Minor gaps exist.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude AI to interact with JIRA for project management and issue tracking, supporting JQL queries, comprehensive issue details retrieval with subtasks and linked issues, and release planning analysis.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants like Claude to interact with Jira for project management tasks, including issue creation, updates, workflow transitions, and bulk operations.
      32 npm
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables Claude Code to interact with JIRA through natural language, supporting issue creation, updates, searches, and workflow transitions, designed for enterprise intranets.
      22
      1,616 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Wraps Jira Data Center operations as MCP tools, enabling AI assistants to interact with Jira for project management and issue tracking.
      1,616 npm
      Apache 2.0