Skip to main content
Glama
testrail-mcp
by tmurraypt

testrail-mcp

An MCP (Model Context Protocol) server that connects Claude Desktop to the TestRail REST API. Manage your test projects, suites, cases, runs, results, and more — directly from Claude.

Installation

Claude Desktop

Add this to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "testrail": {
      "command": "npx",
      "args": ["-y", "github:tmurraypt/testrail-mcp"],
      "env": {
        "TESTRAIL_URL": "https://yourinstance.testrail.io",
        "TESTRAIL_EMAIL": "your@email.com",
        "TESTRAIL_API_KEY": "your-api-key"
      }
    }
  }
}

Replace the three env values with your own credentials, then restart Claude Desktop.

Getting a TestRail API Key

  1. Log in to your TestRail instance

  2. Go to My Settings (click your name in the top-right)

  3. Go to the API Keys tab

  4. Click Add Key, give it a name, and copy the generated key

Related MCP server: TestRail MCP Server

Available Tools

Projects

get_projects · get_project · add_project · update_project · delete_project

Suites

get_suites · get_suite · add_suite · update_suite · delete_suite

Sections

get_sections · get_section · add_section · update_section · delete_section

Cases

get_cases · get_case · add_case · update_case · delete_case · get_case_history

Runs

get_runs · get_run · add_run · update_run · close_run · delete_run

Tests & Results

get_tests · get_test · get_results · get_results_for_case · get_results_for_run · add_result · add_result_for_case · add_results_for_cases

Plans

get_plans · get_plan · add_plan · add_plan_entry · update_plan · close_plan · delete_plan

Milestones

get_milestones · get_milestone · add_milestone · update_milestone · delete_milestone

Users

get_users · get_user · get_user_by_email

Metadata

get_statuses · get_case_fields · get_case_types · get_priorities · get_result_fields · get_templates · get_configs

Development

npm install
npm run build

To test with the MCP Inspector:

npm run inspector

License

MIT

Available Tools

57 tools
add_caseC

Create a new test case in a section

Inputs: title (required), section_id (required), refs, type_id, +8 more.

add_milestoneC

Create a new milestone

Inputs: name (required), project_id (required), due_on, start_on, +2 more.

add_planC

Create a new test plan

Inputs: name (required), project_id (required), entries, description, +1 more.

add_plan_entryC

Add a new entry (suite configuration) to a test plan

Inputs: plan_id (required), suite_id (required), name, case_ids, +4 more.

add_projectC

Create a new TestRail project

Inputs: name (required), suite_mode, announcement, show_announcement.

add_resultD

Add a test result to a test

Inputs: test_id (required), status_id (required), comment, defects, +3 more.

add_result_for_caseC

Add a test result for a case in a run

Inputs: run_id (required), case_id (required), status_id (required), comment, +4 more.

add_results_for_casesC

Add multiple test results for cases in a run (bulk)

Inputs: run_id (required), results (required).

add_runC

Create a new test run

Inputs: name (required), project_id (required), refs, case_ids, +5 more.

add_sectionC

Create a new section

Inputs: name (required), project_id (required), suite_id, parent_id, +1 more.

add_suiteC

Create a new test suite

Inputs: name (required), project_id (required), description.

close_planB

Close a test plan (no further changes allowed after closing)

Inputs: plan_id (required).

close_runB

Close a test run (no further changes allowed after closing)

Inputs: run_id (required).

delete_caseB

Delete a test case (irreversible)

Inputs: case_id (required).

delete_milestoneB

Delete a milestone (irreversible)

Inputs: milestone_id (required).

delete_planB

Delete a test plan (irreversible)

Inputs: plan_id (required).

delete_projectA

Delete a TestRail project (irreversible)

Inputs: project_id (required).

delete_runB

Delete a test run (irreversible)

Inputs: run_id (required).

delete_sectionB

Delete a section (irreversible)

Inputs: section_id (required).

delete_suiteB

Delete a test suite (irreversible)

Inputs: suite_id (required).

get_caseB

Get a specific test case

Inputs: case_id (required).

get_case_fieldsB

Get available case fields (system and custom)

Inputs: no named parameters.

get_case_historyC

Get the change history for a test case

Inputs: case_id (required).

get_casesC

List test cases for a project with optional filters

Inputs: project_id (required), limit, offset, type_id, +8 more.

get_case_typesC

Get available case types

Inputs: no named parameters.

get_configsC

Get test configurations for a project

Inputs: project_id (required).

get_milestoneC

Get a specific milestone

Inputs: milestone_id (required).

get_milestonesC

List milestones for a project

Inputs: project_id (required), is_started, is_completed.

get_planA

Get a specific test plan (includes plan entries and runs)

Inputs: plan_id (required).

get_plansC

List test plans for a project

Inputs: project_id (required), limit, offset, created_by, +4 more.

get_prioritiesC

Get available priority levels

Inputs: no named parameters.

get_projectB

Get a specific TestRail project

Inputs: project_id (required).

get_projectsC

List all TestRail projects

Inputs: is_completed.

get_result_fieldsC

Get available result fields

Inputs: no named parameters.

get_resultsC

Get results for a specific test

Inputs: test_id (required), limit, offset, status_id.

get_results_for_caseC

Get results for a specific test case in a run

Inputs: run_id (required), case_id (required), limit, offset, +1 more.

get_results_for_runC

Get all results for a test run

Inputs: run_id (required), limit, offset, status_id, +3 more.

get_runC

Get a specific test run

Inputs: run_id (required).

get_runsC

List test runs for a project

Inputs: project_id (required), limit, offset, suite_id, +5 more.

get_sectionC

Get a specific section

Inputs: section_id (required).

get_sectionsA

List sections in a project (optionally filtered by suite)

Inputs: project_id (required), suite_id.

get_statusesB

Get available test statuses (passed, failed, etc.)

Inputs: no named parameters.

get_suiteC

Get a specific test suite

Inputs: suite_id (required).

get_suitesC

List test suites for a project

Inputs: project_id (required).

get_templatesB

Get available case templates for a project

Inputs: project_id (required).

get_testC

Get a specific test

Inputs: test_id (required).

get_testsC

List tests in a run

Inputs: run_id (required), status_id.

get_userC

Get a specific user

Inputs: user_id (required).

get_user_by_emailB

Look up a user by email address

Inputs: email (required).

get_usersB

List all users (admins) or users for a project (non-admins)

Inputs: project_id.

update_caseC

Update a test case

Inputs: case_id (required), refs, title, type_id, +8 more.

update_milestoneD

Update a milestone

Inputs: milestone_id (required), name, due_on, start_on, +4 more.

update_planD

Update a test plan

Inputs: plan_id (required), name, description, milestone_id.

update_projectC

Update an existing TestRail project

Inputs: project_id (required), name, announcement, is_completed, +1 more.

update_runD

Update a test run

Inputs: run_id (required), name, case_ids, description, +2 more.

update_sectionD

Update a section

Inputs: section_id (required), name, description.

update_suiteC

Update a test suite

Inputs: suite_id (required), name, description.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 57 tools

    Disambiguation4/5

    Most tools target distinct resource/action pairs, and the naming makes the primary entities clear. The main overlap is among result-related tools (get_results, get_results_for_case, get_results_for_run, add_result, add_result_for_case, add_results_for_cases), which require careful reading to select correctly.

    Naming Consistency5/5

    The tool set follows a highly predictable verb_noun pattern: get_/add_/update_/delete_ plus resource, with plural forms for list operations. Close_run and close_plan are appropriate domain-specific lifecycle verbs rather than inconsistencies.

    Tool Count2/5

    At 57 tools, the surface is very large for an agent-facing MCP server and exceeds the typical practical range. While TestRail is a broad domain, many tools could be consolidated or grouped behind fewer parameterized operations.

    Completeness4/5

    Coverage is strong across projects, suites, sections, cases, runs, results, milestones, plans, users, and metadata fields. Minor lifecycle gaps remain, such as updating/deleting individual plan entries and broader attachment/history operations.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      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.
      18
      29 npm
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to interact directly with TestRail instances for managing test projects, suites, cases, runs, results, plans, milestones, and attachments through the TestRail API with secure authentication.
      77
      65 npm
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to interact with TestRail test management system, supporting full CRUD operations on projects, suites, sections, test cases, runs, results, plans, and milestones.
      35
      409 npm
      1
      MIT