{
  "markdown": "<div align=\"center\">\n  <h1>🚀 TestRail MCP Server</h1>\n  <p>\n    <strong>An open-source Model Context Protocol (MCP) server that connects Claude, Cursor, Windsurf, and other AI assistants directly to TestRail.</strong>\n  </p>\n  <p>\n    Manage TestRail projects, search and create test cases, kick off test runs, record results, and attach files — all through natural-language conversation with your AI assistant. Built for QA engineers and AI-assisted test automation.\n  </p>\n</div>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@uarlouski/testrail-mcp-server\"><img src=\"https://badge.fury.io/js/@uarlouski%2Ftestrail-mcp-server.svg\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/@uarlouski/testrail-mcp-server\"><img src=\"https://img.shields.io/npm/dm/@uarlouski/testrail-mcp-server.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://github.com/uarlouski/testrail-mcp-server/actions/workflows/ci.yml\"><img src=\"https://github.com/uarlouski/testrail-mcp-server/actions/workflows/ci.yml/badge.svg\" alt=\"CI Status\"></a>\n  <a href=\"https://opensource.org/licenses/Apache-2.0\"><img src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\" alt=\"License\"></a>\n  <a href=\"https://www.typescriptlang.org/\"><img src=\"https://img.shields.io/badge/TypeScript-5.9-blue.svg\" alt=\"TypeScript\"></a>\n  <a href=\"https://github.com/uarlouski/testrail-mcp-server\"><img src=\"https://img.shields.io/github/stars/uarlouski/testrail-mcp-server.svg?style=social&label=Star\" alt=\"GitHub stars\"></a>\n  <a href=\"https://glama.ai/mcp/servers/uarlouski/testrail-mcp-server\"><img src=\"https://glama.ai/mcp/servers/uarlouski/testrail-mcp-server/badges/score.svg\" alt=\"Score Badge\"></a>\n</p>\n\n<p align=\"center\">\n  <strong>Compatible with:</strong>\n  <img src=\"https://img.shields.io/badge/Claude%20Desktop-D97757?logo=anthropic&logoColor=white\" alt=\"Claude Desktop\">\n  <img src=\"https://img.shields.io/badge/Cursor-000000?logo=cursor&logoColor=white\" alt=\"Cursor\">\n  <img src=\"https://img.shields.io/badge/Windsurf-19A1BC?logo=codeium&logoColor=white\" alt=\"Windsurf\">\n  <img src=\"https://img.shields.io/badge/VS%20Code-007ACC?logo=visualstudiocode&logoColor=white\" alt=\"VS Code\">\n</p>\n\n<!-- TODO: insert demo.gif — short screencast of asking \"create a test case\" in Claude or Cursor and seeing the case appear in TestRail -->\n\n---\n\n## 🌟 Why Choose TestRail MCP Server?\n\nManaging test cases manually is tedious and error-prone. With the **TestRail MCP Server**, your AI assistant (whether it’s **Claude, Cursor, Windsurf**, or any MCP-compliant client) interacts directly with your TestRail instance. Instruct it to find test cases, draft new ones, kick off test runs, and record test results—all through natural conversation.\n\n**No context switching. No tedious copy-pasting. Just ask your AI.**\n\n> [!NOTE]\n> **Compatibility Baseline**: The primary baseline version this MCP server is tested and validated against is **TestRail 10.6.2** (API v2). Older TestRail instances (including pre-7.x pagination) are also supported via built-in backward compatibility.\n\n## ✨ Key Features & Capabilities\n\n| Capability | Description |\n|------------|-------------|\n| **🔍 Intelligent Discovery** | Browse projects, test suites, and sections to automatically map your QA organization. |\n| **📋 Full Case Management** | Fetch, create, update, and bulk-edit test cases with comprehensive custom field support. |\n| **▶️ Actionable Execution** | Create test runs, update results by `test_id` or `case_id`, attach files, and track statuses. |\n| **🧠 Context-Aware AI** | Dynamically exposes templates, fields, priorities, and statuses so LLMs generate valid, structured data. |\n\n## 🚀 Quick Start Guide\n\n### 1. Obtain Your TestRail API Key\n\nNavigate to **My Settings → API Keys** in your TestRail platform and generate a new key for authentication.\n\n### 2. Configure Your MCP Client\n\nAdd the server to your chosen MCP client configuration. The Claude Desktop example is shown below; Cursor, Windsurf, and other clients use the same pattern (see the collapsible sections further down).\n\n#### 🤖 Claude Desktop\n\nAdd this to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"testrail\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@uarlouski/testrail-mcp-server@latest\"],\n      \"env\": {\n        \"TESTRAIL_INSTANCE_URL\": \"https://your-instance.testrail.io\",\n        \"TESTRAIL_USERNAME\": \"your@email.com\",\n        \"TESTRAIL_API_KEY\": \"your-api-key\",\n        \"TESTRAIL_ENABLE_SHARED_STEPS\": \"true\"\n      }\n    }\n  }\n}\n```\n\n<details>\n<summary><strong>⌨️ Cursor</strong></summary>\n\nOpen **Settings → Features → MCP** and add a new configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"testrail\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@uarlouski/testrail-mcp-server@latest\"],\n      \"env\": {\n        \"TESTRAIL_INSTANCE_URL\": \"https://your-instance.testrail.io\",\n        \"TESTRAIL_USERNAME\": \"your@email.com\",\n        \"TESTRAIL_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>🌊 Windsurf</strong></summary>\n\nUpdate your Windsurf MCP configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"testrail\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@uarlouski/testrail-mcp-server@latest\"],\n      \"env\": {\n        \"TESTRAIL_INSTANCE_URL\": \"https://your-instance.testrail.io\",\n        \"TESTRAIL_USERNAME\": \"your@email.com\",\n        \"TESTRAIL_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>🌐 Other MCP Clients</strong></summary>\n\nAny MCP-compliant client can utilize this server. The pattern is universal—point your client at the `npx` command with the required environment variables.\n</details>\n\n### 3. See It in Action\n\nOnce configured, turbo-charge your QA workflow by asking your AI assistant:\n\n- *\"List all projects in TestRail to find the latest active project.\"*\n- *\"Show me all active users in the project to find the right assignee.\"*\n- *\"Show me all test cases in section 5 of project 3.\"*\n- *\"Create a comprehensive test case for 'Login Validation' with detailed steps.\"*\n- *\"Start a new test run containing cases from section 5.\"*\n- *\"Mark test case ID 1042 as passed with the comment 'Tested successfully on staging'.\"*\n\n---\n\n## ⚙️ Environment Variables & Security Controls\n\n| Variable | Description | Required | Default |\n|----------|-------------|:--------:|:-------:|\n| `TESTRAIL_INSTANCE_URL` | Your TestRail instance URL (e.g., `https://example.testrail.io`) | ✅ | |\n| `TESTRAIL_USERNAME` | Your TestRail user email address | ✅ | |\n| `TESTRAIL_API_KEY` | Your TestRail API key ([Guide](https://support.testrail.com/hc/en-us/articles/7077039051412-Accessing-the-TestRail-API)) | ✅ | |\n| `TESTRAIL_ENABLE_SHARED_STEPS` | Set to `true` to enable Shared Steps management tools | | `false` |\n| `TESTRAIL_ENABLE_CASE_HISTORY` | Set to `true` to enable Case History and revision tracking tools | | `false` |\n| `TESTRAIL_ENABLE_RAG_TOOLS` | Set to `true` to enable experimental Knowledge Base / RAG export tools (`export_cases_for_rag`). Subject to breaking API changes. | | `false` |\n| `TESTRAIL_ALLOW_WRITE_OPERATIONS` | Allow write operations (e.g. adding/updating test cases, test runs, sections) | | `true` |\n| `TESTRAIL_ALLOW_READ_OPERATIONS` | Allow read operations (e.g. retrieving projects, test cases, templates) | | `true` |\n| `TESTRAIL_ALLOW_DELETE_OPERATIONS` | Allow delete operations (e.g. deleting cases or shared steps). Enabled strictly via `true`. | | `false` |\n| `TESTRAIL_ENABLE_DEPRECATED_TOOLS` | Enable deprecated tools for backward compatibility. Set to `false` to reduce context token overhead. | | `true` |\n| `TESTRAIL_DISABLED_TOOLS` | Comma-separated list of specific tool names to disable (e.g., `mutate_suite,delete_entity`). Fails if invalid tool names are specified. | | - |\n\n### ⚠️ Deprecation Lifecycle & Features Scheduled for Removal\n\nTo ensure smooth transitions, deprecated tools remain available by default (`TESTRAIL_ENABLE_DEPRECATED_TOOLS=true`) and will be removed in future major releases:\n\n| Deprecated Tool | Replacement | Status |\n|-----------------|-------------|--------|\n| `add_attachment_to_run` | `add_attachment` (`entity_type: \"case\" \\| \"run\"`) | Deprecated in `2.3.0`, scheduled for removal in `3.0.0` |\n| `get_sections` | `query_section` (`action: \"many\"`) | Deprecated in `2.8.0`, scheduled for removal in `3.0.0` |\n\n> **💡 Token Tip**: If you are not using legacy tools, set `TESTRAIL_ENABLE_DEPRECATED_TOOLS=false` in your environment to eliminate deprecated tool definitions from the LLM prompt and save tokens!\n\n---\n\n## 📚 Documentation & Complete Tool Reference\n\nFor a comprehensive guide, detailed configuration options, and a complete breakdown of all available tools, please visit our official documentation site:\n\n**👉 [TestRail MCP Server Documentation](https://uarlouski.github.io/testrail-mcp-server/)**\n\nThe documentation includes detailed explanations for:\n- 🔭 **Discovery & Navigation**: Exploring projects, suites, and sections.\n- 📋 **Test Case Management**: Fetching, creating, and bulk-updating test cases.\n- ▶️ **Execution & Tracking**: Managing test runs and submitting test results.\n- 📎 **Attachments**: Automatically zipping and uploading files or directories.\n- 🔗 **Shared Steps**: Managing reusable step definitions.\n\n\n---\n\n## 🤝 Contributing\nOpen-source contributions are actively welcomed! Please feel free to open an [issue](https://github.com/uarlouski/testrail-mcp-server/issues) for feature requests or submit a pull request for improvements.\n\n## 📜 License\nThis project is securely licensed under the [Apache License 2.0](LICENSE).\n\n---\n\n<p align=\"center\">\n  <b>TestRail MCP Server</b> · Engineered with the <a href=\"https://modelcontextprotocol.io\">Model Context Protocol</a>\n</p>\n",
  "bytes": 9763,
  "sha": "611e2aa58839081dda1dae802bf0a7127134d58e1aa408e88c423ea763fb2320",
  "repo_slug": "uarlouski/testrail-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_uarlouski_testrail_mcp_server_2889d8b3/readme"
}