testrail
TestRail MCP server for Model Context Protocol - enables real-time TestRail API access in AI assistants
claude mcp add --transport stdio marc-reynolds-testrail-mcp-server node build/index.js \ --env TESTRAIL_URL="https://your-testrail-instance.testrail.net" \ --env TESTRAIL_API_KEY="your-api-key" \ --env TESTRAIL_USERNAME="your-email@example.com"
How to use
This MCP server exposes a set of TestRail-related tools that let AI assistants query and manipulate TestRail data via the MCP protocol. The available tools include get_test_run (retrieve details about a specific test run), get_test_results (fetch results for a run), get_test_case (retrieve a single test case), list_projects (list all TestRail projects), get_users (list TestRail users), and get_tests_for_run (list all tests within a run). After starting the server, you can invoke these tools through the MCP interface (for example, via Claude Desktop, VS Code integrations, or any client that speaks MCP) using the provided command mappings. The server is designed to be used with a CLI wrapper as shown in the README, or embedded into client configurations for editors like Claude Desktop and VS Code so your AI agent can issue requests to TestRail without exposing raw API calls.
Usage usually involves starting the server, ensuring environment variables are configured with your TestRail instance credentials, and then issuing commands such as: getting a test run, listing projects, or retrieving test results for a run. The CLI example demonstrates direct node-based invocations (node cli.js <command> <args>), while the editor integrations show how to configure the server as a runnable process so your editor tooling can route queries through the MCP server seamlessly.
How to install
Prerequisites:
- Node.js and npm installed on your machine
- Access to a TestRail instance with API credentials
Installation steps:
-
Install dependencies npm install
-
Create a local environment configuration from the sample cp .env.example .env
-
Configure TestRail credentials in your environment file (.env)
.env
TESTRAIL_URL=https://your-testrail-instance.testrail.net TESTRAIL_USERNAME=your-email@example.com TESTRAIL_API_KEY=your-api-key
-
Build the server npm run build
-
Run in development or production mode as needed npm run start (or run with your preferred MCP launcher to use the mcp_config above)
Notes:
- If you modify environment variables, restart the server so changes take effect.
- The README suggests CLI usage via node cli.js; ensure you have built the project before invoking CLI commands.
Additional notes
Tips and common issues:
- Ensure TESTRAIL_URL, TESTRAIL_USERNAME, and TESTRAIL_API_KEY are correct; invalid credentials will return authentication errors from TestRail.
- If using editor integrations (Claude Desktop or VS Code), ensure the path to the built server (build/index.js) is correct for your environment. Absolute paths are often required in those configurations.
- For local development, you can run npm run watch to rebuild on changes, which helps iterate on AI tool interactions quickly.
- The server uses TestRail API v2; consult the official API docs for any advanced query parameters or rate limits.
- If you see CORS or network errors, verify network access from your runtime environment to your TestRail instance and confirm any required proxies are configured.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.