An API integration for the Zentao project management system, supporting task management and bug tracking.
禅道项目管理系统的高级API集成包,提供任务管理、Bug跟踪等功能的完整封装,专为Cursor IDE设计的MCP扩展。
npm install @bigtian/mcp-zentao -g
首次使用时,需要提供禅道的配置信息:
zentao '{"config":{"url":"https://your-zentao-url","username":"your-username","password":"your-password","apiVersion":"v1"},"name":"张三","age":25,"skills":["编程","设计"]}'
配置信息会被保存在用户目录下的 .zentao/config.json
文件中,后续使用时无需再次提供。
配置完成后,只需要提供任务相关的信息即可:
zentao '{"name":"张三","age":25,"skills":["编程","设计"]}'
如果需要更新禅道配置信息,只需要再次提供 config 参数即可:
zentao '{"config":{"url":"https://new-zentao-url","username":"new-username","password":"new-password","apiVersion":"v1"},"name":"张三","age":25,"skills":["编程","设计"]}'
配置文件保存在用户目录下的 .zentao/config.json
文件中:
C:\Users\你的用户名\.zentao\config.json
~/.zentao/config.json
MIT
不同于通用的数据库操作工具(如 mcp-mysql-server),本项目专注于提供:
git clone https://github.com/bigtian/mcp-zentao.git
cd mcp-zentao
npm install
npm test
npm run build
cp .env.example .env
# 编辑 .env 文件,填入你的禅道系统配置
docker-compose up -d
docker-compose logs -f
docker build -t mcp-zentao .
docker run -d \
--name mcp-zentao \
-p 3000:3000 \
-e ZENTAO_URL=your-zentao-url \
-e ZENTAO_USERNAME=your-username \
-e ZENTAO_PASSWORD=your-password \
-e ZENTAO_API_VERSION=v1 \
-v $(pwd)/logs:/app/logs \
mcp-zentao
在 Cursor IDE 的配置文件中添加以下配置:
{
"mcpServers": {
"zentao": {
"url": "http://localhost:3000"
}
}
}
import { ZentaoAPI } from '@bigtian/mcp-zentao';
// 创建API实例
const api = new ZentaoAPI({
url: 'https://your-zentao-url', // 你的禅道系统URL
username: 'your-username', // 用户名
password: 'your-password', // 密码
apiVersion: 'v1' // API版本,默认为v1
});
// 获取我的任务列表
async function getMyTasks() {
try {
const tasks = await api.getMyTasks();
console.log('我的任务:', tasks);
} catch (error) {
console.error('获取任务失败:', error);
}
}
// 获取我的Bug列表
async function getMyBugs() {
try {
const bugs = await api.getMyBugs();
console.log('我的Bug:', bugs);
} catch (error) {
console.error('获取Bug失败:', error);
}
}
// 完成任务
async function finishTask(taskId: number) {
try {
await api.finishTask(taskId);
console.log('任务已完成');
} catch (error) {
console.error('完成任务失败:', error);
}
}
// 解决Bug
async function resolveBug(bugId: number) {
try {
await api.resolveBug(bugId, {
resolution: 'fixed',
resolvedBuild: 'trunk',
comment: '问题已修复'
});
console.log('Bug已解决');
} catch (error) {
console.error('解决Bug失败:', error);
}
}
constructor(config: {
url: string; // 禅道系统URL
username: string; // 用户名
password: string; // 密码
apiVersion?: string; // API版本,默认为v1
})
getMyTasks(): Promise<Task[]>
getMyBugs(): Promise<Bug[]>
finishTask(taskId: number): Promise<void>
resolveBug(bugId: number, resolution: BugResolution): Promise<void>
interface Task {
id: number;
name: string;
status: string;
pri: number;
// ... 其他任务属性
}
interface Bug {
id: number;
title: string;
status: string;
severity: number;
// ... 其他Bug属性
}
interface BugResolution {
resolution: string; // 解决方案类型
resolvedBuild?: string; // 解决版本
duplicateBug?: number; // 重复Bug ID
comment?: string; // 备注
}
欢迎提交Issue和Pull Request!
Provides comprehensive project management context to AI agents using the Helios-9 API.
Integrates with Wiki.js, enabling AI to read and update documentation.
Integrates with Jira's REST API to manage issues programmatically.
Connects to Anki via AnkiConnect to retrieve leech-tagged flashcards for use in Claude Desktop.
Perform advanced CSV analysis and generate insights using Google's Gemini AI. Requires Gemini and Plotly API keys.
An optimized, read-only MCP server for the Notion API with asynchronous processing.
Access and manage your Roam Research graph via its API.
Mercado Pago's official MCP server, offering tools to interact with our API, simplifying tasks and product integration.
Provides Taiwan national holidays and compensatory workday information. Data is fetched and cached automatically.
Integrates with the Scenext AI platform to generate educational videos on various topics.