Skip to main content
Glama

ZenTao MCP Server

一个基于 MCP 的 ZenTao RESTful API v1 适配器,自动处理 token,提供通用调用工具和资源索引。

功能列表(支持的禅道能力)

  • Token 自动获取/缓存:自动登录获取 Token,支持强制刷新,所有请求自动带 Token 头。

  • 通用调用:直接调用禅道 RESTful v1 任意接口(GET/POST/PUT/DELETE/PATCH)。

  • 项目与产品:列出与当前账号相关的项目;按关键字搜索产品。

  • 缺陷处理:

    • 查询分配给我的缺陷(支持按产品、关键字、状态过滤,获取下一个待处理项)。

    • 查看缺陷详情(附带步骤中的图片链接提取)。

    • 统计缺陷数量(总数/活跃)。

    • 将缺陷标记为已解决(resolve,默认 resolution=fixed)。

  • 资源索引:zentao://endpoints(接口概览)、zentao://config(环境配置检查)、zentao://projects(我的项目)。

Related MCP server: Zentao MCP Server

安装

方式一:快速使用(npm)

# 全局安装
npm install -g @makun111/zentao-mcp-server

安装后由 MCP 客户端通过 API/stdio 调用,无需手动启动。

方式二:下载源码本地安装

git clone git@github.com:Immmmmmortal1/zantao.git
cd zantao
npm install

用于本地开发/调试。如需环境文件,可将 .env.example 复制为 .env 并填写参数。需要手动验证时可运行 npm start。

环境变量

  • ZENTAO_BASE_URL:禅道服务地址,形如 https://xxx.com

  • ZENTAO_ACCOUNT:登录账号

  • ZENTAO_PASSWORD:登录密码

  • ZENTAO_TOKEN:可选,已有 token;如果未提供会自动通过 /tokens 获取

在 zsh 中配置环境变量示例:

echo 'export ZENTAO_BASE_URL="https://example.com/zentao/"' >> ~/.zshrc
echo 'export ZENTAO_ACCOUNT="你的账号"' >> ~/.zshrc
echo 'export ZENTAO_PASSWORD="你的密码"' >> ~/.zshrc
source ~/.zshrc

MCP 客户端配置示例(OpenAI 等)

在 MCP 客户端的配置文件中添加以下片段即可通过 npx 直接运行本服务:

# Zentao MCP server (stdio, npm)
[mcp_servers.zentao_server]
type = "stdio"
command = "npx"
args = ["-y", "@makun111/zentao-mcp-server"]

提供的工具

  • get_token(forceRefresh?):调用 POST /api.php/v1/tokens 获取 token,默认缓存。

  • call(path, method?, query?, body?, forceTokenRefresh?):调用任意 RESTful 接口,自动注入 Token 头。path 可写 /projects 或 projects/1。

资源

  • zentao://endpoints:RESTful v1 主要接口概览。

  • zentao://config:当前环境变量是否已设置(不包含敏感值)。

使用示例

在任意支持 MCP 的客户端中调用对应工具:

  • 获取 token:{ "tool": "get_token" }

  • 列出部门:{ "tool": "call", "arguments": { "path": "/departments", "method": "GET" } }

  • 创建项目:{ "tool": "call", "arguments": { "path": "/projects", "method": "POST", "body": { "name": "Demo Project", "code": "DEMO" } } }

  • 查询分配给我的缺陷:{ "tool": "getMyBugs", "arguments": { "productId": 1, "status": "active" } }

Available Tools

10 tools
callA

Call any ZenTao RESTful API endpoint (api.php/v1). Automatically injects Token header. Paths accept leading slash or relative.

Inputs: path (required), method, query, body, +1 more.

getBugDetailC

Get bug detail by ID; also extracts image URLs from steps HTML into stepsImages.

Inputs: bugId (required).

getBugStatsB

Get counts of bugs assigned to me under a product (total and active).

Inputs: productId (required), activeOnly.

getMyBugB

Get the first active bug assigned to me in a product (by productName). Returns full bug detail.

Inputs: productName (required), keyword, status, allStatuses.

getMyBugsB

List bugs assigned to me under a product. Defaults to active bugs only.

Inputs: productId (required), keyword, status, allStatuses, +1 more.

getNextBugB

Get the next active bug assigned to me under a product (first match).

Inputs: productId (required), keyword, status.

get_tokenA

Fetch a token via POST /tokens using env ZENTAO_ACCOUNT/PASSWORD. Caches in-memory.

Inputs: forceRefresh.

listMyProjectsC

List projects related to the current account (PM/PO/QD/RD/assigned/team).

Inputs: keyword, limit.

markBugResolvedC

Mark a bug as resolved (resolution=fixed).

Inputs: bugId (required), comment.

searchProductsB

Search products by keyword; returns a short list of products.

Inputs: keyword, limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 10 tools

    Disambiguation3/5

    The tools have clear distinctions in most cases, but there is some overlap between getMyBug, getMyBugs, and getNextBug, which all retrieve bugs assigned to the user with slight variations in scope (single vs. list vs. next). Additionally, call is a generic tool that could potentially duplicate functionality of specific tools like getBugDetail or markBugResolved, creating ambiguity in tool selection for agents.

    Naming Consistency2/5

    Naming conventions are inconsistent: tools use a mix of camelCase (getBugDetail, getMyBug) and snake_case (get_token, markBugResolved), with no clear pattern. Verb usage varies, such as 'get' for retrieval and 'mark' for updates, but the inconsistency in casing and structure reduces predictability and readability.

    Tool Count5/5

    With 10 tools, the count is well-scoped for a ZenTao bug tracking and project management server. It covers core operations like bug retrieval, resolution, project listing, and token management, providing a balanced set without being overwhelming or too sparse for the domain.

    Completeness4/5

    The tool set covers essential workflows for bug management (e.g., get, list, resolve) and project/product access, with minor gaps such as missing tools for creating bugs or updating bug details beyond resolution. However, the generic call tool can potentially fill these gaps, making the surface reasonably complete for typical agent tasks.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      B
      maintenance
      Enables interaction with ZenTao project management system through RESTful APIs. Supports listing products, managing bugs, viewing statistics, and filtering personal bug assignments through natural language.
      4
      30 npm
      16
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage Zentao bugs, requirements, and test cases through natural language interactions. It supports querying, creating, and updating various Zentao data entities including products, projects, and executions.
      12
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Exposes Zentao REST API as MCP tools for listing/searching bugs, reading details with screenshots, and resolving bugs after explicit confirmation. Includes a setup wizard to configure Codex, Claude, Cursor and other clients.
      5
      -