backlog-mcp

backlog-mcp

Syncs Backlog issues to local markdown files for management within MCP-compatible editors like Cursor or Claude Desktop.

Category
访问服务器

README

Backlog MCP Server

A Model Context Protocol (MCP) server for syncing Backlog issues to a local .tasks folder. This allows you to use Backlog issue management within your code editor through MCP-compatible tools like Cursor or Claude Desktop.

Features

  • 🔄 Bidirectional Sync: Download issues from Backlog and push local changes back
  • 📝 Simple Format: Clean markdown files with just title and description
  • 📁 Flexible Organization: Organize tasks in nested folders (sprint-3, backlog, etc.)
  • 🕐 Automatic Timestamps: Incremental sync based on last update time
  • 🔍 Smart Updates: Only syncs changed issues after initial sync
  • 🔌 MCP Compatible: Works with Cursor, Claude Desktop, and other MCP clients

Installation

Option 1: NPM (Recommended)

npm install -g backlog-mcp

Option 2: Local Development

git clone <repository-url>
cd backlog-mcp
npm install
npm run build

Configuration

This server uses environment variables for configuration.

Get Your Backlog API Key

  1. Log in to your Backlog space
  2. Go to Personal Settings > API
  3. Generate a new API key
  4. Copy the key for use in the configuration below

Configuration Options

Option 1: Environment Variables (Recommended)

Set the following environment variables:

Required:

  • BACKLOG_API_KEY - Your Backlog API key
  • BACKLOG_BASE_URL - Your Backlog space URL (e.g., https://yourspace.backlog.com)
  • BACKLOG_PROJECT_KEY - Your project key (e.g., PROJ)

Optional:

  • BACKLOG_TASKS_DIR - Local tasks directory (defaults to .tasks)
  • BACKLOG_IGNORE_ISSUE_TYPES - Comma-separated list of issue types to ignore (e.g., Bug,Task)

Option 2: Configuration File

Create a config.json file in your project root:

{
  "apiKey": "your-backlog-api-key",
  "baseUrl": "https://yourspace.backlog.com",
  "projectKey": "YOUR_PROJECT_KEY",
  "tasksDir": ".tasks",
  "ignoreIssueTypes": ["Bug", "Task"]
}

Usage with Cursor/Claude Desktop

Add to your MCP settings file:

Using NPM Installation

{
  "mcpServers": {
    "backlog-mcp": {
      "command": "npx",
      "args": [
        "-y", 
        "github:danglephuc/backlog-mcp"
      ],
      "env": {
        "BACKLOG_API_KEY": "your-api-key",
        "BACKLOG_BASE_URL": "https://yourspace.backlog.com",
        "BACKLOG_PROJECT_KEY": "YOUR_PROJECT_KEY"
      }
    }
  }
}

Using Local Build

{
  "mcpServers": {
    "backlog-mcp": {
      "command": "node",
      "args": ["/path/to/backlog-mcp/dist/index.js"],
      "env": {
        "BACKLOG_API_KEY": "your-api-key",
        "BACKLOG_BASE_URL": "https://yourspace.backlog.com",
        "BACKLOG_PROJECT_KEY": "YOUR_PROJECT_KEY"
      }
    }
  }
}

Replace:

  • your-api-key with your Backlog API key
  • yourspace with your Backlog space name
  • YOUR_PROJECT_KEY with your project key (e.g., "PROJ")

Available Tools

sync-issues

Syncs issues from Backlog to local .tasks folder with automatic incremental updates.

Parameters: None (uses automatic timestamp tracking)

Features:

  • First sync: Downloads all issues
  • Subsequent syncs: Only downloads updated issues
  • Preserves your folder organization

update-issue

Pushes local changes back to Backlog.

Parameters:

  • issueKey (required): Issue key (e.g., "PROJ-123")

Example: "Update task PROJ-123 to Backlog"

get-issue

Gets details of a specific issue from local files.

Parameters:

  • issueKey (required): Issue key (e.g., "PROJ-123")
  • parentIssue (optional): If true, include all child issues when this is a parent issue/feature

Features:

  • Reads from local .tasks folder
  • When parentIssue=true, returns the main issue plus all child issues in the same folder
  • Useful for understanding the full scope of a feature with all its sub-tasks

Examples:

  • Get single issue: "Get task PROJ-123"
  • Get parent with all children: "Get feature PROJ-100 with all child issues"

test-connection

Tests your Backlog API connection.

Parameters: None

list-task-files

Lists all synced task files.

Parameters: None

bulk-create-tasks

Creates Backlog issues from local temporary task files in parent folders. This tool scans for parent task folders (e.g., SBK-2) and creates issues from temporary files with pattern PARENT-{number}-{random} (e.g., SBK-2-1, SBK-2-2).

Parameters: None

Features:

  • Scans for parent task folders following pattern PARENT-{number}
  • Finds temporary task files with pattern PARENT-{number}-{random}
  • Skips files that already have real Backlog issue keys (e.g., PROJ-123.md)
  • Creates issues in Backlog with proper parent-child relationships
  • Renames local files to use real Backlog issue keys
  • Preserves folder organization

Example Workflow:

  1. Create parent folder: SBK-2/
  2. Create temporary files: SBK-2-1.md, SBK-2-2.md, etc.
  3. Run bulk-create-tasks tool
  4. Files are renamed to real issue keys: PROJ-123.md, PROJ-124.md
  5. Issues are created in Backlog with proper parent relationships

Example Folder Structure:

.tasks/
├── SBK-2/                    ← Parent task folder
│   ├── SBK-2-1.md           ← Temporary file (will be processed)
│   ├── SBK-2-2.md           ← Temporary file (will be processed)
│   ├── PROJ-123.md          ← Real issue key (will be skipped)
│   └── PROJ-124.md          ← Real issue key (will be skipped)
└── PROJ-100/                ← Another parent folder
    ├── PROJ-100-1.md        ← Temporary file (will be processed)
    └── PROJ-100-2.md        ← Temporary file (will be processed)

File Organization

Smart Folder Structure

.tasks/
├── .last-sync           ← Automatic timestamp tracking
├── others/              ← New synced tasks go here
│   ├── PROJ-123.md
│   └── PROJ-124.md
├── sprint-3/            ← Organize however you want
│   ├── backend/
│   │   └── PROJ-125.md
│   └── frontend/
│       └── PROJ-126.md
└── backlog/
    ├── high-priority/
    │   └── PROJ-127.md
    └── PROJ-128.md

How It Works

  1. Initial sync: All issues go to others/ folder
  2. Manual organization: Move files to your preferred folders
  3. Subsequent syncs: Updates issues wherever they are located
  4. New issues: Always go to others/ folder

Simple File Format

# Task Title

Task description content goes here.
All content after the title is treated as description.

## Sections
You can use any markdown formatting you want.

- Lists
- **Bold text**
- Links, etc.

Workflow Example

  1. Sync issues: sync-issues → Downloads to others/ folder
  2. Organize: Move PROJ-123.md to sprint-3/backend/
  3. Edit locally: Modify title or description
  4. Push changes: update-issue with issueKey: PROJ-123
  5. Next sync: Updates PROJ-123.md in sprint-3/backend/, new issues go to others/

Development

Scripts

  • npm run build - Build TypeScript
  • npm run dev - Watch mode for development
  • npm start - Run built server

Project Structure

src/
├── index.ts              # Entry point
├── server.ts             # MCP server and tools
├── services/
│   ├── BacklogClient.ts  # Backlog API client with pagination
│   └── TaskFileManager.ts # File management with nested search
├── types/
│   └── backlog.ts        # TypeScript types
└── utils/
    └── config.ts         # Configuration handling

Troubleshooting

Connection Issues

  • Invalid API Key: Check your API key has proper permissions
  • Wrong Base URL: Ensure URL matches your Backlog space
  • Project Access: Verify you have access to the specified project

MCP Protocol Issues

  • JSON Parse Errors: Ensure you're using the latest build
  • Tool Not Found: Check server configuration in your MCP client
  • No Response: Verify environment variables are set correctly

File Issues

  • Missing Files: Run sync-issues to download latest
  • Update Failed: Check if issue exists in Backlog
  • Organization Lost: Files stay where you put them across syncs

License

MIT

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

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

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

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

官方
精选
本地
TypeScript
VeyraX

VeyraX

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

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

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

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选