Testlink Mcp

io.github.Eason0in由 GitHub 帳號 Eason0in 發布v1.0.8更新於 Oct 24, 2026

AI-friendly, safety-first TestLink MCP server

已驗證STDIO僅桌面效率與工作流開發者工具

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理瀏覽、分析並安全更新 TestLink 1.9.20 的測試專案、案例、計畫與執行結果。

可以做什麼
檢查伺服器能力、相容性、示範模式與寫入策略,並依層級分頁列出專案、測試計畫、建置與測試套件。搜尋並讀取測試案例,取得安全的附件中繼資料,檢視需求追溯關係與近期執行紀錄。驗證測試案例內容是否不完整或含糊。預覽案例建立與更新、計畫歸屬和執行結果,再憑明確確認套用未變更的預覽。寫入預設關閉,且沒有刪除工具。
適用情境
適合助理需要操作既有 TestLink 1.9.20 執行個體的情境:尋找與審閱測試案例、核對追溯關係與執行證據,或準備並確認案例與結果變更。示範模式可在沒有真實伺服器時用於評估。
執行需求
以 npm 套件形式透過 stdio 在本機執行,需要 Node.js(README 載明 ^22.23.2、^24.18.1 或 ^26.5.1)。需要可連線且已啟用 XML-RPC API 的 TestLink 1.9.20 執行個體,以及 TESTLINK_URL 和 TESTLINK_DEV_KEY API 金鑰。TESTLINK_DEMO_MODE 使用本機合成資料;須設定 TESTLINK_WRITE_ENABLED 才能啟用套用類工具。
安裝前請注意
TESTLINK_DEV_KEY 是個人 API 金鑰,不要寫入受版本控制的檔案,應由用戶端或密鑰管理器注入。套用類工具會修改遠端 TestLink 資料,只應在需要的地方開啟寫入;每次套用都需要 confirm: true 和未過期的單次預覽。若套用回傳 OUTCOME_UNKNOWN,不要重試,因為遠端寫入可能已成功。套用嘗試會記錄到去識別化的本機操作日誌。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Testlink Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

testlink-mcp

[M8ven Score]

An AI-friendly, safety-first Model Context Protocol server for TestLink 1.9.20. It exposes normalized discovery and analysis tools, bounded cursor pagination, structured output, and preview-before-apply writes over stdio.

This repository is a clean implementation based on TestLink's public XML-RPC interface and the public MCP SDK. It has no dependency on a private TestLink package or private source tree.

Highlights

  • Starts without credentials so MCP clients can discover all tools, resources, and prompts.
  • Explicit deterministic demo mode for evaluation and onboarding.
  • structuredContent, outputSchema, tool annotations, cursor pagination, and stable error codes.
  • Attachment metadata only; attachment content and base64 payloads are removed.
  • Writes disabled by default. There is no delete tool.
  • Every apply requires confirm: true, an unexpired single-use 10-minute preview, and an unchanged server snapshot.
  • Side-effect calls are never automatically retried; apply attempts are written to a redacted operation ledger.
  • Runtime guard blocks unsupported/EOL odd Node releases and security patch levels below the declared floor.

Safe write demo

[TestLink MCP safe write flow: preview, inspect a diff, then explicitly confirm the apply]

The demo uses synthetic data only. It shows the required safety boundary: Preview a proposed change, inspect the bounded diff, then call apply with the exact preview ID and confirm: true. No write happens during preview. The editable source frames are in docs/assets/testlink-safety.

Requirements

  • Node.js ^22.23.2 || ^24.18.1 || ^26.5.1
  • TestLink 1.9.20 with its XML-RPC API enabled

The development and container baseline is Node 24.19.0 LTS. CI also runs Node 22.23.2 and 26.7.0.

Quick start

bash
nvm usenpm cinpm run buildTESTLINK_DEMO_MODE=true node dist/cli.js

Future npm invocation after publication:

MCP client configuration:

json
{  "mcpServers": {    "testlink": {      "command": "npx",      "args": ["-y", "[email protected]"],      "env": {        "TESTLINK_URL": "https://testlink.example.com/testlink",        "TESTLINK_DEV_KEY": "your-testlink-dev-key"      }    }  }}

Do not put real credentials in tracked files. Copy .env.example to an ignored .env, or inject environment variables from your MCP client/secret manager.

Tools

WorkflowToolPurpose
Starttestlink_get_server_capabilitiesCheck configuration, compatibility, demo mode, and write policy
Exploretestlink_list_projectsList projects
Exploretestlink_list_test_plansList plans in a project
Exploretestlink_list_buildsList builds in a plan
Exploretestlink_list_test_suitesWalk one suite level
Analyzetestlink_search_test_casesSearch cases in a bounded project/suite scope
Analyzetestlink_get_test_caseRetrieve one normalized case
Analyzetestlink_list_test_case_attachmentsRetrieve safe attachment metadata
Analyzetestlink_get_traceabilityInspect requirement links and membership in one required test plan
Analyzetestlink_get_execution_historyInspect recent execution evidence
Validatetestlink_validate_test_caseFind incomplete or ambiguous case content
Previewtestlink_preview_test_case_syncPreview create/update and plan memberships
Applytestlink_apply_test_case_syncApply an unchanged confirmed sync preview
Previewtestlink_preview_execution_resultPreview passed/failed/blocked reporting
Applytestlink_apply_execution_resultApply an unchanged confirmed result preview

All tools return:

json
{  "ok": true,  "data": {},  "meta": {    "source": "testlink",    "requestId": "..."  }}

Failures use ok: false with { code, message, retryable, details? }. Consumers should branch on error.code, not message text.

Safe write workflow

  1. Search for an existing case and retrieve its current version.
  2. Validate the desired test case.
  3. Call the relevant preview tool.
  4. For a create, provide the TestLink authorLogin; desiredCase.suiteId, summary, and steps are also required by TestLink 1.9.20.
  5. Show proposedChanges to the user and obtain explicit confirmation.
  6. Call apply with the preview ID and confirm: true within 10 minutes.
  7. A confirmed apply consumes its preview before any side effect. After any success, conflict, or failure, create and review a new preview before trying again.
  8. If apply returns OUTCOME_UNKNOWN, do not retry. The remote write may have succeeded; reconcile the TestLink case, plan membership, or execution result first.

Enable writes only in the server process that should perform them:

bash
TESTLINK_WRITE_ENABLED=true npx -y [email protected]

The default ledger path is ~/.local/state/testlink-mcp/operations.jsonl. Override it with TESTLINK_LEDGER_PATH. Before a remote write, the server persists an attempted row; it then records applied or outcome_unknown. The ledger contains hashes and redacted outcomes, not developer keys.

Configuration

VariableDefaultMeaning
TESTLINK_URLunsetTestLink base URL or complete XML-RPC endpoint
TESTLINK_DEV_KEYunsetPersonal TestLink API key
TESTLINK_DEMO_MODEfalseUse deterministic local demo data
TESTLINK_WRITE_ENABLEDfalsePermit confirmed apply tools
TESTLINK_REQUEST_TIMEOUT_MS30000Request timeout, 100–300000 ms
TESTLINK_MAX_RESPONSE_BYTES5242880Maximum XML response size
TESTLINK_LEDGER_PATHuser state directoryRedacted JSONL operation ledger
NODE_EXTRA_CA_CERTSunsetOptional additional CA bundle; TLS verification remains enabled

Demo mode is explicit and wins over remote configuration:

bash
TESTLINK_DEMO_MODE=true TESTLINK_WRITE_ENABLED=true node dist/cli.js

Development

bash
npm cinpm run checknpm testnpm run evalnpm run buildnpm audit --omit=dev --audit-level=highnpm pack --dry-run

The offline tool-selection eval checks that common user intents select search, validation, preview, and apply tools distinctly. It is deterministic and does not send data to an external model.

Docker

The image runs as a non-root user and uses Node 24.19.0. Build without pushing:

bash
docker buildx build --platform linux/amd64,linux/arm64 --tag testlink-mcp:local --output type=oci,dest=testlink-mcp.oci.tar .

Future image name after approval and publication: ghcr.io/eason0in/testlink-mcp:1.0.8.

Release policy

Version 1.0.8 is release-ready but publication remains an explicit action. The protected release workflow requires a signed version tag, reruns the complete test/eval/audit/SBOM/package gates, publishes npm with provenance, publishes a multi-architecture GHCR image with SBOM and provenance, creates a GitHub Release, and finally publishes the validated MCP Registry entry.

A separate protected live-smoke workflow verifies the installed package against a real TestLink 1.9.20 instance using read-only calls. Its URL and developer key must be stored as environment secrets and are never written to logs.

The package manifest and server.json share the MCP name io.github.Eason0in/testlink-mcp. Registry validation can be run without publishing:

bash
mcp-publisher validate server.json

The account-side setup and submission data for npm, the MCP Registry, Glama, and MCP.so are tracked in Marketplace submission checklist.

Public references

License

MIT

來源:README.md,提交 1fc4997

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.8最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分