testrail-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| JIRA_USER | No | Jira account email | |
| TR_TYPE_ID | No | Default case type | |
| JIRA_BASE_URL | No | Jira base URL, e.g. https://your-org.atlassian.net | |
| TESTRAIL_USER | Yes | TestRail account email | |
| JIRA_API_TOKEN | No | Jira API token from https://id.atlassian.com/manage-profile | |
| TR_PRIORITY_ID | No | Default priority (3 = Medium) | 3 |
| TR_TEMPLATE_ID | No | Default template ID (2 = Test Case (Steps)) | 2 |
| CONFLUENCE_EMAIL | No | Confluence email (defaults to JIRA_USER) | |
| TESTRAIL_API_KEY | Yes | TestRail API key from My Settings → API Keys | |
| TESTRAIL_BASE_URL | Yes | TestRail base URL, e.g. https://your-org.testrail.io | |
| TESTRAIL_SUITE_ID | No | Default suite ID | |
| CONFLUENCE_BASE_URL | No | Confluence base URL | |
| TESTRAIL_PROJECT_ID | No | Default project ID | |
| CONFLUENCE_API_TOKEN | No | Confluence API token (defaults to JIRA_API_TOKEN) |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_projectsA | List all TestRail projects visible to the configured user. |
| create_suiteB | Create a new TestRail suite in a project (only works on multi-suite projects).
|
| list_suitesA | List suites under a TestRail project.
|
| list_sectionsB | List sections in a suite, returning {id, name, parent_id}. Defaults to TESTRAIL_PROJECT_ID / TESTRAIL_SUITE_ID from env when omitted. |
| find_populated_sectionA | Find a section that has at least |
| search_test_casesA | List test cases in a project, optionally filtered by suite, section, or title substring. Both |
| get_test_caseB | Fetch a single test case by its TestRail ID. |
| create_test_caseC | Create a single test case in a TestRail section.
|
| get_or_create_sectionA | Resolve a section hierarchy like Defaults to TESTRAIL_PROJECT_ID / TESTRAIL_SUITE_ID from env when not provided. |
| preview_house_styleC | Return up to N existing cases from the target section in style-example format. Use this to preview what Claude will see as "house style" before generating. |
| prepare_cases_from_textA | Fetch the inputs needed to generate TestRail cases from a free-form spec. This is an MCP-native pattern: the server doesn't call an LLM. It returns the
spec, the house-style anchors, the target section, and an Targeting modes:
House-style matching (default on): the server pulls a few existing cases from
the target section (or a fallback populated section) so the calling Claude can
match the local tone, naming, and step granularity. Override the style source
with |
| prepare_cases_from_jiraC | Fetch a Jira ticket + house-style anchors. Returns the context the calling Claude needs to generate TestRail cases. Example: issue_key='ABC-123'. |
| prepare_cases_from_confluenceB | Fetch a Confluence page + house-style anchors. Returns the context the
calling Claude needs to generate TestRail cases. |
| add_test_cases_bulkA | Push a batch of test cases to TestRail in one call. Returns the IDs created.
Targeting: either |
| dedupe_against_sectionA | Check generated cases against what's already in a TestRail section. Uses title-token overlap (no embeddings) — fast, deterministic. Returns:
|
| prepare_lintB | Return the case batch alongside lint instructions for the calling Claude to evaluate. No LLM call happens server-side — the client Claude reviews the cases using its own context and reports back, paid for by the user's subscription. |
| prepare_coverage_gapsB | Return the spec and the existing case titles, plus instructions for the calling Claude to find missing coverage. No LLM call happens server-side. |
| list_runsC | List test runs in a project. Filters:
|
| get_runC | Fetch the full metadata of a single test run. |
| get_tests_in_runC | Tests in a run with their current status (current = latest result). |
| get_results_for_runC | All result entries for a run — includes comments, defects, who tested when. |
| prepare_run_summaryA | Pull run metadata, statuses, and failure comments — return the structured payload + report instructions for the calling Claude to synthesise into Markdown. No LLM call happens server-side. Claude in the client writes the report.
|
| create_runC | Create a new test run. By default includes every case in the suite ( |
| update_runA | Patch an existing test run's metadata. Pass only fields you want to change. |
| close_runC | Mark a test run as completed/archived. This is irreversible in TestRail. |
| add_resultA | Post a single test result by case_id (TestRail looks up the test inside the run).
|
| add_bulk_resultsA | Post many results in one TestRail call (much faster than looping add_result). Each entry in |
| update_caseA | Patch an existing test case. Common keys: title, custom_preconds, custom_steps_separated, priority_id, type_id, refs. To rewrite steps, pass a list under custom_steps_separated: [{"content": "...", "expected": "..."}, ...]. |
| prepare_runs_diffA | Compute the regression / fix / coverage delta between two runs and return the structured data + narrate instructions for the calling Claude. A is the baseline (older), B is the newer run. No LLM call happens server-side. |
| flaky_test_detectorA | Pull this case's result across the last N runs and flag flakiness. A test is "flaky" if it has BOTH passes and failures in the window AND flips between them at least twice. Returns the run-by-run trace. |
| prepare_feature_bootstrapA | Prepare a feature-import workflow: fetch the spec, pull house-style anchors, and return everything the calling Claude needs to drive generation and push. No LLM call happens server-side. Claude in the client generates cases (with the
instructions and style examples this tool returns) and then calls
Required:
Optional:
|
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/Sergey-Bl/testrail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server