Provides comprehensive TestRail API integration for managing test cases, projects, suites, runs, and tests. Enables updating test cases and runs, adding test results and attachments, and retrieving test data with filtering capabilities.
TestRail MCP Server
A Model Context Protocol (MCP) server that provides TestRail integration tools for AI assistants like Cursor.
Features
- Get TestRail test cases, projects, suites, runs, and tests
- Update test cases, runs, and tests
- Add test results and attachments
- Full TestRail API integration
- Seamless integration with Cursor and other MCP-compatible AI assistants
Quick Start
Prerequisites
- Node.js 18.17.0 or higher
- npm
Installation Options
Option 1: Using npm package (Recommended)
Option 2: From source
Configure Environment Variables
Create a .env
file in your project root or set environment variables:
Cursor Integration
Setup
Option 1: Using npm package (Recommended)
- Configure Cursor MCP Settings: Open Cursor and go to Settings → Extensions → MCP. Add the following configuration:
Option 2: Using local installation
- Configure Cursor MCP Settings: Open Cursor and go to Settings → Extensions → MCP. Add the following configuration:
- Restart Cursor to load the MCP server configuration.
Usage
Using with Cursor
Once configured, you can use TestRail tools directly in Cursor's chat:
Using the npm package directly
You can also use the MCP server directly from the command line:
Example Commands:
- "Get all TestRail projects"
- "Show me test cases for project ID 1"
- "Update test case 123 with new title"
- "Add a test result for test ID 456"
- "Upload an attachment to test case 789"
Available Tools:
get_case
- Fetch a TestRail test case by IDadd_case
- Create a new test case in a sectionupdate_case
- Update a TestRail test caseget_projects
- List all TestRail projectsget_project
- Get project detailsget_suites
- Get test suites for a projectget_suite
- Get suite detailsget_cases
- Get test cases with filteringadd_attachment_to_case
- Upload file attachmentget_sections
- Get test sectionsget_runs
- Get test runsget_run
- Get run detailsupdate_run
- Update test runget_tests
- Get tests in a runget_test
- Get test detailsupdate_test
- Update testadd_result
- Add test resultget_case_fields
- Get available custom fields for test cases
Troubleshooting
Common Issues:
- Server not found: Ensure the path to
dist/server.js
is correct - Authentication errors: Verify your TestRail credentials in the environment variables
- Permission denied: Make sure the server file is executable
- Connection timeout: Check your TestRail URL and network connectivity
Debug Mode: Enable debug logging by adding to your environment variables:
Deployment Options
Local Development
Docker Deployment
Quick Start:
Manual Build:
Security Considerations
- Store TestRail API keys securely using environment variables
- Never commit API keys to version control
- Use HTTPS for TestRail URLs
- Consider using Docker secrets for production deployments
- Regularly rotate API keys
License
MIT
This server cannot be installed
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.
Enables AI assistants to interact with TestRail test management systems through comprehensive API integration. Supports retrieving and updating test cases, projects, suites, runs, and results, plus adding attachments and managing test data through natural language commands.
Related MCP Servers
- -securityAlicense-qualityAI-powered agent that streamlines web testing workflows by allowing developers to record, execute, and discover tests using natural language prompts in their AI coding assistants.Last updated -57Apache 2.0
- -securityAlicense-qualityEnables AI assistants to interact with Statsig's feature management and experimentation platform, allowing them to check feature flags, retrieve configurations, get experiment assignments, and log events.Last updated -MIT License
- -securityFlicense-qualityConnects AI assistants to GitLab, allowing users to manage merge requests, view reviews, and interact with discussions through natural language queries.Last updated -8
- -securityFlicense-qualityA Model Context Protocol server that provides integration with TestRail, allowing AI assistants to interact with TestRail projects, test cases, test runs, and results.Last updated -1