loading…
Search for a command to run...
loading…
MCP server for TestRail that enables AI assistants to interact with TestRail's test management platform. It can query and manage projects, test cases, runs, res
MCP server for TestRail that enables AI assistants to interact with TestRail's test management platform. It can query and manage projects, test cases, runs, results, plans, milestones, and more.
A Model Context Protocol (MCP) server for TestRail that enables AI assistants (GitHub Copilot, Claude, etc.) to interact with TestRail's test management platform directly from the IDE.
Install VS Code extension TestRail MCP Server VS Code extension that one by fazorboy .
| Setting (VS Code) | Env Var | Required | Default | Description |
|---|---|---|---|---|
testrailMcp.apiKey |
TESTRAIL_API_KEY |
Yes | — | TestRail API key (generate at My Settings > API Keys) |
testrailMcp.baseUrl |
TESTRAIL_BASE_URL |
Yes | — | TestRail instance URL (e.g., https://company.testrail.io) |
testrailMcp.username |
TESTRAIL_USERNAME |
Yes | — | TestRail username (email address) |
testrailMcp.projectId |
TESTRAIL_PROJECT_ID |
Yes | — | Default project ID (used when not specified in tool params) |
testrailMcp.timeout |
TESTRAIL_TIMEOUT_MS |
No | 30000 |
HTTP request timeout in milliseconds |
testrailMcp.maxResults |
TESTRAIL_MAX_RESULTS |
No | 250 |
Default page size for list queries (max 250) |
testrailMcp.cacheEnabled |
TESTRAIL_CACHE_ENABLED |
No | true |
Enable disk caching for semi-static TestRail data |
testrailMcp.cacheTtlHours |
TESTRAIL_CACHE_TTL_HOURS |
No | 168 (7 days) |
Cache time-to-live in hours |
testrailMcp.cacheDir |
TESTRAIL_CACHE_DIR |
No | ~/.testrail-mcp-cache |
Directory for disk cache files |
# Install
npm install -g @fazorboy/testrail-mcp-server
# Configure
export TESTRAIL_BASE_URL="https://your-instance.testrail.io"
export TESTRAIL_USERNAME="[email protected]"
export TESTRAIL_API_KEY="your-api-key"
export TESTRAIL_PROJECT_ID="1"
# Run
testrail-mcp-server
Add to your MCP client config:
{
"mcpServers": {
"testrail": {
"command": "npx",
"args": ["testrail-mcp-server"],
"env": {
"TESTRAIL_BASE_URL": "https://your-instance.testrail.io",
"TESTRAIL_USERNAME": "[email protected]",
"TESTRAIL_API_KEY": "your-api-key",
"TESTRAIL_PROJECT_ID": "1"
}
}
}
}
| Variable | Required | Default | Description |
|---|---|---|---|
TESTRAIL_BASE_URL |
Yes | — | TestRail instance URL |
TESTRAIL_USERNAME |
Yes | — | TestRail username (email) |
TESTRAIL_API_KEY |
Yes | — | TestRail API key |
TESTRAIL_PROJECT_ID |
Yes | — | Default project ID (tools auto-use this when project_id is omitted) |
TESTRAIL_TIMEOUT_MS |
No | 30000 |
HTTP request timeout |
TESTRAIL_MAX_RESULTS |
No | 250 |
Default page size (max 250) |
| Tool | Description |
|---|---|
get_projects |
List all projects |
get_project |
Get project details |
get_cases |
List test cases (filterable by suite, section, priority, type) |
get_case |
Get case details with steps |
find_cases_by_path |
Find test cases by suite name + section path (resolves IDs automatically) |
get_runs |
List test runs |
get_run |
Get run details with status counts |
get_results_for_run |
Get results for a run |
get_results_for_case |
Get result history for a case in a run |
get_tests |
List tests in a run |
get_plans |
List test plans |
get_plan |
Get plan details with entries |
get_milestones |
List milestones |
get_statuses |
Get available statuses |
get_priorities |
Get priorities |
get_case_types |
Get case types |
get_case_fields |
Get case custom fields |
get_result_fields |
Get result custom fields |
get_templates |
Get case templates |
get_users |
List users |
get_suites |
List test suites |
get_sections |
List sections (folder tree) |
| Tool | Description |
|---|---|
add_result_for_case |
Submit a test result |
add_results_for_cases |
Bulk submit results |
add_run |
Create a test run |
close_run |
Close/archive a run |
add_case |
Create a test case |
update_case |
Update a test case |
| URI | Description |
|---|---|
testrail://health |
Server health check |
testrail://project/{id}/summary |
Project dashboard |
The server includes built-in prompts that guide the AI through multi-step workflows:
| Prompt | Description |
|---|---|
find_test_cases |
Navigate TestRail hierarchy (Project > Suite > Section) to find cases |
test_run_summary |
Get comprehensive run summary with failure analysis |
project_overview |
Full project dashboard with suites, runs, milestones |
submit_test_results |
Submit results for multiple cases in a run |
Here are example natural-language prompts you can use with any MCP-compatible AI assistant:
Show me all active test runs in my project
List all test suites and their sections
Get all test cases in the "Smoke Tests" section
What milestones are coming up?
Show me the section tree for suite "Regression"
Find test cases in suite "xyz", section "AbC > subsection DEF"
List cases in suite "Regression" section "Smoke Tests > Login"
The AI will call find_cases_by_path which resolves the entire path in one step:
You can also be explicit about the project:
Find test cases in project 18, suite "xyz", section "ABC > subsection DEF > subsection PQR"
Summarize test run 1234 — what's passing and failing?
Show me all failed tests in run 1234 with their error messages
Get the result history for case C5678 in run 1234
Compare pass rates across all active runs
Mark cases C101, C102, C103 as passed in run 1234
Create a new test run called "Sprint 15 Smoke" with cases C101-C110
Submit results: C101=passed, C102=failed (login timeout), C103=blocked
Give me an overview of project 1 — suites, active runs, milestones
What test plans are currently active?
List all users who can be assigned tests
What custom case fields and statuses are available?
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"testrail-mcp-server": {
"command": "npx",
"args": []
}
}
}