Skip to main content
Glama
@dannyvan/zentao-mcp

@dannyvan/zentao-mcp

by dannyvan

@dannyvan/zentao-mcp

禅道(ZenTao)MCP + CLI,直连 REST API(api.php/v1)。只做 Bug:读详情 / 列表 / 搜索,写评论与状态流转。写操作默认 dry-run。

不必 clone。MCP 启动时会带上用法(instructions)。

安装

MCP:

npx -y @dannyvan/zentao-mcp

把 skill 装到本机 agent(识别已安装的工具,并询问装哪几家,与得到大脑 npx skills add iswalle/getnote-cli 相同):

npx -y @dannyvan/zentao-mcp install-skill
# 等同于:npx skills add dannyvan/zentao-mcp -g

发布到 npm 之前,可在本仓 npm install && npm run build 后用 node dist/index.js。

Related MCP server: ZenTao MCP Server

认证

变量

说明

ZENTAO_URL

必填,禅道地址(不含 /api.php/v1)

ZENTAO_ACCOUNT + ZENTAO_PASSWORD

推荐:自动换取并刷新 token

ZENTAO_TOKEN

或直接给现成 token(会过期)

MCP

{
  "mcpServers": {
    "zentao": {
      "command": "npx",
      "args": ["-y", "@dannyvan/zentao-mcp"],
      "env": {
        "ZENTAO_URL": "https://<禅道域名>/zentao",
        "ZENTAO_ACCOUNT": "<账号>",
        "ZENTAO_PASSWORD": "<密码>"
      }
    }
  }
}

Tools

  • 读:zentao_get_bug / zentao_list_bugs / zentao_search_bugs

  • 写:zentao_comment_bug(v1 不支持,会报错)/ resolve close activate confirm assign(默认 dry-run,带 confirm=true 才提交)

zentao_list_bugs 的 total 禅道可能不准,以翻页实际列出为准。

CLI

npx -y @dannyvan/zentao-mcp skill
npx -y @dannyvan/zentao-mcp help
npx -y @dannyvan/zentao-mcp get-bug 123
npx -y @dannyvan/zentao-mcp list-bugs --product 1 --limit 50
npx -y @dannyvan/zentao-mcp assign-bug 123 --assigned-to someone
npx -y @dannyvan/zentao-mcp assign-bug 123 --assigned-to someone --confirm

无参数或 serve 时走 MCP stdio。输出 JSON;出错写 stderr,退出码非 0。

安全

  • 写操作默认 dry-run(MCP:confirm=true;CLI:--confirm)

  • 批量改状态请串行逐条,不要并行

  • 写操作在禅道可见

Available Tools

9 tools
zentao_activate_bug激活 Bug(状态流转)A
Destructive

重新激活一个已解决/关闭的 Bug。高风险:默认预览,confirm=true 才执行。 Args: id, assignedTo?(重新指派给谁), comment?, confirm(默认 false)

Inputs: id (required), comment, confirm, assignedTo.

zentao_assign_bug指派 Bug(状态流转)A
Destructive

把 Bug 指派给某人(走 PUT /bugs/{id} editBug)。高风险:默认预览,confirm=true 才执行。 ⚠️ 禅道 v1 REST 无独立指派端点,comment 无法经此记录(会被丢弃),仅指派本身生效。 Args: id, assignedTo(account), comment?(不生效), confirm(默认 false)

Inputs: id (required), assignedTo (required), comment, confirm.

zentao_close_bug关闭 Bug(状态流转)A
Destructive

关闭一个已解决的 Bug。高风险:默认预览,confirm=true 才执行。 Args: id, comment?, confirm(默认 false)

Inputs: id (required), comment, confirm.

zentao_comment_bug给 Bug 加备注(禅道 v1 REST 不支持,会报错)A

⚠️ 禅道 v1 REST API 不支持为 Bug 添加独立备注(实测:editBug 的 comment 字段被静默丢弃, 且无 /comment 动作端点)。调用本工具会直接返回错误,不会假装成功。 如需加备注:请在禅道 Web UI 手工操作,或改用旧版 session API(?m=action&f=comment)。 Args: id (number), comment (string)

Inputs: id (required), comment (required).

zentao_confirm_bug确认 Bug(状态流转)A
Destructive

确认一个 Bug(is_confirmed=1)。高风险:默认预览,confirm=true 才执行。 Args: id, assignedTo?, confirm(默认 false)

Inputs: id (required), confirm, assignedTo.

zentao_get_bug获取禅道 Bug 详情A
Read-onlyIdempotent

按 ID 获取单条禅道 Bug 的完整信息,含重现步骤(steps)。

Args:

  • id (number): Bug 的数字 ID

  • include_steps (boolean): 是否包含 steps 纯文本,默认 true

Returns: { id, title, status, severity, pri, product, assignedTo, openedBy, openedDate, resolution, steps? }

只读,不修改任何数据。

Inputs: id (required), include_steps.

zentao_list_bugs列出产品下的 BugA
Read-onlyIdempotent

列出某产品下的 Bug,服务端分页。可选按状态/指派人过滤。

Args:

  • product (number): 产品 ID

  • limit (number): 每页条数 1-200,默认 50

  • page (number): 页码,从 1 开始,默认 1

  • status ('active'|'resolved'|'closed'): 可选

  • assigned_to (string): 可选,按指派人 account 过滤当前页

Returns: { product, page, limit, total, count, bugs: [...], has_more }

只读。禅道返回的 total 可能不准(随 limit 变),以翻页实际列出为准。

Inputs: product (required), page, limit, status, +1 more.

zentao_resolve_bug解决 Bug(状态流转)A
Destructive

把 Bug 标记为已解决。高风险:默认只预览,带 confirm=true 才真正提交。 Args: id, resolution(bydesign/duplicate/external/fixed/notrepro/postponed/willnotfix/tostory), resolvedBuild?(默认 trunk), comment?, confirm(默认 false)

Inputs: id (required), resolution (required), comment, confirm, +1 more.

zentao_search_bugs搜索产品下的 BugA
Read-onlyIdempotent

在某产品下按关键词搜索 Bug(匹配标题与 steps)。底层拉取分页列表后客户端过滤。

Args:

  • product (number): 产品 ID

  • keyword (string): 关键词

  • scan_limit (number): 最多扫描多少条(分页累加),默认 200,上限 1000

Returns: { product, keyword, scanned, matched, bugs: [...] }

只读。命中范围受 scan_limit 限制,必要时调大。

Inputs: keyword (required), product (required), scan_limit.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct action on the Bug resource: read, search, lifecycle transitions, confirmation, and assignment. The lifecycle verbs (resolve, close, activate, confirm, assign) are clearly separate state changes, and the descriptions clarify any subtle overlap.

    Naming Consistency5/5

    All tools follow a consistent zentao_<verb>_bug pattern, with plural bug only where list/search return collections. The naming is predictable and makes the action for each tool immediately obvious.

    Tool Count5/5

    Nine tools is a well-scoped size for a bug-management server. Each tool covers a meaningful operation, and the count is neither bloated nor too thin.

    Completeness2/5

    The toolset covers querying and state transitions well, but there is no create_bug tool and no generic update tool for fields like title, severity, or priority. The comment_bug tool is also explicitly non-functional, so agents cannot fully manage bugs through this server alone.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    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
      26 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.
      11 npm
      12
      MIT