Jira MCP 服务器
使用自然语言与 Jira 对话,获取项目信息并进行修改。将其与 Claude Desktop 结合使用,并结合您创建的包含项目信息的自定义 README 文件,即可委派项目管理 (PM) 任务(例如,如果您有我的团队成员及其专长的列表,可以将任何新问题分配给最相关的人员)。
使用模型上下文协议构建。
该服务器支持:
- 项目创建和配置
- 问题和子任务管理
- 问题链接和依赖关系
- 自动化问题工作流程
配置
所需的环境变量:
可用工具
1.用户管理
// Get user's account ID by email
{
email: "user@example.com";
}
2. 问题类型管理
// List all available issue types
// Returns: id, name, description, subtask status
// No parameters required
3. 问题链接类型
// List all available issue link types
// Returns: id, name, inward/outward descriptions
// No parameters required
4.问题管理
检索问题
// Get all issues in a project
{
projectKey: "PROJECT"
}
// Get issues with JQL filtering
{
projectKey: "PROJECT",
jql: "status = 'In Progress' AND assignee = currentUser()"
}
// Get issues assigned to user
{
projectKey: "PROJECT",
jql: "assignee = 'user@example.com' ORDER BY created DESC"
}
创建问题
// Create a standard issue
{
projectKey: "PROJECT",
summary: "Issue title",
issueType: "Task", // or "Story", "Bug", etc.
description: "Detailed description",
assignee: "accountId", // from get_user tool
labels: ["frontend", "urgent"],
components: ["ui", "api"],
priority: "High"
}
// Create a subtask
{
parent: "PROJECT-123",
projectKey: "PROJECT",
summary: "Subtask title",
issueType: "Subtask",
description: "Subtask details",
assignee: "accountId"
}
更新问题
// Update issue fields
{
issueKey: "PROJECT-123",
summary: "Updated title",
description: "New description",
assignee: "accountId",
status: "In Progress",
priority: "High"
}
问题依赖关系
// Create issue link
{
linkType: "Blocks", // from list_link_types
inwardIssueKey: "PROJECT-124", // blocked issue
outwardIssueKey: "PROJECT-123" // blocking issue
}
删除问题
// Delete single issue
{
issueKey: "PROJECT-123"
}
// Delete issue with subtasks
{
issueKey: "PROJECT-123",
deleteSubtasks: true
}
// Delete multiple issues
{
issueKeys: ["PROJECT-123", "PROJECT-124"]
}
字段格式
描述字段
描述字段支持 markdown 样式的格式:
- 段落之间使用空行
- 使用“-”表示要点
- 使用“1. ”表示编号列表
- 使用以“:”结尾的标题(后跟空行)
例子:
Task Overview:
This task involves implementing new features:
- Feature A implementation
- Feature B testing
Steps:
1. Design component
2. Implement logic
3. Add tests
Acceptance Criteria:
- All tests passing
- Documentation updated
错误处理
服务器提供以下详细的错误消息:
- 无效的发行密钥
- 缺少必填字段
- 权限问题
- API 速率限制
设置说明
- 克隆存储库:
git clone https://github.com/George5562/Jira-MCP-Server.git
cd Jira-MCP-Server
- 安装依赖项:
- 配置环境变量:在根目录下创建
.env
文件:JIRA_HOST=your-instance.atlassian.net
JIRA_EMAIL=your-email@example.com
JIRA_API_TOKEN=your-api-token
- 构建项目:
- 启动服务器:
配置 Claude 桌面
要将此 MCP 服务器与 Claude Desktop 一起使用:
- 找到您的 Claude Desktop 配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- 将 Jira MCP 服务器添加到您的配置中:
{
"mcp_servers": [
{
"name": "jira-server",
"command": "npm start",
"cwd": "/path/to/jira-server",
"env": {
"JIRA_HOST": "your-instance.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
]
}
将/path/to/jira-server
替换为克隆存储库的绝对路径。 - 重新启动 Claude Desktop 以应用更改。
参考