TestRail MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TESTRAIL_API_KEY | Yes | Your TestRail API key | |
| TESTRAIL_USERNAME | Yes | Your TestRail user email address | |
| TESTRAIL_INSTANCE_URL | Yes | Your TestRail instance URL (e.g., https://example.testrail.io) | |
| TESTRAIL_ENABLE_SHARED_STEPS | No | Set to true to enable Shared Steps management tools | false |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| query_project | Retrieve a single project or all projects in TestRail. Set payload.action to 'one' or 'many' to specify the operation. |
| mutate_suite | Create a new test suite or update an existing one in TestRail. Set payload.action to 'create' or 'update' to specify the operation. |
| query_suite | Retrieve a single test suite or all test suites for a project in TestRail. Set payload.action to 'one' or 'many' to specify the operation. |
| get_case | Get detailed information about a test case including its custom fields |
| get_cases | Get all test cases for a project. Filter by section, API params (priority, type), or any field including custom fields via 'where'. Returns case IDs, titles, and any additional requested fields. |
| get_case_fields | Get the field schema for test cases for a specific project. You should normally provide project_id to get fields applicable to your project. If you truly need all fields across all projects, you may omit project_id, but this is rarely what you want. Returns available fields with their types and options (for dropdown fields). |
| update_case | Update a test case in TestRail. The update operation requires knowing valid field names that are returned by get_case_fields tool. Supports partial updates — only specify the fields you want to change. |
| update_cases | Bulk update multiple test cases with the same field values. The update operation requires knowing valid field names that are returned by get_case_fields tool. More efficient than calling update_case multiple times. |
| add_case | Create a new test case in TestRail. The create operation requires knowing valid field names that are returned by get_case_fields tool. |
| get_sections | Get all sections for a project. Returns section IDs and names that can be used with add_case |
| mutate_sectionA | Create a new section or update an existing section in TestRail. Set payload.action to 'create' or 'update' to specify the operation. |
| mutate_run | Create a new test run or update an existing one in TestRail. Set payload.action to 'create' or 'update' to specify the operation. |
| query_runA | Retrieve a single test run or all test runs for a project in TestRail. Set payload.action to 'one' or 'many' to specify the operation. |
| add_attachment_to_run | Add an attachment to a test run in TestRail. If the file_path points to a directory, it will be automatically zipped before uploading. Maximum upload size is 256MB. |
| add_results | Add one or more test results to a test run |
| add_results_for_cases | Add one or more test results to a test run using case IDs instead of test IDs |
| get_results | Get results for a specific test in TestRail. |
| get_configurations | Get all configuration groups and configurations for a project in TestRail. |
| get_labels | Get all available test case labels (sometimes called tags) for a project. Returns label IDs and titles that can be used when creating or updating test cases. |
| get_priorities | Get all available test case priorities (e.g. Critical, High, Medium, Low). Returns priority IDs and names that can be used when creating or updating test cases. |
| get_statuses | Get all available test statuses (e.g. Passed, Failed, Blocked). Returns status IDs and names that can be used with add_result and get_tests |
| get_templates | Get available test case templates for a project. Template IDs determine which fields are available when creating or updating test cases |
| get_tests | Get tests for a test run, optionally filtered by status |
| get_users | Get active users from TestRail. Resolves active users globally or per-project. If global fetch is forbidden (for non-admin accounts), falls back to merging users across all active projects so users referenced as reviewers or assignees can be resolved. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/uarlouski/testrail-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server