MCP.so
Sign In
T

Testrail Mcp Server

@uarlouski

About Testrail Mcp Server

A high-performance Model Context Protocol (MCP) server connecting AI assistants (Claude, Cursor, Windsurf) directly to TestRail.

Config

Add this server to your MCP-compatible client using the configuration below.

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

Tools

26

Retrieve a single project or all projects in TestRail. Set payload.action to 'one' or 'many' to specify the operation.

Create a new test suite or update an existing one in TestRail. Set payload.action to 'create' or 'update' to specify the operation.

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 detailed information about a test case including its custom fields

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

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.

Create a new test case in TestRail. The create operation requires knowing valid field names that are returned by get_case_fields tool.

Get all sections for a project. Returns section IDs and names that can be used with add_case

Create a new section or update an existing section in TestRail. Set payload.action to 'create' or 'update' to specify the operation.

Create a new test run or update an existing one in TestRail. Set payload.action to 'create' or 'update' to specify the operation.

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 an attachment to a test run in TestRail. (Deprecated: Prefer add_attachment tool). Maximum upload size is 256MB.

Add one or more test results to a test run

Add one or more test results to a test run using case IDs instead of test IDs

Get results for a specific test in TestRail.

Add an attachment to a test case or test run in TestRail. If the file_path points to a directory, it will be automatically zipped before uploading. Maximum upload size is 256MB.

Download a single attachment or list all attachments for a test case or test run in TestRail. Set payload.action to 'one' or 'many' to specify the operation.

Get all configuration groups and configurations for a project in TestRail.

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 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 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 available test case templates for a project. Template IDs determine which fields are available when creating or updating test cases

Get tests for a test run, optionally filtered by status

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.

Overview

What is TestRail MCP Server?

TestRail MCP Server is a high-performance Model Context Protocol (MCP) server that connects AI assistants (such as Claude, Cursor, and Windsurf) directly to TestRail. It enables users to search, create, update, and execute test cases using natural language, eliminating manual copy-pasting and context switching.

How to use TestRail MCP Server?

Obtain a TestRail API key from My Settings → API Keys. Then add the server to your MCP client configuration (e.g., Claude Desktop, Cursor, Windsurf) by providing the npx command and the three required environment variables: TESTRAIL_INSTANCE_URL, TESTRAIL_USERNAME, and TESTRAIL_API_KEY. Once configured, you can instruct your AI assistant to perform TestRail operations in natural language.

Key features of TestRail MCP Server

  • Intelligent discovery of projects, suites, and sections.
  • Full test case management with custom field support.
  • Actionable test execution and result tracking.
  • Context-aware AI that exposes templates, fields, and statuses.
  • Bulk edit and attachment capabilities for runs.

Use cases of TestRail MCP Server

  • List all active projects to find the latest one.
  • Show test cases from a specific section of a project.
  • Create a comprehensive test case with detailed steps.
  • Start a new test run containing selected cases.
  • Mark a test case as passed with a comment.

FAQ from TestRail MCP Server

What is TestRail MCP Server and how does it differ from manual TestRail usage?

It is an MCP server that lets AI assistants interact with TestRail via natural language, automating test management tasks that otherwise require manual navigation and copy-pasting.

How do I install and configure TestRail MCP Server?

Installation is done by adding the server to your MCP client configuration using the npx command with the @uarlouski/testrail-mcp-server@latest package. You must set three environment variables: your TestRail instance URL, your user email, and your API key.

Which AI assistants or MCP clients are supported?

The server works with any MCP-compliant client, including Claude Desktop, Cursor, and Windsurf.

What TestRail operations can I perform through this server?

You can list projects and sections, create/update/bulk-edit test cases, add test runs, submit results by test ID or case ID, attach files to runs, and retrieve metadata like statuses, priorities, case fields, and templates.

Is TestRail MCP Server open source and can I contribute?

Yes, it is licensed under Apache License 2.0 and contributions via issues and pull requests are actively welcomed.

Frequently asked questions

What is TestRail MCP Server and how does it differ from manual TestRail usage?

It is an MCP server that lets AI assistants interact with TestRail via natural language, automating test management tasks that otherwise require manual navigation and copy-pasting.

How do I install and configure TestRail MCP Server?

Installation is done by adding the server to your MCP client configuration using the `npx` command with the `@uarlouski/testrail-mcp-server@latest` package. You must set three environment variables: your TestRail instance URL, your user email, and your API key.

Which AI assistants or MCP clients are supported?

The server works with any MCP-compliant client, including Claude Desktop, Cursor, and Windsurf.

What TestRail operations can I perform through this server?

You can list projects and sections, create/update/bulk-edit test cases, add test runs, submit results by test ID or case ID, attach files to runs, and retrieve metadata like statuses, priorities, case fields, and templates.

Is TestRail MCP Server open source and can I contribute?

Yes, it is licensed under Apache License 2.0 and contributions via issues and pull requests are actively welcomed.

Comments

More Other MCP servers