jira-dev-mcp

jira-dev-mcp

A local MCP server for Jira Cloud-driven development. Connects MCP clients to Jira for searching issues, reading tasks, parsing attachments, and mapping projects to local repos.

Category
访问服务器

README

jira-dev-mcp

A local MCP server for Jira Cloud-driven development. Connects Claude Code, OpenCode, Codex, and other MCP clients to your Jira instance — search issues, read task details, parse attachments, and map Jira projects to local repositories.

npm version License: MIT

Other languages: 中文 · 日本語

Features

  • Search Jira issues with natural language or raw JQL
  • Read full task details: description, subtasks, changelog, comments, attachments
  • Download and parse CSV, XLSX, XLS, PDF attachments via Python
  • Images and binary files passed to AI client as base64
  • Map Jira project keys to local repository paths
  • OAuth 2.0 (3LO) browser-based login — no manual token management
  • Auto-refresh OAuth tokens before expiry
  • Post comments on Jira issues with clickable URL response
  • Token-only comment confirmation: confirm pending comments with just the token, no need to re-send body
  • Edit existing comments with the same confirmation flow
  • Batch download all attachments from an issue in a single call with optional MIME filter
  • Auto-retry on transient API errors (429/503) with Retry-After header support
  • Rich ADF parsing: code blocks, tables, mentions, links, panels, and more
  • Multi-paragraph and fenced code block support in posted comments
  • Typed error hierarchy for programmatic error handling
  • OAuth callback port auto-fallback when default port is busy
  • Read and write Jira access

Install

npm install -g jira-dev-mcp

Authentication

Option A: OAuth 2.0 (Recommended)

Just run:

jira-dev login

A browser window opens for Jira authorization. Tokens are saved to ~/.jira-dev/config.json and auto-refreshed. No manual Client ID or Secret required.

Advanced: To use your own OAuth app, set JIRA_CLIENT_ID and JIRA_CLIENT_SECRET before running jira-dev login.

Option B: API Token (Basic Auth)

export JIRA_BASE_URL="https://your-domain.atlassian.net"
export JIRA_EMAIL="you@example.com"
export JIRA_TOKEN="your-jira-api-token"

Optional — store token in macOS Keychain instead of env var:

security add-generic-password -a "$USER" -s "jira-dev-mcp:JIRA_TOKEN" -w "your-token"

MCP Client Configuration

Auto-register (easiest)

jira-dev setup

This creates or updates ~/.claude.json (Claude Code) and ~/.opencode/config.json (OpenCode) automatically. If an existing config file contains invalid JSON, jira-dev setup now fails with an explicit error instead of silently skipping it.

Manual — Claude Code (~/.claude.json)

{
  "mcpServers": {
    "jira": {
      "command": "jira-dev",
      "args": ["server"]
    }
  }
}

Manual — OpenCode / Codex

{
  "mcpServers": {
    "jira": {
      "command": "jira-dev",
      "args": ["server"]
    }
  }
}

With environment variables

{
  "mcpServers": {
    "jira": {
      "command": "jira-mcp-server",
      "env": {
        "JIRA_BASE_URL": "https://your-domain.atlassian.net",
        "JIRA_EMAIL": "you@example.com",
        "JIRA_TOKEN": "your-token"
      }
    }
  }
}

Tools

Tool Description
jira_search_issues Search by keywords or JQL
jira_read_task Read full issue details
jira_download_attachment Download and parse a single attachment
jira_download_all_attachments Download all attachments in one call; optional MIME filter (e.g. image/)
jira_my_tasks List issues assigned to you
jira_add_comment Post a comment; confirm with token only (no body re-send needed)
jira_edit_comment Edit an existing comment; same token-only confirm flow
jira_set_project_path Map a Jira project to a local repo path
jira_get_project_path Get the local path for a project
jira_analyze_task Full investigation workflow: reads issue + comments + attachments, selects type-aware template (Bug/Story/Task), and guides step-by-step through explore → plan → implement → post comment

CLI Commands

jira-dev status    # Show current auth mode, token state, and mapped projects
jira-dev doctor    # Run environment and config health checks
jira-dev upgrade   # Upgrade jira-dev-mcp from npm
jira-dev setup     # Register jira-dev into supported MCP clients
jira-dev read AT-123             # Read issue details from the terminal
jira-dev comment AT-123 "Done"   # Post a comment directly (bypasses manual mode)
jira-dev download AT-123         # Download all attachments
jira-dev download AT-123 spec.xlsx  # Download a single attachment
jira-dev config set-comment-mode manual   # Require confirmation before posting comments

Development Workflow

Standard usage with Claude Code

Step 1 — One-time setup: map your project

jira_set_project_path(jiraProject: "AT", localPath: "/path/to/your/repo")

Step 2 — Find your task

jira_my_tasks(status: "In Progress")

or search by keyword / JQL:

jira_search_issues(query: "login timeout bug")
jira_search_issues(query: "project = AT AND sprint in openSprints()")

Step 3 — Read the task

jira_read_task(key: "AT-123", includeComments: true)

Returns: description, subtasks, changelog, comments, attachment list, and the local repo path.

Step 4 — Download attachments if needed

jira_download_all_attachments(key: "AT-123")
jira_download_all_attachments(key: "AT-123", mime_filter: "image/")
jira_download_attachment(key: "AT-123", filename: "spec.xlsx")

Use jira_download_all_attachments to grab everything in one call, or filter by MIME type. Use jira_download_attachment for a single file. CSV / XLSX / XLS / PDF are parsed and returned as structured text. Images are returned as base64.

Step 5 — AI implements the fix

With the task details and local repo path in context, ask Claude Code to:

  • Explain the root cause
  • Propose a plan with impact scope
  • Implement the fix
  • Write test cases

Project Path Mapping

Map a Jira project key to a local repo so the AI knows where to look:

jira_set_project_path(jiraProject: "AT", localPath: "/Users/you/projects/my-app")

Python Dependency (Attachment Parsing)

Python 3 is required for CSV, XLSX, XLS, and PDF parsing. For XLS and PDF, additional packages are auto-installed on first use, or install manually:

python3 -m pip install -r $(npm root -g)/jira-dev-mcp/scripts/requirements.txt

Security

  • OAuth tokens stored at ~/.jira-dev/config.json with 600 permissions
  • API tokens: prefer env vars or macOS Keychain over config file
  • Attachment size and MIME type allowlist enforced before download
  • OAuth client credentials injected at build time — never committed to source
  • Secrets are never written to logs

Local Development

git clone https://github.com/nianyi778/jira-dev-mcp.git
cd jira-dev-mcp
npm install
npm run generate-defaults   # required before first build (uses env vars or empty placeholders)
npm test
npm run build

Inspect tools interactively:

npx @modelcontextprotocol/inspector node dist/index.js

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选