Testrail Mcp Server

Created By
uarlouski3 months ago
A high-performance Model Context Protocol (MCP) server connecting AI assistants (Claude, Cursor, Windsurf) directly to TestRail.
Overview

🚀 TestRail MCP Server

A high-performance Model Context Protocol (MCP) server connecting AI assistants (Claude, Cursor, Windsurf) directly to TestRail.
Seamlessly search, create, update, and execute test cases using natural language.

npm version npm downloads CI Status License TypeScript GitHub stars


🌟 Why Choose TestRail MCP Server?

Managing 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.

No context switching. No tedious copy-pasting. Just ask your AI.

✨ Key Features & Capabilities

CapabilityDescription
🔍 Intelligent DiscoveryBrowse projects, test suites, and sections to automatically map your QA organization.
📋 Full Case ManagementFetch, create, update, and bulk-edit test cases with comprehensive custom field support.
▶️ Actionable ExecutionCreate test runs, update results by test_id or case_id, attach files, and track statuses.
🧠 Context-Aware AIDynamically exposes templates, fields, priorities, and statuses so LLMs generate valid, structured data.

🚀 Quick Start Guide

1. Obtain Your TestRail API Key

Navigate to My Settings → API Keys in your TestRail platform and generate a new key for authentication.

2. Configure Your MCP Client

Add the server to your chosen MCP client configuration. Below are examples for popular AI IDEs and assistants:

🤖 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"
      }
    }
  }
}
⌨️ Cursor

Open Settings → Features → MCP and add a new configuration:

{
  "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"
      }
    }
  }
}
🌊 Windsurf

Update your Windsurf MCP configuration file:

{
  "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"
      }
    }
  }
}
🌐 Other MCP Clients

Any MCP-compliant client can utilize this server. The pattern is universal—point your client at the npx command with the required environment variables.

3. See It in Action

Once configured, turbo-charge your QA workflow by asking your AI assistant:

  • "List all projects in TestRail to find the latest active project."
  • "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 ID 1042 as passed with the comment 'Tested successfully on staging'."

⚙️ Environment Variables

VariableDescriptionRequired
TESTRAIL_INSTANCE_URLYour TestRail instance URL (e.g., https://example.testrail.io)
TESTRAIL_USERNAMEYour TestRail user email address
TESTRAIL_API_KEYYour TestRail API key (Guide)

🛠️ Complete Tool Reference

The TestRail MCP Server provides heavily typed, descriptive tools designed specifically for LLM interaction:

🔭 Discovery & Navigation

ToolFunctionality
get_projectsList all available active and completed projects in your instance.
get_sectionsNavigate the precise folder/section hierarchy of any test suite.

📋 Test Case Management

ToolFunctionality
get_casesQuery test cases with advanced filtering (priority, template, type, etc.) and pagination.
get_caseFetch complete, structured details of a specific test case, including custom steps and fields.
create_caseSeamlessly create a new test case equipped with robust custom field validation.
update_caseModify an existing test case's steps, metadata, or titles.
update_casesExecute bulk-updates on multiple test cases simultaneously to save time.

▶️ Test Execution & Tracking

ToolFunctionality
add_runGenerate a new, focused test run directly in TestRail.
get_testsRetrieve individual tests for a specific test run, with optional status filtering.
add_resultsSubmit test results to a test run using the specific test_id.
add_results_for_casesSubmits results to a run mapping directly to case_ids, streamlining automation workflows.
add_attachment_to_runAttach logs, files, or zipped artifacts directly to an ongoing test run.

🧠 System Metadata

ToolFunctionality
get_statusesSystematically list all configured test statuses (Passed, Failed, Blocked, Retest, etc.).
get_prioritiesRetrieve priority levels configured within your instance structure.
get_case_fieldsDiscover custom field definitions, formats, and UI dropdown options.
get_templatesIdentify available case templates to mandate correct AI structuring.

🤝 Contributing

Open-source contributions are actively welcomed! Please feel free to open an issue for feature requests or submit a pull request for improvements.

📜 License

This project is securely licensed under the Apache License 2.0.


TestRail MCP Server · Engineered with the Model Context Protocol

Keywords: TestRail MCP Server, Model Context Protocol, TestRail API Integration, AI Test Management, LLM Testing Tools, Claude TestRail Plugin, Cursor TestRail, Windsurf QA Tool, Test Case Automation, QA AI Assistant, MCP Server Developer Tools, Prompt Engineering TestRail, Test Run Tracking, QA Productivity Automation.

Server Config

{
  "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"
      }
    }
  }
}
Project Info
Created At
3 months ago
Updated At
3 months ago
Author Name
uarlouski
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Docwand

14 hours ago
//beforeyouship — LLM Cost Modeling From Your Editor
@Indiegoing

Query realistic LLM cost models without leaving your editor. beforeyouship models the **true monthly cost** of an LLM app architecture — retries, prompt caching, batch discounts, infra overhead, and 3×/10× growth — across GPT-5.x, Claude, Gemini, DeepSeek, and more. Not a token calculator: a planning tool for the design phase, before you commit to a stack. **No API key needed to try it** — demo mode covers the six free-tier models. A Pro key from [beforeyouship.dev](https://beforeyouship.dev) unlocks the full 18-model catalog. ## What you can ask - "How much will a RAG chatbot cost at 10,000 requests/day?" - "Compare Claude Haiku vs Gemini Flash pricing for my workload" - "What's the cheapest model for a multi-step agent at scale?" - "Show me current per-token prices for Anthropic models" ## Tools ### `estimate_cost` Full cost model for an architecture at a given usage level. Returns Naive / Realistic / Worst Case monthly cost per model, 3×/10× growth scenarios, and an opinionated recommendation with reasoning. ### `get_model_prices` Current per-1M-token pricing — input, output, cached input, batch — with context windows and staleness metadata. ### `list_archetypes` Seven preset architecture patterns (simple chatbot, chatbot with history, RAG pipeline, multi-model router, coding assistant, document processor, multi-step agent) used as starting points for estimates. ## Setup **Claude Code:** ​```bash claude mcp add --transport http beforeyouship https://beforeyouship.dev/api/mcp ​``` **Cursor / other clients** — add a remote server: ​```json { "mcpServers": { "beforeyouship": { "type": "streamable-http", "url": "https://beforeyouship.dev/api/mcp" } } } ​``` Add an `Authorization: Bearer bys_...` header with a Pro key for the full catalog. ## Try it > Estimate the monthly cost of a RAG pipeline at 10,000 requests/day

14 hours ago