Skip to main content
Glama

testlink-mcp

一个对 AI 友好、安全至上的 Model Context Protocol 服务器,适用于 TestLink 1.9.20。它通过 stdio 提供规范化的发现与分析工具、有界游标分页、结构化输出以及先预览后应用的写入操作。

本仓库是基于 TestLink 的公共 XML-RPC 接口和公共 MCP SDK 的干净实现。它不依赖任何私有 TestLink 包或私有源代码树。

亮点

  • 无需凭据即可启动,因此 MCP 客户端可以发现所有工具、资源和提示词。

  • 提供明确的确定性演示模式,用于评估和上手。

  • structuredContentoutputSchema、工具注解、游标分页和稳定的错误码。

  • 仅提供附件元数据;附件内容和 base64 载荷已被移除。

  • 默认禁用写入。没有删除工具。

  • 每次应用都需要 confirm: true、未过期的 10 分钟预览以及未更改的服务器快照。

  • 副作用调用永远不会自动重试;应用尝试会写入经过脱敏的操作账本。

  • 运行时防护会阻止不受支持/已停止维护的奇数 Node 版本以及低于声明最低安全补丁级别的版本。

Related MCP server: TestRail MCP Server

要求

  • Node.js ^22.23.2 || ^24.18.1 || ^26.5.1

  • TestLink 1.9.20,并启用其 XML-RPC API

开发和容器基线为 Node 24.19.0 LTS。CI 还运行 Node 22.23.2 和 26.7.0。

快速开始

nvm use
npm ci
npm run build
TESTLINK_DEMO_MODE=true node dist/cli.js

发布后的未来 npm 调用:

npx -y testlink-mcp@1.0.0

MCP 客户端配置:

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

不要将真实凭据放入受跟踪的文件中。将 .env.example 复制到被忽略的 .env,或从你的 MCP 客户端/密钥管理器中注入环境变量。

工具

工作流

工具

用途

开始

testlink_get_server_capabilities

检查配置、兼容性、演示模式和写入策略

探索

testlink_list_projects

列出项目

探索

testlink_list_test_plans

列出项目中的测试计划

探索

testlink_list_builds

列出计划中的构建

探索

testlink_list_test_suites

遍历一个套件层级

分析

testlink_search_test_cases

在受限的项目/套件范围内搜索用例

分析

testlink_get_test_case

检索一个规范化用例

分析

testlink_list_test_case_attachments

检索安全的附件元数据

分析

testlink_get_traceability

检查需求和计划覆盖率

分析

testlink_get_execution_history

检查最近的执行证据

验证

testlink_validate_test_case

查找不完整或含糊的用例内容

预览

testlink_preview_test_case_sync

预览创建/更新和计划成员关系

应用

testlink_apply_test_case_sync

应用未更改且已确认的同步预览

预览

testlink_preview_execution_result

预览通过/失败/阻塞的报告

应用

testlink_apply_execution_result

应用未更改且已确认的结果预览

所有工具均返回:

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

失败时使用 ok: false 并附带 { code, message, retryable, details? }。使用者应依据 error.code 进行分支判断,而不是消息文本。

安全写入工作流

  1. 搜索现有用例并检索其当前版本。

  2. 验证所需的测试用例。

  3. 调用相关的预览工具。

  4. 向用户展示 proposedChanges 并获得明确确认。

  5. 在 10 分钟内使用预览 ID 和 confirm: true 调用 apply。

  6. 如果 apply 返回 CONFLICTPREVIEW_EXPIRED,请创建并审查新的预览。

仅应在应执行写入的服务器进程中启用写入:

TESTLINK_WRITE_ENABLED=true npx -y testlink-mcp@1.0.0

默认账本路径为 ~/.local/state/testlink-mcp/operations.jsonl。可使用 TESTLINK_LEDGER_PATH 覆盖。账本包含哈希和脱敏结果,不包含开发者密钥。

配置

变量

默认值

含义

TESTLINK_URL

未设置

TestLink 基础 URL 或完整的 XML-RPC 端点

TESTLINK_DEV_KEY

未设置

个人 TestLink API 密钥

TESTLINK_DEMO_MODE

false

使用确定性的本地演示数据

TESTLINK_WRITE_ENABLED

false

允许已确认的应用工具

TESTLINK_REQUEST_TIMEOUT_MS

30000

请求超时,100–300000 毫秒

TESTLINK_MAX_RESPONSE_BYTES

5242880

最大 XML 响应大小

TESTLINK_LEDGER_PATH

用户状态目录

脱敏的 JSONL 操作账本

NODE_EXTRA_CA_CERTS

未设置

可选的其他 CA 捆绑包;TLS 验证保持启用

演示模式是明确的,并且优先于远程配置:

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

开发

npm ci
npm run check
npm test
npm run eval
npm run build
npm audit --omit=dev --audit-level=high
npm pack --dry-run

离线工具选择评估会检查常见用户意图是否能够明确区分搜索、验证、预览和应用工具。它是确定性的,不会向外部模型发送数据。

Docker

该镜像以非 root 用户运行,并使用 Node 24.19.0。构建但不推送:

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

批准并发布后的未来镜像名称:ghcr.io/easonlin/testlink-mcp:1.0.0

发布策略

版本 1.0.0 已具备发布条件,但发布仍是一项明确的操作。受保护的发布工作流要求签名版本标签,重新运行完整的测试/评估/审计/SBOM/包门禁,使用来源证明发布 npm,发布带有 SBOM 和来源证明的多架构 GHCR 镜像,创建 GitHub Release,最后发布已验证的 MCP Registry 条目。

另一个受保护的实时冒烟工作流使用只读调用,针对真实的 TestLink 1.9.20 实例验证已安装的包。其 URL 和开发者密钥必须作为环境机密存储,并且绝不会写入日志。

包清单和 server.json 共享 MCP 名称 io.github.easonlin/testlink-mcp。无需发布即可运行 Registry 验证:

mcp-publisher validate server.json

公开参考

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that allows interaction with TestRail's core entities (projects, cases, runs, results, datasets) through a standardized protocol compatible with MCP clients like Claude Desktop.
    23
    20
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A security-focused Model Context Protocol server that enables controlled local tool execution through strict network firewalls, filesystem protections, and rate-limiting policies. It features a plugin-based architecture for progressive tool discovery and includes reference implementations for web searching and bug tracking.
    15
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    AI-native Model Context Protocol (MCP) server for TestRail. Lets Claude, Cursor, Windsurf, and other AI assistants browse projects, create and update test cases, kick off test runs, and record results through natural-language conversation — with strongly-typed tool schemas and per-project custom field validation that helps LLMs generate valid TestRail requests on the first try.
    26
    817
    30
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A Model Context Protocol server for Wix AI tools

  • MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Eason0in/testlink-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server