# TestRail MCP

> TestRail MCP connects your conversational AI directly to your entire test suite. Instead of clicking through dashboards, you query project status, review manual steps for specific cases, and analyze run metrics using plain language commands. It brings deep QA insights straight into your agent.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** qa-testing, test-suites, test-cases, release-management, test-automation, quality-assurance

## Description

This connector lets you get full visibility into complex quality assurance projects without ever opening the TestRail web interface. You can ask your AI client to pull down a list of all active test projects or find specific sections within massive repositories, giving you an immediate architectural overview.

It tracks progress across multiple dimensions: you can check upcoming release milestones or see exactly which tests passed and failed in any given run. Need details on how a manual case works? You just ask for the steps, preconditions, and validation targets. This capability lets developers pull reproduction instructions directly into their IDE to start fixing bugs immediately.

All these deep QA metrics are accessible through natural conversation. Vinkius hosts this MCP, giving your agent access to TestRail’s full history so you can manage project status and analyze test runs—all without switching tabs.

## Tools

### get_test_case_details
Pulls all data, including preconditions and detailed steps, for a single test case ID.

### get_test_project_details
Retrieves comprehensive information about a specific TestRail project.

### get_test_run_details
Fetches the overall status and metrics for a specified test run ID.

### list_test_cases
Generates a list of all available test cases within a project, optionally filtered by suite name.

### list_project_milestones
Lists every major milestone associated with a given TestRail project.

### list_test_projects
Outputs all test projects available on the instance, which is critical for targeting other resources.

### list_test_runs
Lists all completed or active test runs within a selected project.

### list_project_sections
Outputs the folder hierarchy, listing every section available inside a project.

### list_test_suites
Lists all major test suites within a specific project boundary.

### list_run_tests
Outputs the list of individual tests that were executed during a particular test run.

## Prompt Examples

**Prompt:** 
```
What active TestRail projects are available in this instance?
```

**Response:** 
```
Found 2 active TestRail projects:
- **`ID: 15`** | "Native Mobile Apps (Q2)" | Uses standard multi-suite mode.
- **`ID: 29`** | "Core Payment Backend" | Single suite repository.
Should I list milestones or test suites under Project ID 15?
```

**Prompt:** 
```
Get the manual preconditions and test steps for Test Case 1285.
```

**Response:** 
```
Case ID `1285`: **OAuth Registration Gateway Failure**
> **Priority:** CRITICAL_HIGH | **Estimate:** 5m
> **Preconditions:** Server must be isolated via VPN routing rules.

**Steps:**
1. Call initialization endpoint bypassing token assignment. (Expected Result: API triggers `ERR401` gracefully without cascading stack traces).
2. Force brute-force retries mimicking scripts. (Expected Result: IP locks completely after exactly 5th try).
Can I translate these rules over towards a framework structure?
```

**Prompt:** 
```
Return exact status summary for Test Run ID 403.
```

**Response:** 
```
Metrics recovered for Test Run **`#403: Sanity Validation Build.v45`**:
- **Total Executed Tests:** 80
- **Passed:** 71 ✅
- **Failed (Action Required):** 6 ❌
- **Blocked (Dependency issues):** 3 ⏸️
This run has notable defect traces. Would you like me to extract the exact test lists behind the 6 failed triggers?
```

## Capabilities

### List all available projects
Retrieves a list of every test project on the instance, providing essential IDs for further queries.

### Get project and section structure
Lists all sections (folders) or retrieves detailed information about specific TestRail projects.

### Check milestones and deadlines
Interrogates upcoming QA release milestones for a given project, keeping you updated on timelines.

### Review test case steps
Retrieves the full details, preconditions, and step-by-step logic for any specific manual test case ID.

### Analyze active test runs
Generates an immediate summary of a specific test run, showing total tests executed, passed counts, failures, and blocked items.

### List all contained tests in a run
Pulls down the list of individual tests that were included in a particular test run.

## Use Cases

### Diagnosing a failing build
A developer sees a bug report and asks their agent, 'What are the steps for Test Case 1285?' The connector runs get_test_case_details and provides all manual preconditions and exact steps needed to replicate the failure without leaving their terminal.

### Getting project scope overview
A QA Lead asks, 'What projects are active right now?' The agent uses list_test_projects, providing a clean list of all IDs and names. This helps them decide if they need to check milestones or test suites for that specific ID.

### Checking release readiness
A Test Lead needs to know the status before a major launch. They ask, 'What are the upcoming project milestones?' The agent uses list_project_milestones and provides a timeline summary, letting them prioritize which runs need immediate attention.

### Analyzing run failure patterns
An engineer wants to know if a recent build was stable. They ask for the status of Run ID 403. The agent uses get_test_run_details and outputs a clear breakdown: Total Executed, Passed, Failed, and Blocked.

## Benefits

- You instantly get summaries of active Test Runs. Instead of digging through dashboard tables, you ask for the status and know exactly how many tests passed or failed.
- Need to understand a bug? You can retrieve the step-by-step logic and preconditions for any test case ID directly into your chat window.
- Never manually navigate project folders again. You can list all sections or even query the full suite architecture, getting a clear map of your repository structure.
- Keep track of deadlines without logging in. Listing project milestones gives you an immediate overview of upcoming QA release dates and targets.
- For automation engineers, this lets you analyze test case properties to pull down structured data that can be used to write code-based e2e tests quickly.

## How It Works

The bottom line is you get real-time QA metrics without opening the TestRail web application.

1. Subscribe to this MCP and provide your TestRail Base URL, along with an API Key.
2. Your AI client executes natural language commands (e.g., 'What's the status of Project X?').
3. The connector gathers test run data, project structures, or case details and returns a clean summary directly to your chat.

## Frequently Asked Questions

**How do I find all active projects using TestRail MCP?**
You list all available test projects by calling the list_test_projects tool. This gives you a full inventory of IDs, allowing you to target any other resource on the instance.

**Can I check upcoming deadlines with TestRail MCP?**
Yes, use the list_project_milestones tool. It pulls all scheduled milestones for a project ID, helping you keep track of QA release timelines without opening the web app.

**What is the difference between listing tests and test runs?**
list_test_runs lists all available execution records (the 'container'). list_run_tests uses one of those run IDs to pull the specific individual tests that were executed in that session.

**Can TestRail MCP help with bug replication?**
Absolutely. Use get_test_case_details on a case ID. This retrieves the complete manual playbook, including preconditions and step-by-step instructions needed for developers to reproduce any issue.

**Does TestRail MCP support folder navigation?**
Yes. You can use list_project_sections to pull down the full section list (folder hierarchy) from within a project, giving you a clear visual map of your test repository.