jira-context-mcp
jira-context-mcp
jira-context-mcp 是一个面向生产环境的 MCP 服务器,用于从 Jira URL 获取结构化的 Jira 问题上下文。它专为 Codex 和 Claude Code 等编码智能体设计,以便它们能够快速理解问题的意图和实现背景。
该服务器的功能
提供一个 MCP 工具:
get_jira_issue_from_url验证输入的 URL 是否属于您的
JIRA_BASE_URL从多种 Jira URL 格式中提取 Jira 问题键 (issue key)
调用 Jira Cloud REST API:
GET /rest/api/3/issue/{issueIdOrKey}?expand=names,renderedFields
将 Jira 富文本(Atlassian 文档格式)转换为纯文本
返回简洁、适合智能体阅读的结构化问题上下文
Related MCP server: JIRA MCP Server
支持的 Jira 问题类型
此服务器与问题类型无关。它适用于任何 Jira 问题类型,包括:
Bug
功能请求 (Feature request)
任务 (Task)
故事 (Story)
史诗 (Epic)
需求 (Requirement)
改进 (Improvement)
支持工单 (Support ticket)
自定义问题类型
所需环境变量
JIRA_EMAIL: Jira 账户邮箱JIRA_API_TOKEN: Jira API 令牌JIRA_BASE_URL: Jira Cloud 租户 URL(例如:https://your-domain.atlassian.net)
快速设置命令
Codex(无需全局安装)
codex mcp add jira \
--env JIRA_EMAIL=you@example.com \
--env JIRA_API_TOKEN=your-token \
--env JIRA_BASE_URL=https://your-domain.atlassian.net \
-- npx -y github:TastyHeadphones/jira-context-mcpClaude Code(无需全局安装)
claude mcp add jira \
-e JIRA_EMAIL=you@example.com \
-e JIRA_API_TOKEN=your-token \
-e JIRA_BASE_URL=https://your-domain.atlassian.net \
-- npx -y github:TastyHeadphones/jira-context-mcp可选:先全局安装
npm install -g github:TastyHeadphones/jira-context-mcp然后使用本地二进制文件添加:
codex mcp add jira \
--env JIRA_EMAIL=you@example.com \
--env JIRA_API_TOKEN=your-token \
--env JIRA_BASE_URL=https://your-domain.atlassian.net \
-- jira-context-mcpclaude mcp add jira \
-e JIRA_EMAIL=you@example.com \
-e JIRA_API_TOKEN=your-token \
-e JIRA_BASE_URL=https://your-domain.atlassian.net \
-- jira-context-mcp工具
get_jira_issue_from_url
输入:
{
"url": "string"
}支持的 URL 示例:
${JIRA_BASE_URL}/browse/ABC-123${JIRA_BASE_URL}/jira/software/projects/ABC/boards/1/backlog?selectedIssue=ABC-123任何
JIRA_BASE_URL下包含类似ABC-123问题键的 Jira URL
返回的结构化数据包括:
issueKey,issueUrl,summarydescription(尽可能转换为纯文本)issueType,status,statusCategory,priorityassignee,reporterlabels,componentsfixVersions,affectedVersionscreated,updated,dueDateparent,epicsubtasks,linkedIssuesattachments(仅元数据)comments(最近 10 条)acceptanceCriteria(从描述/自定义字段中尽力提取)customFields(非空、标准化、人类可读)
创建 Jira API 令牌
点击 Create API token(创建 API 令牌)。
为令牌命名并复制它。
将该值用于
JIRA_API_TOKEN。
本地运行
安装依赖:
npm install设置环境变量(例如通过 shell/会话中的
.env文件)。构建:
npm run build启动:
npm start开发模式:
npm run devMCP 配置示例
在您的 MCP 客户端配置中使用此服务器条目:
{
"mcpServers": {
"jira": {
"command": "node",
"args": ["/absolute/path/to/jira-context-mcp/dist/index.js"],
"env": {
"JIRA_EMAIL": "you@example.com",
"JIRA_API_TOKEN": "your-token",
"JIRA_BASE_URL": "https://your-domain.atlassian.net"
}
}
}
}Claude Code MCP 配置示例
在您的 Claude Code MCP 服务器配置文件中使用上述相同的 JSON 块。
Codex MCP 配置示例
在您的 Codex MCP 服务器配置文件中使用上述相同的 JSON 块。
工具调用示例
{
"name": "get_jira_issue_from_url",
"arguments": {
"url": "https://your-domain.atlassian.net/browse/ABC-123"
}
}输出示例
{
"issueKey": "ABC-123",
"issueUrl": "https://your-domain.atlassian.net/browse/ABC-123",
"summary": "Prevent duplicate webhook retries",
"description": "As a platform engineer, I need retry deduplication ...",
"acceptanceCriteria": "- Duplicate deliveries are ignored\n- Metrics include dropped duplicates",
"issueType": "Story",
"status": "In Progress",
"statusCategory": "In Progress",
"priority": "High",
"assignee": {
"accountId": "5b10ac8d82e05b22cc7d4ef5",
"displayName": "Alex Example",
"emailAddress": null,
"active": true
},
"labels": ["webhook", "idempotency"],
"components": ["API"],
"fixVersions": ["2026.05"],
"affectedVersions": ["2026.04"],
"subtasks": [],
"linkedIssues": [],
"attachments": [],
"comments": [],
"customFields": []
}安全说明
请妥善保管
JIRA_API_TOKEN。切勿将其提交到源代码管理中。为与令牌关联的账户使用最小权限的 Jira 访问权限。
此服务器仅获取问题数据和附件元数据;它不会下载附件文件。
URL 验证会拒绝您配置的
JIRA_BASE_URL之外的 URL。
This server cannot be deployed
Maintenance
Related MCP Connectors
Turns any URL into SEO metadata, contacts, tech stack, and AI-ready Markdown, in one call.
Turn any URL into clean, structured, agent-ready content. $0.02/call via x402 on Base.
Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.
Fetch any URL and get clean Markdown. Web scraping for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables ChatGPT and other AI assistants to directly interact with JIRA issues, currently offering the ability to retrieve issue details.-
- FlicenseNot gradedqualityDmaintenanceEnables AI systems to interact with JIRA through natural language, allowing users to retrieve issue details, create new tickets, search using JQL, and access project information.3-
- AlicenseBqualityDmaintenanceEnables fetching and viewing Jira issue details directly through Claude Desktop using secure API token authentication. Provides comprehensive issue information including status, assignee, priority, and descriptions in both human-readable and structured formats.10424 npm1MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to fetch ProofHub task details, comments, and bug tracker links from a URL, streamlining development workflows.615 npmMIT