This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Monorepo of MCP (Model Context Protocol) servers and CLIs for AI assistants to manage Zentao, TestLink, and Apifox platforms. Uses lerna with independent versioning.
yarn install --mode=skip-build # Install dependencies (skip build during install)
yarn build # Build all packages
yarn typecheck # Type-check all packages
yarn lint # Lint all packages
yarn test # Run tests across all packages
yarn release # Interactive publish (independent versions)Single-package commands use run -T to access root toolchain:
cd packages/zentao-api && yarn build
cd packages/zentao-mcp && yarn typecheckRun a single test file:
cd packages/zentao-api && yarn test -- --testPathPattern="test/foo.spec.ts"packages/
├── zentao-api/ # Zentao HTTP client library (axios-based, supports legacy/v1/v2 APIs)
├── zentao-mcp/ # Zentao MCP Server + CLI (depends on zentao-api via workspace:*)
├── testlink-mcp/ # TestLink MCP Server + CLI (uses testlink-xmlrpc)
└── apifox-mcp/ # Apifox MCP Server + CLI (OpenAPI cache reader)
Each MCP package produces three outputs via esbuild:
dist/index.js— ESM entry (MCP server)dist/index.cjs— CJS entry (MCP server, for npx)dist/cli.cjs— CJS CLI binary
zentao-api is a pure library (no CLI, no MCP) consumed by zentao-mcp.
All tools use a unified action pattern — one tool per resource with an action enum:
{ name: "zentao_bugs", inputSchema: { properties: { action: { enum: ["list", "view", "create", "resolve", "close"] } } } }v2— REST API, preferred for newer deploymentsv1— REST API at/api.php/v1/...legacy— Built-in API at/index.php?m=xxx&f=xxx(used for docs, requires session/cookie handling)
The zentao-api package exposes ZentaoLegacy, ZentaoV1, ZentaoV2 classes. The zentao-mcp package wraps these with MCP-compatible client adapters in src/zentao-clients/.
- Tool names:
zentao_prefix, plural resource names - TypeScript strict mode, no unused locals
- Imports: Node builtins → third-party → local
- Each package's
tsconfig.jsonextends../../tsconfig.base.json - Built-in API (legacy) uses FormData +
X-Requested-With: XMLHttpRequestheader - stdout is filtered in MCP servers to only pass protocol messages (JSON-RPC / Content-Length)
Located in skills/ and symlinked from .claude/skills/. Each skill has a SKILL.md and optional references/ directory. Available skills: zentao, zentao-cli, testlink, testlink-cli, apifox, apifox-cli.