testlink-mcp-server
v1.1.1
Published
Production-ready MCP server for TestLink XML-RPC integration.
Maintainers
Readme
TestLink MCP Server
A production-ready Model Context Protocol (MCP) server for TestLink test management. Connects AI assistants like Claude, Cursor, and VS Code Copilot to your TestLink instance via XML-RPC.
Features
- 12 MCP tools covering projects, test cases, test suites, custom fields, and test execution
- Zero-config binary — install globally and point your MCP client at it
- Layered architecture — Controller → Service → Gateway with clean separation of concerns
- Built-in caching — in-memory cache to reduce redundant API calls
- Retry logic — automatic retries with exponential backoff for XML-RPC calls
- Input validation — Zod schemas on every tool input
- Structured logging — Pino-based logging with configurable levels
Installation
npm install -g testlink-mcp-serverOr run directly with npx:
npx testlink-mcp-serverConfiguration
Create a .env file (or set environment variables) before running the server:
| Variable | Required | Default | Description |
|---|---|---|---|
| TESTLINK_API_ENDPOINT | Yes | — | TestLink XML-RPC endpoint URL |
| TESTLINK_DEV_KEY | Yes | — | TestLink API developer key |
| TESTLINK_AUTHOR_LOGIN | No | admin | Author username for creating/updating test cases |
| MCP_SERVER_NAME | No | testlink-mcp-server | Server name reported to MCP clients |
| MCP_SERVER_VERSION | No | 1.0.0 | Server version reported to MCP clients |
| LOG_LEVEL | No | info | Log level: fatal error warn info debug trace |
Getting your TestLink API key
- Log in to your TestLink instance
- Go to My Settings (top-right user icon)
- Scroll to API interface section
- Click Generate a new key if one doesn't exist
- Copy the key into
TESTLINK_DEV_KEY
Your endpoint URL typically looks like:
https://your-testlink-host/lib/api/xmlrpc/v1/xmlrpc.phpMCP Client Setup
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"testlink": {
"command": "npx",
"args": ["-y", "testlink-mcp-server"],
"env": {
"TESTLINK_API_ENDPOINT": "https://your-testlink-host/lib/api/xmlrpc/v1/xmlrpc.php",
"TESTLINK_DEV_KEY": "your-api-key"
}
}
}
}Cursor
Add to your .cursor/mcp.json:
{
"mcpServers": {
"testlink": {
"command": "npx",
"args": ["-y", "testlink-mcp-server"],
"env": {
"TESTLINK_API_ENDPOINT": "https://your-testlink-host/lib/api/xmlrpc/v1/xmlrpc.php",
"TESTLINK_DEV_KEY": "your-api-key"
}
}
}
}VS Code
Add to your .vscode/mcp.json:
{
"servers": {
"testlink": {
"command": "npx",
"args": ["-y", "testlink-mcp-server"],
"env": {
"TESTLINK_API_ENDPOINT": "https://your-testlink-host/lib/api/xmlrpc/v1/xmlrpc.php",
"TESTLINK_DEV_KEY": "your-api-key"
}
}
}
}Available Tools
| Tool | Description |
|---|---|
| get_projects | List all TestLink projects |
| get_test_cases | Fetch test cases with optional filters (suite, importance, automation status) |
| create_test_case | Create a test case in a project/suite |
| update_test_case | Update an existing test case (including custom fields) |
| create_test_suite | Create a test suite, optionally nested under a parent |
| get_test_suites | List test suites, optionally filtered by parent |
| get_custom_field | Get a custom field value on a test case |
| update_custom_field | Update custom field values on a test case |
| report_execution | Report test execution result (passed/failed/blocked) |
| get_test_plans | List all test plans for a project |
| get_builds | List all builds for a test plan |
| get_platforms | List all platforms for a test plan |
Architecture
MCP Client (Claude/Cursor/VS Code)
│
▼
┌─────────────────────────────┐
│ MCP Server (stdio transport)│
│ └─ Tool Registration │
│ └─ Controller (validate) │
│ └─ Service (logic) │
│ └─ Gateway (map) │
│ └─ XML-RPC Client│
│ └─ TestLink │
└─────────────────────────────┘Development
git clone <your-repo-url>
cd testlink-mcp-server
npm install
cp .env.example .env # fill in your values
npm run dev # start with hot-reload (tsx)
npm run build # compile TypeScript
npm start # run compiled version