使用说明
Jira MCP服务器
Jira Cloud的模型上下文协议(MCP)服务器,使AI助手能够与Jira问题进行交互。
特性
| 工具 | 说明 |
|---|---|
| 创建_发行 | 创建一个新的Jira问题(故事、Bug、任务、史诗等) |
| 获取问题 | 获取特定Jira问题的详细信息 |
| list_issues | 使用JQL(Jira查询语言)搜索问题 |
| 获取问题字段 | 获取问题的所有字段(包括自定义字段) |
| update_issue | 更新现有问题(摘要、描述、受让人、优先级、标签、自定义字段) |
| 删除_问题 | 按密钥或ID删除Jira问题(可选择删除子任务) |
| 添加注释 | 为Jira问题添加评论 |
| get_transitions | 获取问题的可用状态转换 |
| 过渡问题 | 将问题转换为新状态 |
先决条件
安装
使用此MCP服务器的最简单方法是通过 npx 或 bunx -无需安装!只需按如下所示配置您的MCP客户端。
如果您希望全局安装:
# Using npm
npm install -g @carmeloricarte/jira-mcp-server
# Using Bun
bun install -g @carmeloricarte/jira-mcp-server
环境变量
重要提示: 您不需要在系统或用户级别设置环境变量。MCP客户端将在服务器进程启动时将它们传递给服务器进程。只需在
envMCP配置的对象。
| 变量 | 描述 | 示例 |
|---|---|---|
JIRA_HOST |
您的Jira Cloud域名(不含https://) | your-company.atlassian.net |
JIRA_EMAIL |
与您的Atlassian帐户关联的电子邮件 | user@example.com |
JIRA_API_TOKEN |
从Atlassian生成的API令牌 | ATATT3xF... |
MCP客户端配置
注: 以下所有示例均使用
npx(Node.js)。如果您喜欢Bun,请更换"command": "npx"随着"command": "bunx"并删除"-y"从args。
⚠️ Windows配置
在Windows上,您必须包装 npx 或 bunx 命令与 cmd /c.使用此格式:
{
"command": "cmd",
"args": ["/c", "npx", "-y", "@carmeloricarte/jira-mcp-server"]
}
或者与Bun:
{
"command": "cmd",
"args": ["/c", "bunx", "@carmeloricarte/jira-mcp-server"]
}
重要提示: 包名称必须始终为 最后一个论点 在args数组中。
克劳德代码
配置文件位置:
- macOS/Linux:
~/.claude/settings.json - 窗户:
%USERPROFILE%\.claude\settings.json
{
"mcpServers": {
"jira": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@carmeloricarte/jira-mcp-server"],
"env": {
"JIRA_HOST": "your-company.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
VS代码(副驾驶MCP扩展)
配置文件位置:
- macOS/Linux:
~/.vscode/mcp.json或工作空间.vscode/mcp.json - 窗户:
%USERPROFILE%\.vscode\mcp.json或工作空间.vscode\mcp.json
{
"servers": {
"jira": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@carmeloricarte/jira-mcp-server"],
"env": {
"JIRA_HOST": "your-company.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
光标
配置文件位置:
- macOS:
~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json - 窗户:
%APPDATA%\Cursor\User\globalStorage\cursor.mcp\mcp.json
{
"mcpServers": {
"jira": {
"command": "npx",
"args": ["-y", "@carmeloricarte/jira-mcp-server"],
"env": {
"JIRA_HOST": "your-company.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
泽德
配置文件位置:
- macOS:
~/.config/zed/settings.json - 窗户:
%APPDATA%\Zed\settings.json
{
"language_models": {
"mcp_servers": {
"jira": {
"command": "npx",
"args": ["-y", "@carmeloricarte/jira-mcp-server"],
"env": {
"JIRA_HOST": "your-company.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
}
开源代码
配置文件位置:
- macOS/Linux:
~/.config/opencode/config.json - 窗户:
%USERPROFILE%\.config\opencode\config.json
{
"mcp_servers": {
"jira": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@carmeloricarte/jira-mcp-server"],
"env": {
"JIRA_HOST": "your-company.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
Codex(OpenAI CLI)
配置文件位置:
- macOS/Linux:
~/.codex/config.json - 窗户:
%USERPROFILE%\.codex\config.json
{
"mcpServers": {
"jira": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@carmeloricarte/jira-mcp-server"],
"env": {
"JIRA_HOST": "your-company.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
风帆冲浪(Codeium)
配置文件位置:
- macOS:
~/.codeium/windsurf/mcp_config.json - 窗户:
%USERPROFILE%\.codeium\windsurf\mcp_config.json
{
"mcpServers": {
"jira": {
"command": "npx",
"args": ["-y", "@carmeloricarte/jira-mcp-server"],
"env": {
"JIRA_HOST": "your-company.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
工具示例
创建问题
Create a new Story in project PROJ with title "Implement user authentication"
Create an Epic in PROJ called "[EPIC] Payment System" with description "Complete payment integration"
获取问题
Get issue PROJ-123
JQL的搜索问题
Search for issues: project = PROJ AND status = "In Progress"
更新问题
Update PROJ-123: change priority to High and add labels "urgent", "frontend"
Update the description of PROJ-123 to "Updated requirements..."
删除问题
Delete issue PROJ-123
Delete PROJ-456 and all its subtasks
添加评论
Add comment "Working on this now" to PROJ-123
过渡问题
Move PROJ-123 to "In Progress"
发展
克隆并安装依赖项
git clone https://github.com/carmeloricarte/jira-mcp-server.git
cd jira-mcp-server
bun install
运行测试
bun test
运行测试并覆盖
bun test --coverage
独立运行服务器
JIRA_HOST=your-company.atlassian.net \
JIRA_EMAIL=your-email@example.com \
JIRA_API_TOKEN=your-token \
bun run start
故障排除
服务器未启动
- 验证是否安装了Node.js 18+或Bun:
node --version或bun --version - 尝试手动运行:
npx -y @carmeloricarte/jira-mcp-server或bunx @carmeloricarte/jira-mcp-server - 检查MCP客户端日志中是否有任何错误消息
身份验证错误
- 在验证您的API令牌是否有效 大西洋API代币
- 确保
JIRA_HOST不包括https:// - 验证
JIRA_EMAIL匹配用于生成令牌的电子邮件
list_issues的结果为空
服务器包括默认字段(摘要、状态、优先级、问题类型、受让人、已更新)。如果您需要其他字段,请将其传入 fields 参数。
贡献
欢迎投稿!如果你想为这个项目做出贡献:
- 分叉 仓库
- 创建 特征分支(
git checkout -b feature/amazing-feature) - 提交 您的更改(
git commit -m 'feat: add amazing feature') - 推 到分行(
git push origin feature/amazing-feature) - 打开 拉取请求
指南
- 遵循现有代码样式
- 为新功能编写测试
- 根据需要更新文档
- 使用 常规承诺 用于提交消息
报告问题
发现错误或有功能请求?请 打开一个问题 尽可能详细。
许可证
麻省理工学院
