TestRail MCP Server

TestRail MCP Server

AI-native Model Context Protocol (MCP) server for TestRail. Lets Claude, Cursor, Windsurf, and other AI assistants browse projects, create and update test cases, kick off test runs, and record results through natural-language conversation โ€” with strongly-typed tool schemas and per-project custom field validation that helps LLMs generate valid TestRail requests on the first try.

Category
Visit Server

README

<div align="center"> <h1>๐Ÿš€ TestRail MCP Server</h1> <p> <strong>An open-source Model Context Protocol (MCP) server that connects Claude, Cursor, Windsurf, and other AI assistants directly to TestRail.</strong> </p> <p> 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. </p> </div>

<p align="center"> <a href="https://www.npmjs.com/package/@uarlouski/testrail-mcp-server"><img src="https://badge.fury.io/js/@uarlouski%2Ftestrail-mcp-server.svg" alt="npm version"></a> <a href="https://www.npmjs.com/package/@uarlouski/testrail-mcp-server"><img src="https://img.shields.io/npm/dm/@uarlouski/testrail-mcp-server.svg" alt="npm downloads"></a> <a href="https://github.com/uarlouski/testrail-mcp-server/actions/workflows/ci.yml"><img src="https://github.com/uarlouski/testrail-mcp-server/actions/workflows/ci.yml/badge.svg" alt="CI Status"></a> <a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License"></a> <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.9-blue.svg" alt="TypeScript"></a> <a href="https://github.com/uarlouski/testrail-mcp-server"><img src="https://img.shields.io/github/stars/uarlouski/testrail-mcp-server.svg?style=social&label=Star" alt="GitHub stars"></a> <a href="https://glama.ai/mcp/servers/uarlouski/testrail-mcp-server"><img src="https://glama.ai/mcp/servers/uarlouski/testrail-mcp-server/badges/score.svg" alt="Score Badge"></a> </p>

<p align="center"> <strong>Compatible with:</strong> <img src="https://img.shields.io/badge/Claude%20Desktop-D97757?logo=anthropic&logoColor=white" alt="Claude Desktop"> <img src="https://img.shields.io/badge/Cursor-000000?logo=cursor&logoColor=white" alt="Cursor"> <img src="https://img.shields.io/badge/Windsurf-19A1BC?logo=codeium&logoColor=white" alt="Windsurf"> <img src="https://img.shields.io/badge/VS%20Code-007ACC?logo=visualstudiocode&logoColor=white" alt="VS Code"> </p>

<!-- TODO: insert demo.gif โ€” short screencast of asking "create a test case" in Claude or Cursor and seeing the case appear in TestRail -->


๐ŸŒŸ Why Choose TestRail MCP Server?

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.

โœจ Key Features & Capabilities

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.

๐Ÿš€ Quick Start Guide

1. Obtain Your TestRail API Key

Navigate to My Settings โ†’ API Keys in your TestRail platform and generate a new key for authentication.

2. Configure Your MCP Client

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).

๐Ÿค– Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "testrail": {
      "command": "npx",
      "args": ["-y", "@uarlouski/testrail-mcp-server@latest"],
      "env": {
        "TESTRAIL_INSTANCE_URL": "https://your-instance.testrail.io",
        "TESTRAIL_USERNAME": "your@email.com",
        "TESTRAIL_API_KEY": "your-api-key",
        "TESTRAIL_ENABLE_SHARED_STEPS": "true"
      }
    }
  }
}

<details> <summary><strong>โŒจ๏ธ Cursor</strong></summary>

Open Settings โ†’ Features โ†’ MCP and add a new configuration:

{
  "mcpServers": {
    "testrail": {
      "command": "npx",
      "args": ["-y", "@uarlouski/testrail-mcp-server@latest"],
      "env": {
        "TESTRAIL_INSTANCE_URL": "https://your-instance.testrail.io",
        "TESTRAIL_USERNAME": "your@email.com",
        "TESTRAIL_API_KEY": "your-api-key"
      }
    }
  }
}

</details>

<details> <summary><strong>๐ŸŒŠ Windsurf</strong></summary>

Update your Windsurf MCP configuration file:

{
  "mcpServers": {
    "testrail": {
      "command": "npx",
      "args": ["-y", "@uarlouski/testrail-mcp-server@latest"],
      "env": {
        "TESTRAIL_INSTANCE_URL": "https://your-instance.testrail.io",
        "TESTRAIL_USERNAME": "your@email.com",
        "TESTRAIL_API_KEY": "your-api-key"
      }
    }
  }
}

</details>

<details> <summary><strong>๐ŸŒ Other MCP Clients</strong></summary>

Any MCP-compliant client can utilize this server. The pattern is universalโ€”point your client at the npx command with the required environment variables. </details>

3. See It in Action

Once configured, turbo-charge your QA workflow by asking your AI assistant:

  • "List all projects in TestRail to find the latest active project."
  • "Show me all test cases in section 5 of project 3."
  • "Create a comprehensive test case for 'Login Validation' with detailed steps."
  • "Start a new test run containing cases from section 5."
  • "Mark test case ID 1042 as passed with the comment 'Tested successfully on staging'."

โš™๏ธ Environment Variables

Variable Description Required
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

๐Ÿ› ๏ธ Complete Tool Reference

The TestRail MCP Server provides heavily typed, descriptive tools designed specifically for LLM interaction:

๐Ÿ”ญ Discovery & Navigation

Tool Functionality
get_projects List all available active and completed projects in your instance.
get_sections Navigate the precise folder/section hierarchy of any test suite.

๐Ÿ“‹ Test Case Management

Tool Functionality
get_cases Query test cases with advanced filtering (priority, template, type, etc.) and pagination.
get_case Fetch complete, structured details of a specific test case, including custom steps and fields.
add_case Seamlessly create a new test case equipped with robust custom field validation.
update_case Modify an existing test case's steps, metadata, or titles.
update_cases Execute bulk-updates on multiple test cases simultaneously to save time.

โ–ถ๏ธ Test Execution & Tracking

Tool Functionality
add_run Generate a new, focused test run directly in TestRail.
get_tests Retrieve individual tests for a specific test run, with optional status filtering.
add_results Submit test results to a test run using the specific test_id.
add_results_for_cases Submits results to a run mapping directly to case_ids, streamlining automation workflows.
add_attachment_to_run Attach logs, files, or zipped artifacts directly to an ongoing test run.

๐Ÿ”— Shared Steps (Optional)

Tool Functionality
get_shared_steps List shared test steps for a project with optional reference filtering.
get_shared_step Retrieve precise details of a specific shared test step set.
get_shared_step_history View the complete audit trail and version history of a shared step set.
add_shared_step Create a new reusable set of shared test steps.
update_shared_step Modify an existing shared step set (changes propagate to all linked test cases).
delete_shared_step Securely delete a shared step entity.

๐Ÿง  System Metadata

Tool Functionality
get_statuses Systematically list all configured test statuses (Passed, Failed, Blocked, Retest, etc.).
get_priorities Retrieve priority levels configured within your instance structure.
get_case_fields Discover custom field definitions, formats, and UI dropdown options. Supports filtering by project_id.
get_templates Identify available case templates to mandate correct AI structuring.

๐Ÿค Contributing

Open-source contributions are actively welcomed! Please feel free to open an issue for feature requests or submit a pull request for improvements.

๐Ÿ“œ License

This project is securely licensed under the Apache License 2.0.


<p align="center"> <b>TestRail MCP Server</b> ยท Engineered with the <a href="https://modelcontextprotocol.io">Model Context Protocol</a> </p>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured