The TestRail MCP Server enables interaction with TestRail's core entities through the Model Context Protocol (MCP).
- Projects: Get, add, update, and delete projects.
- Test Cases: Get, add, update, and delete test cases.
- Test Runs: Get, add, update, close, and delete test runs.
- Results: Get and add test results.
- Datasets: Get, add, update, and delete datasets.
Enables interaction with TestRail's core entities including projects, cases, runs, results, and datasets, allowing access and management of test management data through the TestRail API.
TestRail MCP Server
A Model Context Protocol (MCP) server for TestRail that allows interaction with TestRail's core entities through a standardized protocol.
Features
- Authentication with TestRail API
- Access to TestRail entities:
- Projects
- Cases
- Runs
- Results
- Datasets
- Full support for the Model Context Protocol
- Compatible with any MCP client (Claude Desktop, Cursor, Windsurf, etc.)
See it in action together with Octomind MCP
Installation
Installing via Smithery
To install testrail-mcp for Claude Desktop automatically via Smithery:
Manual Installation
- Clone this repository:
- Create and activate a virtual environment:
- Install dependencies:
Configuration
The TestRail MCP server requires specific environment variables to authenticate with your TestRail instance. These must be set before running the server.
- Create a
.env
file in the root directory of the project:Important Notes:TESTRAIL_URL
should be the full URL to your TestRail instance (e.g.,https://example.testrail.io
)TESTRAIL_USERNAME
is your TestRail email address used for loginTESTRAIL_API_KEY
is your TestRail API key (not your password)- To generate an API key, log in to TestRail, go to "My Settings" > "API Keys" and create a new key
- Verify that the configuration is loaded correctly:This will display your TestRail configuration information, including your URL, username, and the first few characters of your API key for verification.
If you're using this server with a client like Claude Desktop or Cursor, make sure the environment variables are accessible to the process running the server. You may need to set these variables in your system environment or ensure they're loaded from the .env
file.
Usage
Running the Server
The server can be run directly using the installed script:
This will start the MCP server in stdio mode, which can be used with MCP clients that support stdio communication.
Using with MCP Clients
Claude Desktop
In Claude Desktop, add a new server with the following configuration:
Cursor
In Cursor, add a new custom tool with the following configuration:
Windsurf
In Windsurf, add a new tool with the following configuration:
Testing with MCP Inspector
For testing and debugging, you can use the MCP Inspector:
This will open a web interface where you can explore and test all the available tools and resources.
Development
This server is built using:
- FastMCP - A Python framework for building MCP servers
- Requests - For HTTP communication with TestRail API
- python-dotenv - For environment variable management
License
MIT
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that allows interaction with TestRail's core entities (projects, cases, runs, results, datasets) through a standardized protocol compatible with MCP clients like Claude Desktop.
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that integrates with the Qase test management platform, allowing users to create and retrieve test cases, manage test runs, and interact with Qase projects.Last updated -31JavaScript
- AsecurityFlicenseAqualityA Model Context Protocol server that enables executing and interacting with JMeter tests through MCP-compatible clients like Claude Desktop, Cursor, and Windsurf.Last updated -2Python
- AsecurityFlicenseAqualityA testing server that demonstrates Model Context Protocol features, providing access to user data, todos, and system information through resources, tools for user management and calculations, and prompt templates for various analyses.Last updated -4TypeScript
- -securityFlicense-qualityA simple server for testing Model Context Protocol (MCP) that serves CSV and image resources, allowing developers to test MCP implementations with sample data via SSE transport.Last updated -9JavaScript