TestRail MCP Server
Allows interacting with TestRail test management system, providing tools for managing projects, test suites, sections, test cases, test runs, test results, test plans, and milestones.
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., "@TestRail MCP Server List all projects in TestRail"
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.
TestRail MCP Server
A complete Model Context Protocol (MCP) server for TestRail integration with full API support. Allows AI assistants like Cursor to interact with TestRail test management system.
β¨ Features
π Projects
Get all projects or specific project details
π¦ Test Suites
Get, create, and update test suites
π Sections
Get, create, update, and delete sections
π Test Cases
Full CRUD operations (Create, Read, Update, Delete)
Get case types and custom fields
Support for all custom fields and templates
π Test Runs
Create, update, and close test runs
Get run details and lists
π§ͺ Tests
Get tests from runs
Detailed test information
β Results
Add single or bulk test results
Get results for tests, cases, and runs
Track test execution history
π Test Plans
Get test plans and plan details
π― Milestones
Get milestones for projects
Related MCP server: Testmo MCP Server
Installation
npm install -g mcp-testrailOr use directly with npx (no installation needed):
npx -y mcp-testrailQuick Setup with Cursor
Step 1: Get Your TestRail API Key
Log in to your TestRail instance
Click on your profile (top right)
Go to Settings β API Keys
Click Add Key and give it a name
Copy the generated API key
Step 2: Configure Cursor
Open Cursor Settings (Ctrl/Cmd + ,)
Search for "MCP" or go to Features β Model Context Protocol
Click Edit Config or open the config file
Add the following configuration (also available in
cursor-config.example.json):
{
"mcpServers": {
"testrail": {
"command": "npx",
"args": ["-y", "mcp-testrail"],
"env": {
"TESTRAIL_URL": "https://your-company.testrail.io",
"TESTRAIL_USERNAME": "your-email@company.com",
"TESTRAIL_API_KEY": "your-api-key-here"
}
}
}
}Replace the following values:
https://your-company.testrail.io- with your TestRail URLyour-email@company.com- with your TestRail emailyour-api-key-here- with your API key from Step 1
Save the config file
Restart Cursor
Step 3: Verify It Works
Open Cursor chat and try:
Show me all TestRail projectsIf everything is configured correctly, you'll see your TestRail projects!
Environment Variables
TESTRAIL_URL- Your TestRail instance URL (e.g.,https://yourcompany.testrail.io)TESTRAIL_USERNAME- Your TestRail email addressTESTRAIL_API_KEY- Your TestRail API key (generated in TestRail settings)
π οΈ Available Tools (40+ methods)
Projects
get_projects,get_project
Suites
get_suites,get_suite,add_suite,update_suite
Sections
get_sections,get_section,add_section,update_section,delete_section
Test Cases
get_cases,get_case,add_case,update_case,delete_caseget_case_types,get_case_fields
Test Runs
get_runs,get_run,add_run,update_run,close_run
Tests
get_tests,get_test
Results
get_results,get_results_for_case,get_results_for_runadd_result,add_result_for_case,add_results_for_cases
Plans
get_plans,get_plan
Milestones
get_milestones,get_milestone
License
MIT
Available Tools
35 toolsadd_caseC
Create a new test case
Inputs: section_id (required), title (required), template_id, type_id, +8 more.
add_resultC
Add a test result
Inputs: test_id (required), status_id (required), comment, elapsed, +1 more.
add_result_for_caseB
Add a test result for a specific case in a run
Inputs: run_id (required), case_id (required), status_id (required), comment, +1 more.
add_results_for_casesB
Add multiple test results for cases in a run
Inputs: run_id (required), results (required).
add_runB
Create a new test run
Inputs: project_id (required), name (required), suite_id, description, +4 more.
add_sectionC
Create a new section
Inputs: project_id (required), name (required), suite_id, parent_id, +1 more.
add_suiteB
Create a new test suite
Inputs: project_id (required), name (required), description.
close_runB
Close a test run
Inputs: run_id (required).
delete_caseB
Delete a test case
Inputs: case_id (required).
delete_sectionC
Delete a section
Inputs: section_id (required).
get_caseB
Get a specific test case by ID
Inputs: case_id (required).
get_case_fieldsA
Get all available test case fields
Inputs: no named parameters.
get_casesB
Get test cases for a project/suite
Inputs: project_id (required), suite_id, section_id.
get_case_typesB
Get all available test case types
Inputs: no named parameters.
get_milestoneA
Get a specific milestone by ID
Inputs: milestone_id (required).
get_milestonesB
Get milestones for a project
Inputs: project_id (required).
get_planC
Get a specific test plan by ID
Inputs: plan_id (required).
get_plansC
Get test plans for a project
Inputs: project_id (required).
get_projectB
Get a specific project by ID
Inputs: project_id (required).
get_projectsB
Get all TestRail projects
Inputs: no named parameters.
get_resultsC
Get results for a test
Inputs: test_id (required).
get_results_for_caseB
Get results for a test case in a run
Inputs: run_id (required), case_id (required).
get_results_for_runC
Get results for a test run
Inputs: run_id (required).
get_runB
Get a specific test run by ID
Inputs: run_id (required).
get_runsB
Get test runs for a project
Inputs: project_id (required).
get_sectionA
Get a specific section by ID
Inputs: section_id (required).
get_sectionsB
Get all sections for a project/suite
Inputs: project_id (required), suite_id.
get_suiteA
Get a specific test suite by ID
Inputs: suite_id (required).
get_suitesB
Get all test suites for a project
Inputs: project_id (required).
get_testB
Get a specific test by ID
Inputs: test_id (required).
get_testsC
Get tests for a test run
Inputs: run_id (required).
update_caseC
Update an existing test case
Inputs: case_id (required), title, type_id, priority_id, +5 more.
update_runC
Update an existing test run
Inputs: run_id (required), name, description, milestone_id.
update_sectionC
Update an existing section
Inputs: section_id (required), name, description.
update_suiteB
Update an existing test suite
Inputs: suite_id (required), name, description.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 35 tools
Each tool targets a distinct entity and action (add, get, update, delete, close) with clear naming. Even multiple result tools are differentiated by context (case, run, bulk). No ambiguity.
All tool names follow the verb_object pattern in snake_case (e.g., add_case, get_run, update_suite). Verbs are consistent and predictably used.
35 tools is high but matches the complexity of TestRailβs domain (project, suite, section, case, run, result, milestone, plan). Most tools are necessary for comprehensive coverage.
Covers CRUD for cases, runs, suites, sections, and projects. However, milestones and plans only have get operations (no add/update/delete for milestones, no add/update for plans), which are notable gaps.
Related MCP Connectors
Create and manage test cases, test runs and results in Testiny from your AI assistant.
Test management for AI agents: cases, runs, results, cycles and traceability.
Create and manage MeisterTask projects, tasks, and notes from your AI assistant.
Manage Orangescrum projects, tasks, users, sprints, test cases, releases, and risks from AI tools.
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.1840 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.7761 npm1MIT
- AlicenseAqualityFmaintenanceEnables management of TestRail projects, test cases, runs, and results directly through MCP-supported clients. It provides a comprehensive set of tools to interact with the TestRail API for seamless test cycle management within AI environments.426,221 npm42MIT