jira-mcp
Bridges AI assistants with Jira Cloud for issue management, search, comments, workflows, and more via natural language.
README
🚀 Jira MCP Server
Jira MCP Server là cầu nối giữa AI và Jira Cloud. Thay vì phải vào web Jira để tạo issue, tìm kiếm, cập nhật trạng thái — bạn chỉ cần nói hoặc gõ lệnh, AI sẽ làm thay.
Ví dụ:
- "Tạo issue bug cho project DEV, mô tả lỗi login bị 500"
- "Tìm tất cả issues đang In Progress được gán cho tôi"
- "Chuyển issue DEV-123 sang Done"
- "Phân tích yêu cầu này thành các task trong sprint"
✨ Tính năng (16 Tools)
📋 Quản lý Issue
| Câu lệnh | Server làm |
|---|---|
| "Tạo issue mới" | Tạo issue với project, summary, type, priority, labels, assignee |
| "Xem issue DEV-123" | Lấy chi tiết issue (status, assignee, description ADF đẹp) |
| "Sửa issue DEV-123" | Cập nhật summary, description, priority, labels, assignee |
| "Xoá issue DEV-123" | Xoá vĩnh viễn |
| "Tìm issue bị lỗi" | Search bằng JQL — mạnh mẽ, linh hoạt |
💬 Comments & Workflow
| Câu lệnh | Server làm |
|---|---|
| "Thêm comment vào DEV-123" | Ghi comment |
| "Chuyển DEV-123 sang In Progress" | Chuyển trạng thái workflow |
📂 Projects & Sprint
| Câu lệnh | Server làm |
|---|---|
| "Liệt kê projects" | Danh sách projects |
| "Board nào đang có?" | Danh sách boards |
| "Tạo sprint mới" | Tạo sprint với tên, thời gian, mục tiêu |
| "Issues trong sprint 5?" | Tất cả issues trong sprint |
👤 Users
| Câu lệnh | Server làm |
|---|---|
| "Tìm user tên An" | Search users theo tên, email |
Mô tả issue tự động render đẹp: khi bạn nhập description dạng Markdown (## heading, - bullet list), server tự động chuyển sang Atlassian Document Format (ADF) — hiển thị headings, lists, paragraphs rõ ràng trong Jira.
🛠️ Cài đặt
Yêu cầu
- Python 3.10+
- Tài khoản Jira Cloud (free cũng được)
- Jira API Token
- Git (clone project)
1. Clone & cài đặt
git clone https://github.com/rifujin123/jira-mcp.git
cd jira-mcp
# Tạo môi trường ảo
python -m venv .venv
# Kích hoạt
# Windows:
.venv\Scripts\activate
# Mac / Linux:
source .venv/bin/activate
# Cài thư viện
pip install -r requirements.txt
# Tạo file .env từ mẫu
cp .env.example .env
2. Lấy Jira API Token
- Vào https://id.atlassian.com/manage/api-tokens
- Click Create API token
- Đặt tên (VD:
"Jira MCP") - Copy token
3. Điền credentials
Sửa file .env với nội dung:
JIRA_URL=https://ten-domain.atlassian.net
JIRA_EMAIL=email-cua-ban@gmail.com
JIRA_API_TOKEN=token-vua-tao
4. Kiểm tra kết nối
# Windows:
PYTHONIOENCODING=utf-8 .venv\Scripts\python jira_client.py
# Mac / Linux:
python jira_client.py
Nếu thấy danh sách projects là OK.
🔌 Kết nối với MCP Clients
🤖 Claude Code (CLI)
Cách 1: Chạy trực tiếp từ thư mục project
claude
Nếu đang ở thư mục jira-mcp, Claude Code tự động detect file server.py. Nếu không, chạy:
claude --mcp-server "python D:/GITHUB/Jira-mcp/server.py"
Cách 2: Thêm vào config (không cần cd vào project)
Mở file:
- Windows:
%APPDATA%\Claude Code\settings.json - Mac:
~/Library/Application Support/Claude Code/settings.json
Thêm vào mcpServers:
{
"mcpServers": {
"jira": {
"command": "python",
"args": ["D:/GITHUB/Jira-mcp/server.py"],
"env": {
"JIRA_URL": "https://ten-domain.atlassian.net",
"JIRA_EMAIL": "email-cua-ban@gmail.com",
"JIRA_API_TOKEN": "token-cua-ban"
}
}
}
}
Cách 3: Dùng uv (nhanh hơn, không cần cài thủ công)
pip install uv
{
"mcpServers": {
"jira": {
"command": "uv",
"args": [
"run",
"--directory", "/path/to/jira-mcp",
"server.py"
],
"env": {
"JIRA_URL": "https://ten-domain.atlassian.net",
"JIRA_EMAIL": "email-cua-ban@gmail.com",
"JIRA_API_TOKEN": "token-cua-ban"
}
}
}
}
🖥️ Claude Desktop App
Mở file config:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"jira": {
"command": "python",
"args": ["D:/GITHUB/Jira-mcp/server.py"],
"env": {
"JIRA_URL": "https://ten-domain.atlassian.net",
"JIRA_EMAIL": "email-cua-ban@gmail.com",
"JIRA_API_TOKEN": "token-cua-ban"
}
}
}
}
Sau đó Restart Claude Desktop → thấy icon cờ lê → Jira tools sẵn sàng.
📘 VS Code (Visual Studio Code)
Cài extension Claude Code hoặc dùng MCP client cho VS Code:
1. Cài Claude Code extension:
- Mở VS Code
- Extensions → tìm "Claude Code"
- Cài đặt
2. Cấu hình trong VS Code:
- File → Preferences → Settings
- Tìm
claude.mcpServers - Add:
{
"jira": {
"command": "python",
"args": ["D:/GITHUB/Jira-mcp/server.py"],
"env": {
"JIRA_URL": "https://ten-domain.atlassian.net",
"JIRA_EMAIL": "email-cua-ban@gmail.com",
"JIRA_API_TOKEN": "token-cua-ban"
}
}
}
Hoặc dùng file .vscode/settings.json trong project.
⌨️ Cursor
1. Mở Cursor Settings:
- File → Preferences → Cursor Settings
- Tab MCP
2. Add MCP Server:
{
"jira": {
"command": "python",
"args": ["D:/GITHUB/Jira-mcp/server.py"],
"env": {
"JIRA_URL": "https://ten-domain.atlassian.net",
"JIRA_EMAIL": "email-cua-ban@gmail.com",
"JIRA_API_TOKEN": "token-cua-ban"
}
}
}
🧰 Công cụ MCP Inspector (Test nhanh)
Dùng để test từng tool qua Web UI mà không cần AI client:
pip install "mcp[cli]"
mcp dev server.py
Mở http://localhost:5173 → thử từng tool trực quan.
📚 JQL Examples
// Tất cả issues của project DEV
project = DEV
// Issues đang In Progress, gán cho tôi
assignee = currentUser() AND status = "In Progress"
// Tìm theo từ khoá
text ~ "database error"
// Issues được tạo trong 7 ngày gần đây
created >= -7d
// Priority cao nhất
project = DEV ORDER BY priority DESC, created ASC
// Issues trong sprint cụ thể
sprint = 5
// Bugs chưa được assign
issuetype = Bug AND assignee IS NULL
🧠 Kiến trúc
Bạn ── nói ──► AI (Claude/Cursor/...) ── JSON-RPC ──► Jira MCP Server ── HTTP ──► Jira Cloud API
│
▼
16 tools sẵn sàng
| Layer | Công nghệ |
|---|---|
| Transport | stdio (process-to-process) |
| Protocol | MCP (Model Context Protocol) |
| Jira SDK | atlassian-python-api |
| MCP SDK | FastMCP (Python) |
| Auth | Basic Auth (email + API token) |
| Description | ADF (Atlassian Document Format) — rich text |
📁 Cấu trúc project
jira-mcp/
├── server.py # ★ File chính — MCP server, 16 tools
├── jira_client.py # JiraClient — gọi API, xử lý lỗi, ADF format
├── requirements.txt # Thư viện cần cài
├── .env # Credentials Jira (đã có .gitignore)
├── .env.example # Mẫu file .env
└── README.md # Bạn đang đọc đây
⚠️ Lỗi thường gặp
| Lỗi | Nguyên nhân | Cách fix |
|---|---|---|
| "Authentication failed" | Sai email hoặc API token | Kiểm tra lại .env |
| "Resource not found" | Sai issue key, project key | Kiểm tra lại key |
| "Site temporarily unavailable" | Jira site chưa active | Vào browser kiểm tra |
| "Rate limit exceeded" | Gọi API quá nhanh | Chờ 1 lúc rồi thử lại |
| "Jira Software license" | Board/sprint không có | Nâng cấp plan hoặc bỏ qua |
cp1252 encode error |
Windows terminal | Thêm PYTHONIOENCODING=utf-8 |
📄 License
MIT — tự do dùng, sửa, chia sẻ.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。