backlog-mcp
An MCP server providing AI agents with read access to Backlog issues, comments, and attachments via API Key authentication.
README
backlog-mcp
An MCP (Model Context Protocol) server for Backlog (Nulab), providing AI agents with read access to Backlog issues and comments via API Key authentication.
Stack
- TypeScript — strict, ESM (NodeNext)
- @modelcontextprotocol/sdk — MCP server + stdio transport
- Zod — config and tool input validation
- Axios — Backlog REST API HTTP client
Features
- 🔑 Simple API Key authentication (no browser or SSO required)
- 🔎
backlog_get_issue_list— list issues with rich filtering (project, status, priority, assignee, keyword, etc.) - 🔍
backlog_get_issue— fetch a single issue's full details - 💬
backlog_get_comments— fetch issue comments with changelog entries - 🗂️
backlog_get_projects— list all accessible projects (with IDs and keys for filtering) - 👥
backlog_get_users— list project members (get user IDs for assignee filtering) - 📎
backlog_get_attachments— list attachments on an issue (with IDs for downloading) - ⬇️
backlog_download_attachment— download an attachment to the local filesystem - 📦
backlog_export_issue_context— export issue, comments, and attachments into a local raw Markdown context bundle for LLM summarization - 🏷️
backlog_get_statuses— list all statuses in a project (with IDs for filtering) - ⚡
backlog_get_priorities— list global issue priorities (with IDs for filtering) - 📂
backlog_get_categories— list all categories in a project (with IDs for filtering) - 🎯
backlog_get_milestones— list milestones/versions in a project (with IDs for filtering)
Requirements
- Node.js >= 20
- A Backlog space with API access
- A Backlog API Key (generate at Account Settings → API → Register API key)
Quick Start (End Users)
No cloning or building required. Uses
npxdirectly — the MCP client spawns and manages the process automatically via stdio.
Step 1 — Add to your MCP client
Gemini CLI
gemini mcp add backlog npx -y @cuongph.dev/backlog-mcp --env BACKLOG_BASE_URL=https://yourspace.backlog.com --env BACKLOG_API_KEY=your_api_key_here
Cursor
Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project:
{
"mcpServers": {
"backlog": {
"command": "npx",
"args": ["-y", "@cuongph.dev/backlog-mcp"],
"env": {
"BACKLOG_BASE_URL": "https://yourspace.backlog.com",
"BACKLOG_API_KEY": "your_api_key_here"
}
}
}
}
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"backlog": {
"command": "npx",
"args": ["-y", "@cuongph.dev/backlog-mcp"],
"env": {
"BACKLOG_BASE_URL": "https://yourspace.backlog.com",
"BACKLOG_API_KEY": "your_api_key_here"
}
}
}
}
Tip: You can omit the
envblock and place the variables in a.envfile at your working directory instead.dotenvis loaded automatically at startup.
Restart your MCP client after saving the config. No separate server process needed — the client spawns and manages it automatically.
Development Setup
For contributors and developers working on the source code.
1. Clone and install
git clone <repo-url>
cd backlog-mcp
npm install
2. Configure environment
cp .env.example .env
Edit .env:
BACKLOG_BASE_URL=https://yourspace.backlog.com
BACKLOG_API_KEY=your_api_key_here
3. Add to MCP client (local build)
First build the project:
npm run build
Then use the local dist/server.js in your MCP config:
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"backlog": {
"command": "node",
"args": ["/absolute/path/to/backlog-mcp/dist/server.js"]
}
}
}
The
.envfile in the project root is loaded automatically — no need to duplicate env vars in the MCP config.
Agent Summary Prompt
After exporting an issue with backlog_export_issue_context, use docs/prompts/backlog_issue_summary.md as the agent prompt template for summarizing task intent, comments, attachments, inferred acceptance criteria, and optional code context.
For Backlog-to-Jira migration, use docs/prompts/backlog_to_jira_migration.md. It keeps Jira description short, posts raw Backlog context, Vietnamese translation, and Vietnamese analysis as separate Jira comments, and uploads matching markdown files with clear names.
MCP Tools
backlog_get_issue_list
Fetch a list of Backlog issues with optional filters.
Input:
| Field | Type | Description |
|---|---|---|
projectIdOrKey |
string |
Filter by project key ("MYPROJ") or numeric ID ("12345") — comma-separated, auto-resolved |
statusId |
number[] or string |
Filter by status: 1=Open, 2=InProgress, 3=Resolved, 4=Closed. Accept [1,2] or "1,2" |
priorityId |
number[] or string |
Filter by priority: 2=High, 3=Normal, 4=Low. Accept [2,3] or "2,3" |
assigneeId |
number[] or string |
Filter by assignee user ID(s). Get IDs from backlog_get_users |
categoryId |
number[] or string |
Filter by category ID(s) |
milestoneId |
number[] or string |
Filter by milestone ID(s) |
keyword |
string |
Search keyword in summary and description |
parentChild |
0|1|2|3|4 |
0=all, 1=child only, 2=parent only, 3=no parent, 4=no child |
count |
number |
Number of issues (1–100, default 20) |
offset |
number |
Pagination offset (default 0) |
sort |
string |
Sort field (created, updated, status, priority, dueDate, ...) |
order |
asc|desc |
Sort order (default desc) |
Output: Compact table + detailed summaries for each issue (key, type, status, priority, assignee, dates, hours).
backlog_get_issue
Fetch a single Backlog issue by key or numeric ID.
Input:
| Field | Type | Description |
|---|---|---|
issueIdOrKey |
string |
Issue key (e.g. BLG-123) or numeric issue ID |
Output: Full issue details — summary, description, status, priority, type, assignee, reporter, categories, milestones, versions, dates, estimated/actual hours, URL.
backlog_get_comments
Fetch comments for a Backlog issue.
Input:
| Field | Type | Description |
|---|---|---|
issueIdOrKey |
string |
Issue key (e.g. BLG-123) or numeric issue ID |
count |
number |
Number of comments (1–100, default 20) |
order |
asc|desc |
asc = oldest first, desc = newest first (default) |
minId |
number |
Return comments with ID >= minId |
maxId |
number |
Return comments with ID <= maxId |
Output: List of comments with author, date, text content, and field changes (changelog).
backlog_get_projects
Fetch the list of Backlog projects accessible to the current API Key.
Input:
| Field | Type | Description |
|---|---|---|
archived |
boolean |
Omit = all, false = active only, true = archived only |
Output: Table of projects with ID, key, name, and archived flag. Use the key in project-scoped tools or projectIdOrKey in backlog_get_issue_list.
backlog_get_users
Fetch project members for a given Backlog project.
Input:
| Field | Type | Description |
|---|---|---|
projectIdOrKey |
string |
Required. Project key (e.g. MYPROJ) or numeric ID |
keyword |
string |
Filter by display name or userId (case-insensitive) |
Output: Table of project members with numeric ID, userId, name, email, and role. Use the ID as assigneeId in backlog_get_issue_list.
backlog_get_statuses
Fetch all statuses defined for a Backlog project.
Input:
| Field | Type | Description |
|---|---|---|
projectIdOrKey |
string |
Project key (e.g. MYPROJ) or numeric project ID |
Output: Table of statuses with ID, name, and color. Use IDs in statusId filter of backlog_get_issue_list.
backlog_get_priorities
Fetch the global list of issue priorities (space-wide, not project-specific).
Input: None required.
Output: Table of priorities with ID and name. Use IDs in priorityId filter of backlog_get_issue_list.
backlog_get_categories
Fetch all categories defined for a Backlog project.
Input:
| Field | Type | Description |
|---|---|---|
projectIdOrKey |
string |
Project key (e.g. MYPROJ) or numeric project ID |
Output: Table of categories with ID and name. Use IDs in categoryId filter of backlog_get_issue_list.
backlog_get_milestones
Fetch milestones (versions) for a Backlog project.
Input:
| Field | Type | Description |
|---|---|---|
projectIdOrKey |
string |
Project key (e.g. MYPROJ) or numeric project ID |
archived |
boolean |
Include archived milestones (default: false) |
Output: Table of milestones with ID, name, start date, due date, and archived flag. Use IDs in milestoneId filter of backlog_get_issue_list.
Project Structure
src/
├── server.ts # MCP server entry point (factory pattern + Express)
├── config.ts # Env var validation (Zod)
├── errors.ts # Typed error classes & factories
├── utils.ts # Shared helpers (dates, string formatting)
├── types.ts # Normalized domain types (BacklogIssue, BacklogComment, ...)
├── types/
│ └── backlog-api.ts # Raw Backlog API response types
├── backlog/
│ ├── endpoints.ts # URL builders (API v2)
│ ├── mappers.ts # Raw API payload → domain types
│ └── http-client.ts # API Key-authenticated Backlog HTTP client
├── tools/
│ ├── get-issue-list.ts # backlog_get_issue_list handler
│ ├── get-issue.ts # backlog_get_issue handler
│ ├── get-comments.ts # backlog_get_comments handler
│ ├── get-statuses.ts # backlog_get_statuses handler
│ ├── get-priorities.ts # backlog_get_priorities handler
│ ├── get-categories.ts # backlog_get_categories handler
│ └── get-milestones.ts # backlog_get_milestones handler
└── tests/ # Unit tests (Vitest)
Development Commands
# Type check (no emit)
npx tsc --noEmit
# Run tests
npm test
# Watch mode
npm run test:watch
# Build for production
npm run build
# Run dev server
npm run dev
Error Codes
| Code | Meaning |
|---|---|
API_KEY_MISSING |
BACKLOG_API_KEY is not set in environment |
BACKLOG_HTTP_ERROR |
Unexpected HTTP error from Backlog REST API (e.g. 401, 403, 404) |
BACKLOG_RESPONSE_ERROR |
Backlog returned an unexpected response shape |
CONFIG_ERROR |
Invalid or missing environment variable |
INVALID_INPUT |
Tool input failed validation |
Security Notes
.envis git-ignored and must never be committed.- Your API Key grants full access to your Backlog space as the associated user — treat it like a password.
- The API Key is only stored locally in
.envand sent as a query parameter over HTTPS.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。