testrail-mcp-server
AI-native MCP server connecting Claude, Cursor, Windsurf, and other AI assistants to TestRail — manage test cases, runs, and results through natural-language conversation, with typed schemas built for LLMs.
Install / Use
claude mcp add uarlouski -- npx -y github:uarlouski/testrail-mcp-serverIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Our assessment of testrail-mcp-server
testrail-mcp-server scores 87/100 on our quality scale, 1708th of 2,912 Automation skills we index.
Its MCP Server is 20 KB long, well organised into 31 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
It has 43 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 3 days ago, so testrail-mcp-server is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
testrail-mcp-server compared with similar skills
All 4 of these similar skills score higher than testrail-mcp-server; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| testrail-mcp-server (this skill)by uarlouski | 87 | 43 | 3d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 97.8k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.5k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.4k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 88.0k | today | MCP Server |
Frequently asked questions
- How do I install testrail-mcp-server?
- Run
claude mcp add uarlouski -- npx -y github:uarlouski/testrail-mcp-server. The install tabs above show the steps for each supported agent. - Which AI agents does testrail-mcp-server work with?
- It is written for Claude Code, Claude Desktop, Cursor and Windsurf, as a MCP Server file. Other agents that read the same format can often use it too.
- Is testrail-mcp-server safe to use?
- It is Apache-2.0-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is testrail-mcp-server still maintained?
- The repository was last updated 3 days ago, so testrail-mcp-server is actively maintained.
Skill content
View source on GitHubWhat is the TestRail MCP Server?
The TestRail MCP Server is a free, open-source Model Context Protocol server that gives AI assistants direct, structured access to a TestRail instance through the TestRail API v2. Once configured, an assistant such as Claude Desktop, Cursor, Windsurf, or GitHub Copilot in VS Code can search test cases, draft new ones, start test runs, record results, and upload attachments on your behalf — without you leaving the chat window.
It exposes 35 tools, runs locally on Node.js 18+ over the MCP stdio transport, and is licensed under Apache 2.0. There is nothing to host or deploy: your MCP client launches it on demand with npx.
No context switching. No tedious copy-pasting. Just ask your AI.
[!NOTE] Compatibility baseline: tested and validated against TestRail 10.6.2 (API v2). Older TestRail instances (including pre-7.x pagination) are also supported via built-in backward compatibility. TestRail Cloud and self-hosted TestRail Server both work.
Table of contents
- Key features
- Quick start
- Command line interface & CI/CD
- Environment variables
- Available tools
- FAQ
- Documentation
- Contributing
✨ 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. |
| 🖥️ CLI & CI/CD Native | Run every tool from bash, GitHub Actions, GitLab CI, or Jenkins with zero LLM overhead. |
| 🔐 Least-Privilege Controls | Per-mode permissions plus per-tool allowlisting; destructive deletes are off by default. |
🚀 Quick Start Guide
1. Obtain your TestRail API key
Navigate to My Settings → API Keys in TestRail and generate a new key. Copy it immediately — TestRail shows it only once. The API must also be enabled instance-wide under Administration → Site Settings → API.
2. Configure your MCP client
Add the server to your MCP client configuration. The Claude Desktop example is shown below; Cursor, Windsurf, and VS Code use the same pattern (see the collapsible sections).
🤖 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 → MCP → Add new MCP server, or edit .cursor/mcp.json in your project (~/.cursor/mcp.json for all projects):
{
"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>
Edit ~/.codeium/windsurf/mcp_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"
}
}
}
}
</details>
<details>
<summary><strong>💻 VS Code</strong></summary>
Add to .vscode/mcp.json. The inputs block keeps your API key out of the file:
{
"inputs": [
{
"id": "testrail-api-key",
"type": "promptString",
"description": "TestRail API key",
"password": true
}
],
"servers": {
"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": "${input:testrail-api-key}"
}
}
}
}
</details>
<details>
<summary><strong>🌐 Other MCP Clients</strong></summary>
Any MCP-compliant client can use this server, because it speaks the standard MCP stdio transport. Point your client at the npx command with the required environment variables — no port, URL, or transport configuration needed.
3. See it in action
Restart your client completely, then turbo-charge your QA workflow by asking your AI assistant:
- "List all projects in TestRail to find the latest active project."
- "Show me all active users in the project to find the right assignee."
- "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 C1042 as passed with the comment 'verified on staging'."
Full per-client setup instructions, including troubleshooting, are in the Getting Started guide.
🖥️ Command Line Interface (CLI) & CI/CD Automation
In addition to interacting via AI assistants, you can invoke any TestRail tool directly from shell scripts, terminal environments, and automated CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins) using testrail-cli or npx — with zero LLM overhead.
- Deterministic Execution: Returns standard Unix exit codes (
0on success,1on error). - Pipeline-Native Output: Emits clean JSON to
stdoutfor piping into tools likejq, while diagnostics and errors go tostderr. - Zero Duplication: Reuses the exact same API client, retry logic, and validation schemas as the MCP server.
Invocation methods
# Method 1: Direct npx subcommand (Recommended)
npx @uarlouski/testrail-mcp-server cli <command> [flags]
# Method 2: Global or local binary
testrail-cli <command> [flags]
# Method 3: Via package runner
npx -p @uarlouski/testrail-mcp-server testrail-cli <command> [flags]
Examples
Query projects (query_project)
# List all active projects
npx @uarlouski/testrail-mcp-server cli query_project --action many
# Query a single project by ID
npx @uarlouski/testrail-mcp-server cli query_project --action one --project_id 1
Report automated test results (add_results_for_cases)
# Submit results by case_id — what your test framework already knows
npx @uarlouski/testrail-mcp-server cli add_results_for_cases \
--run_id 88 \
--results '[{"case_id":1042,"status_id":1,"comment":"Passed in CI"}]'
Export cases for knowledge base / RAG (export_cases_for_rag)
# Export all cases for a project into Markdown & metadata sidecars
npx @uarlouski/testrail-mcp-server cli export_cases_for_rag \
--project_id 1 \
--output_dir ./rag_exports
# Export specific cases by ID (comma-separated list)
npx @uarlouski/testrail-mcp-server cli export_cases_for_rag \
--case_ids C101,C102,103 \
--output_dir ./rag_exports
Command discovery & flag documentation
# List all available commands
npx @uarlouski/testrail-mcp-server cli --help
# Show parameter options for a specific tool
npx @uarlouski/testrail-mcp-server cli query_project --help
See the CLI & CI/CD guide for complete GitHub Actions, GitLab CI, and Jenkins workflows.
⚙️ Environment Variables & Security Controls
| Variable | Description | Required | Default |
|----------|-------------|:--------:|:-------:|
| 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_
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
97.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
75.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.4kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
88.0k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
