testlink-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@testlink-mcp-server list test projects in TestLink"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
testlink-mcp-server
MCP (Model Context Protocol) server exposing the TestLink XML-RPC API as typed tools for LLM agents (Claude Desktop, Claude Code, etc.).
Stack
Concern | Choice |
Runtime | Node.js ≥ 18, TypeScript, ESM |
MCP transport |
|
TestLink transport |
|
Schema validation |
|
Tests |
|
Related MCP server: Testmo MCP Server
Project structure
testlink-mcp-server/
├── src/
│ ├── index.ts # MCP server entry point (registers all tool groups, stdio transport)
│ ├── client.ts # TestLinkClient: XML-RPC wrapper, retry/timeout, error normalization
│ ├── types.ts # TestLinkClientConfig, TestLinkError
│ ├── mcp-helpers.ts # toToolResult(): uniform success/error → MCP content mapping
│ ├── xmlrpc.d.ts # minimal ambient types for the untyped `xmlrpc` package
│ └── tools/
│ ├── projects.ts # list_projects, create_project
│ ├── testsuites.ts # list/create/update/delete_test_suite
│ ├── testcases.ts # read/create/update/delete_test_case, list_test_cases_in_suite
│ ├── customfields.ts # get/update_custom_field_value, list_custom_fields_for_project
│ ├── requirements.ts # list/create/get_requirement, create_requirement_specification, assign_requirements
│ ├── testplans.ts # list/create/delete_test_plan, add_test_case_to_test_plan, get_test_cases_for_test_plan
│ ├── builds.ts # create/list/close_build
│ ├── executions.ts # create/read_test_execution
│ └── diagnostics.ts # list_available_api_methods (system.listMethods introspection)
├── test/client.test.ts
├── package.json
├── tsconfig.json
├── vitest.config.ts
└── .env.exampleInstallation
npm install
npm run buildConfiguration
Copy .env.example to .env and fill in your instance's details:
cp .env.example .envVariable | Required | Description |
| yes | Full XML-RPC endpoint, e.g. |
| yes | Personal API key from TestLink → My Settings → API interface |
| no | Per-call network timeout (default |
| no | Retry attempts on transient network errors only (default |
| no | Base backoff delay, doubled per attempt (default |
TESTLINK_API_KEY is a credential — keep it out of source control (.env is already git-ignored) and out of shared MCP configs where other users could read it.
Running standalone
npm run dev # ts-node style, via tsx
# or
npm run build && npm startThe server speaks MCP over stdio — it has no meaningful output when run directly in a terminal; it's meant to be launched by an MCP host.
Claude Desktop configuration
Add a block like this to claude_desktop_config.json (Windows: %APPDATA%\Claude\claude_desktop_config.json; macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"testlink": {
"command": "node",
"args": ["C:/data/mcp-server/testlink/dist/index.js"],
"env": {
"TESTLINK_URL": "http://your-testlink-host/testlink/lib/api/xmlrpc/v1/xmlrpc.php",
"TESTLINK_API_KEY": "your-devkey-here"
}
}
}
}Restart Claude Desktop after editing the config. Run npm run build first — the config points at the compiled dist/index.js, not the TypeScript source.
Tools exposed
Tool | TestLink API method |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| best-effort probe, see caveat below ⚠️ |
|
|
|
|
|
|
|
|
| client-side filter over |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Known API limitations (⚠️ above)
TestLink's official XML-RPC surface is oriented around CI reporting (create projects/suites/cases/plans/builds, report results) and historically has no stock endpoints for update/delete on test suites, test cases, or test plans, nor for closing a build or listing custom field definitions. This server implements those tools anyway, calling the conventionally-named method (tl.updateTestSuite, tl.deleteTestSuite, tl.deleteTestCase, tl.deleteTestPlan, tl.closeBuild), because some installations add them via patches or newer releases.
Before relying on any ⚠️-marked tool, call list_available_api_methods (wraps the standard XML-RPC system.listMethods introspection call) to confirm your TestLink server actually exposes it. If it doesn't, the call fails as a clear XML-RPC "unknown method" fault surfaced through this server's normal error path — not a silent no-op.
get_requirement: TestLink has no single-requirement lookup; this fetches the full project requirement list viatl.getRequirementsand filters client-side by requirement id or doc id. Fine for small/medium requirement sets; not paginated.list_custom_fields_for_project: TestLink's API can only read a named custom field's value on a specific test case — it cannot enumerate a project's custom field definitions. This tool takes a representative test case plus a list of candidate field names (visible in TestLink Admin → Custom Fields) and probes each one, returning only the fields that resolved to a non-empty value. It cannot discover field names you don't already supply.
Error handling
TestLink signals failures two ways, both normalized into a single TestLinkError:
XML-RPC faults — transport-level errors (bad method, malformed params).
In-band error payloads — TestLink often returns HTTP 200 with a body like
[{code: 200, message: "..."}], or{status: false, message: "..."}for write operations.TestLinkClientinspects every response and throwsTestLinkErrorfor both cases, so callers never have to special-case a "successful" HTTP response that's actually a failure.
Every tool handler wraps its call in toToolResult(), so failures come back as an MCP tool result with isError: true and a JSON body {error: true, method, code, message} — never an uncaught exception that kills the server process.
Network-level errors (ECONNRESET, ETIMEDOUT, ECONNREFUSED, ENOTFOUND, EAI_AGAIN, EPIPE) are retried with exponential backoff up to TESTLINK_RETRIES times; logical TestLink API errors are never retried, since retrying a duplicate-name or bad-devKey error just repeats the same failure.
Tests
npm testtest/client.test.ts mocks the xmlrpc module entirely and covers: devKey injection, both TestLink in-band error shapes, the retry path on transient network errors, no-retry on logical errors, system.* calls skipping devKey, and the client-side requirement lookup's not-found path.
Security notes
TESTLINK_API_KEYgrants full API access under whichever TestLink user issued it — treat it like any other credential.If
TESTLINK_URLishttps://, the client usesxmlrpc.createSecureClient; prefer HTTPS whenever your TestLink instance supports it, since the XML-RPC API otherwise sends the devKey in plaintext.All tool inputs are validated against explicit
zodschemas before reaching the TestLink client — malformed input is rejected by the MCP layer rather than forwarded to the XML-RPC endpoint.
Available Tools
30 toolsadd_test_case_to_test_planB
Add a specific test case version to a test plan, optionally for a platform (tl.addTestCaseToTestPlan).
Inputs: version (required), testPlanId (required), testProjectId (required), testCaseExternalId (required), +3 more.
assign_requirementsB
Link one or more requirements to a test case (tl.assignRequirements).
Inputs: assignments (required), testProjectId (required), testCaseExternalId (required).
close_buildA
Mark a build as closed/inactive. CAVEAT: TestLink's public API has no dedicated close-build endpoint on most installations — run the list_available_api_methods tool first to confirm your server exposes tl.closeBuild.
Inputs: buildId (required), testPlanId (required).
create_buildC
Create a new build under a test plan (tl.createBuild).
Inputs: buildName (required), testPlanId (required), buildNotes.
create_projectA
Create a new TestLink test project (tl.createTestProject).
Inputs: testcaseprefix (required), testprojectname (required), notes, active, +5 more.
create_requirementC
Create a requirement inside a requirement specification (tl.createRequirement).
Inputs: docId (required), title (required), userId (required), reqSpecId (required), +4 more.
create_requirement_specificationB
Create a requirement specification container, the parent grouping for requirements (tl.createRequirementSpecification).
Inputs: docId (required), title (required), userId (required), testProjectId (required), +3 more.
create_test_caseB
Create a new test case inside a test suite (tl.createTestCase).
Inputs: summary (required), authorLogin (required), testSuiteId (required), testCaseName (required), +8 more.
create_test_executionC
Report a test case execution result against a build within a test plan (tl.reportTCResult).
Inputs: status (required), testPlanId (required), bugId, guess, +9 more.
create_test_planB
Create a new test plan inside a project (tl.createTestPlan).
Inputs: testPlanName (required), testProjectName (required), notes, active, +1 more.
create_test_suiteB
Create a test suite inside a project, optionally nested under a parent suite (tl.createTestSuite).
Inputs: testProjectId (required), testSuiteName (required), order, details, +3 more.
delete_test_caseA
Delete a test case by internal id. CAVEAT: tl.deleteTestCase is not part of TestLink's stock public API on most installations — run the list_available_api_methods tool first to confirm your server exposes it.
Inputs: testCaseId (required).
delete_test_planA
Delete a test plan. CAVEAT: tl.deleteTestPlan is not part of TestLink's stock public API on most installations — run the list_available_api_methods tool first to confirm your server exposes it.
Inputs: testPlanId (required).
delete_test_suiteB
Delete a test suite. CAVEAT: tl.deleteTestSuite is not part of TestLink's stock public API on most installations — run the list_available_api_methods tool first to confirm your server exposes it.
Inputs: testSuiteId (required).
get_custom_field_valueA
Read a custom field's value for a specific test case version (tl.getTestCaseCustomFieldDesignValue).
Inputs: version (required), testProjectId (required), customFieldName (required), testCaseExternalId (required).
get_requirementA
Fetch a single requirement by requirement id or doc id. TestLink's API has no direct single-requirement lookup — this calls tl.getRequirements for the project and filters client-side.
Inputs: testProjectId (required), docId, requirementId.
get_test_cases_for_test_planB
List the test cases (with execution status) attached to a test plan (tl.getTestCasesForTestPlan).
Inputs: testPlanId (required), buildId, executed, keywordId, +4 more.
list_available_api_methodsA
List every XML-RPC method the connected TestLink server actually exposes (standard system.listMethods introspection). Use this to check whether non-standard methods relied on by update_test_suite, delete_test_suite, delete_test_case, delete_test_plan, and close_build are available before calling them — those are not part of every stock TestLink installation.
Inputs: no named parameters.
list_buildsA
List every build defined for a test plan (tl.getBuildsForTestPlan).
Inputs: testPlanId (required).
list_custom_fields_for_projectA
Best-effort custom field discovery. TestLink's XML-RPC API has NO endpoint to enumerate custom field definitions for a project — only to read a named field's value on a specific test case. Supply a representative test case plus a list of candidate field names (visible in TestLink Admin > Custom Fields) and this probes each one, returning only the fields that resolved to a non-empty value for that test case.
Inputs: version (required), testProjectId (required), testCaseExternalId (required), candidateFieldNames (required).
list_projectsA
List every TestLink test project visible to the authenticated API key (tl.getProjects).
Inputs: no named parameters.
list_requirementsA
List requirements for a project, optionally scoped to a test plan/platform/requirement specification (tl.getRequirements).
Inputs: testProjectId (required), reqSpecId, platformId, testPlanId.
list_test_cases_in_suiteB
List the test cases contained in a test suite (tl.getTestCasesForTestSuite).
Inputs: testSuiteId (required), deep, details.
list_test_plansB
List all test plans for a project (tl.getProjectTestPlans).
Inputs: testProjectId (required).
list_test_suitesA
List test suites: top-level suites for a project (tl.getFirstLevelTestSuitesForTestProject), or child suites of a given suite (tl.getTestSuitesForTestSuite) when parentSuiteId is supplied.
Inputs: testProjectId (required), parentSuiteId.
read_test_caseA
Fetch a test case by internal id, or by external id (+ optional version) (tl.getTestCase).
Inputs: version, testCaseId, testCaseExternalId.
read_test_executionB
Fetch the last execution result for a test case within a test plan/build/platform (tl.getLastExecutionResult).
Inputs: testPlanId (required), buildId, getBugs, buildName, +4 more.
update_custom_field_valueA
Write one or more custom field values on a test case (tl.updateTestCaseCustomFieldDesignValue). Requires the exact version and project id the field values belong to — TestLink stores custom field values per test case version, not just per external id.
Inputs: version (required), customFields (required), testProjectId (required), testCaseExternalId (required).
update_test_caseA
Update fields on an existing test case, identified by external id (tl.updateTestCase). To write custom field values, use update_custom_field_value instead — tl.updateTestCase has no custom field parameter of its own.
Inputs: testCaseExternalId (required), steps, summary, version, +4 more.
update_test_suiteA
Update an existing test suite's name, details, parent, or order. CAVEAT: tl.updateTestSuite is not part of TestLink's stock public API on most installations — run the list_available_api_methods tool first to confirm your server exposes it.
Inputs: testSuiteId (required), order, details, parentId, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 30 tools
Each tool targets a distinct resource and action, such as list_projects vs create_project, read_test_case vs get_custom_field_value. Even similar tools like list_test_cases_in_suite and get_test_cases_for_test_plan are clearly differentiated by context (suite vs plan) and description.
The naming pattern is predominantly verb_noun (list_, create_, update_, delete_, read_, get_). Minor inconsistency between read_ and get_ (e.g., read_test_case vs get_requirement) but the pattern is otherwise predictable and readable.
With 30 tools, the server is on the heavier side, but the count is justified by the breadth of the TestLink domain (projects, suites, cases, requirements, plans, builds, executions). Still, it feels slightly over-scoped, especially with several caveat-ridden delete methods.
The tool set covers the main lifecycle for projects, test suites, test cases, test plans, builds, and executions. Minor gaps exist (e.g., no update_test_plan, no update_requirement, no delete_requirement), but they can be worked around and do not critically hinder core workflows.
Maintenance
Related MCP Connectors
Test management for AI agents: cases, runs, results, cycles and traceability.
Create and manage test cases, test runs and results in Testiny from your AI assistant.
Manage Loom projects, tasks, bugs, defects, clients and phases from AI assistants
ComplexQA projects, cases, bugs, and autotest runs for an external agent.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with TestRail test management systems through comprehensive API integration. Supports retrieving and updating test cases, projects, suites, runs, and results, plus adding attachments and managing test data through natural language commands.1831 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Testmo test management platform for creating, reading, updating, and deleting test cases, managing folders, and organizing test runs through natural language.4MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact directly with TestRail instances for managing test projects, suites, cases, runs, results, plans, milestones, and attachments through the TestRail API with secure authentication.7755 npm1MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with TestRail test management system, supporting full CRUD operations on projects, suites, sections, test cases, runs, results, plans, and milestones.35327 npm1MIT