Model Context Protocol (MCP) server for TestRail platform, enabling LLMs to manage test artifacts.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An open-source Model Context Protocol (MCP) server that connects Claude, Cursor, Windsurf, and other AI assistants directly to TestRail.
Manage TestRail projects, search and create test cases, kick off test runs, record results, and attach files β all through natural-language conversation with your AI assistant. Built for QA engineers and AI-assisted test automation.
Compatible with:
Managing test cases manually is tedious and error-prone. With the TestRail MCP Server, your AI assistant (whether itβs Claude, Cursor, Windsurf, or any MCP-compliant client) interacts directly with your TestRail instance. Instruct it to find test cases, draft new ones, kick off test runs, and record test resultsβall through natural conversation.
No context switching. No tedious copy-pasting. Just ask your AI.
[!NOTE] Compatibility Baseline: The primary baseline version this MCP server is tested and validated against is TestRail 10.6.2 (API v2). Older TestRail instances (including pre-7.x pagination) are also supported via built-in backward compatibility.
| Capability | Description |
|---|---|
| π Intelligent Discovery | Browse projects, test suites, and sections to automatically map your QA organization. |
| π Full Case Management | Fetch, create, update, and bulk-edit test cases with comprehensive custom field support. |
| βΆοΈ Actionable Execution | Create test runs, update results by test_id or case_id, attach files, and track statuses. |
| π§ Context-Aware AI | Dynamically exposes templates, fields, priorities, and statuses so LLMs generate valid, structured data. |
Navigate to My Settings β API Keys in your TestRail platform and generate a new key for authentication.
Add the server to your chosen MCP client configuration. The Claude Desktop example is shown below; Cursor, Windsurf, and other clients use the same pattern (see the collapsible sections further down).
Add this to your claude_desktop_config.json:
Open Settings β Features β MCP and add a new configuration:
Update your Windsurf MCP configuration file:
Any MCP-compliant client can utilize this server. The pattern is universalβpoint your client at the npx command with the required environment variables.
Once configured, turbo-charge your QA workflow by asking your AI assistant:
| Variable | Description | Required | Default |
|---|---|---|---|
TESTRAIL_INSTANCE_URL | Your TestRail instance URL (e.g., https://example.testrail.io) | β | |
TESTRAIL_USERNAME | Your TestRail user email address | β | |
TESTRAIL_API_KEY | Your TestRail API key (Guide) | β | |
TESTRAIL_ENABLE_SHARED_STEPS | Set to true to enable Shared Steps management tools | false | |
TESTRAIL_ENABLE_CASE_HISTORY | Set to true to enable Case History and revision tracking tools | false | |
TESTRAIL_ENABLE_RAG_TOOLS | Set to true to enable experimental Knowledge Base / RAG export tools (export_cases_for_rag). Subject to breaking API changes. | false | |
TESTRAIL_ALLOW_WRITE_OPERATIONS | Allow write operations (e.g. adding/updating test cases, test runs, sections) | true | |
TESTRAIL_ALLOW_READ_OPERATIONS | Allow read operations (e.g. retrieving projects, test cases, templates) | true | |
TESTRAIL_ALLOW_DELETE_OPERATIONS | Allow delete operations (e.g. deleting cases or shared steps). Enabled strictly via true. | false | |
TESTRAIL_ENABLE_DEPRECATED_TOOLS | Enable deprecated tools for backward compatibility. Set to false to reduce context token overhead. | true | |
TESTRAIL_DISABLED_TOOLS | Comma-separated list of specific tool names to disable (e.g., mutate_suite,delete_entity). Fails if invalid tool names are specified. | - |
To ensure smooth transitions, deprecated tools remain available by default (TESTRAIL_ENABLE_DEPRECATED_TOOLS=true) and will be removed in future major releases:
| Deprecated Tool | Replacement | Status |
|---|---|---|
add_attachment_to_run | add_attachment (entity_type: "case" | "run") | Deprecated in 2.3.0, scheduled for removal in 3.0.0 |
get_sections | query_section (action: "many") | Deprecated in 2.8.0, scheduled for removal in 3.0.0 |
π‘ Token Tip: If you are not using legacy tools, set
TESTRAIL_ENABLE_DEPRECATED_TOOLS=falsein your environment to eliminate deprecated tool definitions from the LLM prompt and save tokens!
For a comprehensive guide, detailed configuration options, and a complete breakdown of all available tools, please visit our official documentation site:
π TestRail MCP Server Documentation
The documentation includes detailed explanations for:
Open-source contributions are actively welcomed! Please feel free to open an issue for feature requests or submit a pull request for improvements.
This project is securely licensed under the Apache License 2.0.
TestRail MCP Server Β· Engineered with the Model Context Protocol
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/testrail-mcp-server)<a href="https://allmcps.com/mcp/testrail-mcp-server"><img src="https://allmcps.com/api/badge/testrail-mcp-server?style=directory" alt="Testrail MCP Server on AllMCPs" /></a>