Skip to main content
Glama

ZenTao MCP-Server (API V1.0)

Ein ZenTao MCP-Dienst basierend auf TypeScript + Node.js + @modelcontextprotocol/sdk, der Folgendes unterstützt:

  • Login-Initialisierung (initZentao)

  • Produkte anzeigen (getProducts)

  • Meine Bugs anzeigen (getMyBugs)

  • Bug-Details anzeigen (getBugDetail)

  • Bug lösen (resolveBug)

  • Bug aktivieren (activateBug, erneut öffnen)

1. Umgebungsvorbereitung

npm install
cp .env.example .env

Bitte konfigurieren Sie die ZenTao-URL und die Authentifizierungsinformationen in .env (es wird empfohlen, Benutzername und Passwort zur Laufzeit über initZentao zu übergeben, anstatt sie im Klartext in Dateien zu speichern).

Related MCP server: ZenTao MCP Server

2. Ausführung über npm / npx (empfohlen für andere Maschinen)

npm-Paketname: @wudidada/zentao-mcp-server (Scoped Package; ausführbarer Befehl zentao-mcp-server).

Anforderungen: Node.js >= 20. Für Linux/macOS wird die Installation von systemweitem curl empfohlen (Standard-HTTP-Backend ist curl).

2.1 Testlauf über die Befehlszeile

npx -y @wudidada/zentao-mcp-server

Beispiel für den HTTP-Modus:

MCP_TRANSPORT=http npx -y @wudidada/zentao-mcp-server

2.2 Cursor mcp.json (stdio + Umgebungsvariablen)

Konfigurieren Sie dies in der .cursor/mcp.json im Projekt- oder Benutzerverzeichnis, zum Beispiel:

{
  "mcpServers": {
    "zentao": {
      "command": "npx",
      "args": ["-y", "@wudidada/zentao-mcp-server"],
      "env": {
        "ZENTAO_BASE_URL": "http://your-host/zentao/api.php/v1",
        "ZENTAO_ACCOUNT": "your_account",
        "ZENTAO_PASSWORD": "your_password",
        "ZENTAO_HTTP_BACKEND": "curl",
        "LOG_LEVEL": "info"
      }
    }
  }
}

Bitte starten Sie Cursor nach der Konfigurationsänderung vollständig neu. Sie können den Paketnamen in args auch auf eine feste Version ändern, z. B. @wudidada/zentao-mcp-server@1.0.1.

2.3 Betreuer: Veröffentlichung auf npm

npm run build
npm test
npm publish --access public

Vor der ersten Veröffentlichung ist npm login erforderlich. Stellen Sie sicher, dass die version in der package.json noch nicht vergeben ist.

Quellcode-Repository: https://github.com/wudidada/zentao-mcp-server

3. Startmethoden

stdio (bevorzugt für lokale IDEs)

npm run start:stdio

HTTP/SSE (Remote-Zugriff)

npm run start:http

Standard-Port 3000, Gesundheitsprüfung:

curl http://localhost:3000/healthz

4. Build und Test

npm run build
npm test

5. Erläuterung der MCP-Tool-Parameter

initZentao

  • baseUrl?: string

  • account: string

  • password?: string

  • token?: string

Wählen Sie entweder password oder token.

getMyBugs

  • status?: "active" | "resolved" | "closed" | "all" (Standard active)

  • productId?: number

getBugDetail

  • bugId: number

activateBug

  • bugId: number

  • assignedTo?: string (Zugewiesen an, Benutzerkonto)

  • openedBuild?: string | string[] (Betroffene Versionen, laut Dokumentation ein Array; wenn nicht übergeben, wird standardmäßig ["trunk"] verwendet)

  • comment?: string

resolveBug

  • bugId: number

  • resolution.resolution: "fixed" | "notrepro" | "duplicate" | "bydesign" | "willnotfix" | "tostory" | "external"

  • resolution.resolvedBuild?: string (Wenn die Lösung fixed ist, sendet der Server fest trunk, dieses Feld wird ignoriert, um Anzeigefehler in einigen ZenTao-Weboberflächen zu vermeiden)

  • resolution.duplicateBug?: number (Erforderlich, wenn resolution=duplicate)

  • resolution.comment?: string

6. Sicherheits- und Betriebsgrundlagen

  • Protokolle maskieren standardmäßig password/token/authorization.

  • Standard-Anfrage-Timeout beträgt 10s.

  • Abfrage-Schnittstellen (GET) unterstützen Wiederholungsversuche mit exponentiellem Backoff.

  • Der HTTP-Modus bietet eine /healthz-Gesundheitsprüfung.

  • Wenn ZENTAO_BASE_URL + ZENTAO_ACCOUNT + (ZENTAO_PASSWORD oder ZENTAO_TOKEN) konfiguriert sind, erfolgt der Login beim Prozessstart automatisch, ohne dass initZentao jedes Mal aufgerufen werden muss.

  • ZENTAO_HTTP_BACKEND: axios verwendet das integrierte Node-HTTP; curl ruft das System-curl auf. Unter Nicht-Windows-Systemen ist curl Standard, um Probleme zu vermeiden, bei denen einige ZenTao-Instanzen bei "Node-Client + Token-Header + GET" lange nicht reagieren.

6.1 Übersicht der Umgebungsvariablen

Variable

Beschreibung

ZENTAO_BASE_URL

ZenTao API V1 Basis-URL, z. B. http://host/zentao/api.php/v1

ZENTAO_ACCOUNT / ZENTAO_PASSWORD / ZENTAO_TOKEN

Für den automatischen Login (Passwort oder Token wählen)

ZENTAO_HTTP_BACKEND

axios oder curl; wenn nicht gesetzt, ist unter Linux/macOS curl Standard, unter Windows axios

7. Projektstruktur

src/
  adapters/      # 禅道 API V1.0 适配层
  schemas/       # zod 参数校验
  server/        # stdio/http 双入口
  services/      # 领域服务
  tools/         # MCP 工具实现

8. Hinweise

  • Die aktuelle Implementierung basiert auf den gängigen REST-Pfaden der ZenTao API V1.0 (/tokens, /bugs, /products).

  • Bug lösen: Die offizielle v1-Schnittstelle ist POST /bugs/{id}/resolve (nicht PUT). Bei falscher Verwendung von PUT kann es vorkommen, dass die HTTP-Anfrage erfolgreich ist, der Status in ZenTao jedoch nicht aktualisiert wird.

  • Wenn Ihre ZenTao-Instanz andere Pfade oder Authentifizierungsfelder verwendet, können Sie diese in src/adapters/zentaoApiV1.ts anpassen.

Available Tools

7 tools
activateBugB

激活(重新打开)Bug,对应禅道 API v1:POST /bugs/{id}/active。适用于已解决/已关闭后重新激活。

Inputs: bugId (required), assignedTo, openedBuild, comment.

getBugDetailB
Read-only

查看单个 bug 详情。

Inputs: bugId (required).

getMyBugsB
Read-only

按状态与产品筛选我的 bug 列表。

Inputs: status, productId.

getProductsB
Read-only

获取禅道产品列表。

Inputs: no named parameters.

healthCheckB
Read-only

检查当前会话与服务可用性。

Inputs: no named parameters.

initZentaoC

初始化禅道连接并登录(支持 password 或 token)。

Inputs: baseUrl, account, password, token.

resolveBugC

提交 Bug 解决动作(fixed/notrepro/duplicate/...)。

Inputs: bugId (required), resolution (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity. activateBug, resolveBug, getBugDetail, and getMyBugs handle different bug lifecycle stages and views, while getProducts, healthCheck, and initZentao cover separate administrative and setup functions. The descriptions make it easy to distinguish between tools like activateBug (reopen) and resolveBug (close with resolution).

    Naming Consistency4/5

    The naming follows a mostly consistent verb_noun pattern with minor deviations. Tools like activateBug, getBugDetail, getMyBugs, getProducts, and resolveBug use clear action-object naming. However, healthCheck and initZentao deviate slightly by using compound nouns without verbs, though they remain readable and intuitive.

    Tool Count5/5

    With 7 tools, this server is well-scoped for bug tracking and system management in ZenTao. Each tool earns its place by covering essential operations: bug lifecycle (activate, resolve, view), product listing, and system setup/health. The count is neither too sparse nor bloated, fitting the domain appropriately.

    Completeness4/5

    The tool set provides strong coverage for bug management with create, read, update (activate/resolve), and delete implied through resolution. Minor gaps exist, such as no explicit tool for creating bugs or managing other entities like tasks or users, but agents can work around this with the available tools for core workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      Not graded
      maintenance
      Enables direct integration with Zentao bug tracking systems through Cursor. Supports authentication, bug retrieval, searching, and listing operations for comprehensive bug management through natural language.
      5
      7 npm
      -
    • 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