jira-mcp-server
Enables Claude AI and other MCP clients to interact with Jira Server/Data Center through tools like listing issues, logging work, and updating issues, requiring user confirmation for write operations.
README
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.3.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
Bắt đầu nhanh
Yêu cầu
- Node.js 18+
- Jira Server/Data Center v7+ (không Cloud)
- Personal Access Token (PAT)
Setup
- Clone & install:
git clone <repo-url> && cd jira-mcp-server && npm install
- 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
- 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.localchỉ cần khi dev local (npm run dev). Production dùngenvblock trong MCP config.
Kết nối Clients
- Claude Desktop: Xem claude-desktop-setup.md
- Cursor/Windsurf: Xem Connection Guide
- LangChain/Remote: Xem http-api-reference.md
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, transition, comment, set/clear due date | Cập nhật trạng thái, deadline |
| 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({ key: "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"
})
# 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
- Chạy MCP server:
HTTP_PORT=3000 MCP_AUTH_TOKEN=<secret> npm start
-
Cấu hình Nginx: Copy
deploy/nginx.conf.examplevà sửa domain. -
SSL:
certbot --nginx -d mcp.company.com
Documentation
Setup & Connection
- Connection Guide — Stdio vs HTTP
- Claude Desktop
- Cursor
- Windsurf
- LangChain
- HTTP API Reference
Architecture & Standards
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。