Skip to main content
Glama
TestRail MCP Server

TestRail MCP Server

by bun913

TestRail MCP-Server

Dieser Model Context Protocol (MCP)-Server bietet Tools für die Interaktion mit TestRail direkt aus Claude AI und anderen MCP-unterstützten Clients wie Cursor heraus. Er ermöglicht es Ihnen, Testfälle, Projekte, Suiten, Läufe und mehr zu verwalten, ohne Ihr Gespräch mit der KI zu verlassen.

Verfügbare Tools

Der TestRail MCP-Server bietet die folgenden Tools:

Kategorie

Tools

Projekte

getProjects, getProject

Suiten

getSuites, getSuite, addSuite, updateSuite

Fälle

getCase, getCases, addCase, updateCase, deleteCase, getCaseTypes, getCaseFields, copyToSection, moveToSection, getCaseHistory, updateCases, addBdd, getBdd

Abschnitte

getSection, getSections, addSection, moveSection, updateSection, deleteSection

Läufe

getRuns, getRun, addRun, updateRun

Tests

getTests, getTest

Ergebnisse

getResults, getResultsForCase, getResultsForRun, addResultForCase, addResultsForCases

Pläne

getPlans

Meilensteine

getMilestones

Geteilte Schritte

getSharedSteps

Related MCP server: TestRail MCP Server

Verwendung

Sie können diesen MCP-Server verbinden, indem Sie die folgende Einstellung vornehmen. Diese Methode verwendet npx, um automatisch die neueste Version des Pakets herunterzuladen und auszuführen, wodurch eine lokale Installation nicht erforderlich ist.

// Example configuration using npx
{
  "mcpServers": {
    "testrail": {
      "command": "npx",
      "args": ["@bun913/mcp-testrail@latest"],
      "env": {
        "TESTRAIL_URL": "https://your-instance.testrail.io", // Replace with your TestRail URL
        "TESTRAIL_USERNAME": "your-email@example.com", // Replace with your TestRail username
        "TESTRAIL_API_KEY": "YOUR_API_KEY" // Replace with your TestRail API key
      }
    }
  }
}

Fehlerbehebung

  • spawn node ENOENT-Fehler: Stellen Sie sicher, dass Node.js korrekt installiert ist und sich in Ihrem PATH befindet.

  • Authentifizierungsprobleme: Überprüfen Sie Ihre TestRail-API-Anmeldedaten.

  • Ihr Gespräch ist zu lang: Verwenden Sie die Parameter limit und offset für Testfälle und Abschnitte, um Ergebnisse zu paginieren.

  • HTTP 400-Fehler beim Erstellen/Aktualisieren von Testfällen: TestRail-Projekte haben unterschiedliche Vorlagen, benutzerdefinierte Felder und Pflichtfelder. Dieser MCP-Server übergibt Ihre Parameter direkt an die TestRail-API – er validiert oder transformiert sie nicht. Wenn Sie auf 400-Fehler stoßen, definieren Sie die Regeln Ihres Projekts in CLAUDE.md oder AGENTS.md, damit das LLM die korrekten Parameter sendet. Zum Beispiel:

    # TestRail Rules for This Project
    - Project ID: 1
    - Always use template 2 (Separated Steps) when creating test cases
      - Use `customStepsSeparated` (array of step objects)
      - Do NOT send `customSteps` or `customExpected` with template 2
    - Required custom fields: custom_automation_type (default: 0)
    - Call `getCaseFields` at the start of a session to check available fields

Mitwirken

Beiträge sind willkommen! Bitte zögern Sie nicht, einen Pull Request einzureichen.

Danksagungen

Available Tools

42 tools
addBddA

Imports/uploads a .feature file (Gherkin BDD scenario) into a TestRail section. Creates a new test case with BDD template (template_id=4) and populates the custom_testrail_bdd_scenario field. REQUIRED: sectionId, featureContent (raw Gherkin text including Feature:, Scenario:, Given/When/Then).

Inputs: sectionId (required), featureContent (required).

addCaseA

Creates a new test case in TestRail. REQUIRED: sectionId, title. OPTIONAL: typeId, priorityId, templateId, customSteps, customExpected, customStepsSeparated, customFields, etc. Use getCaseTypes to find valid typeId values. NOTE: templateId=2 is required to use customStepsSeparated (array of step objects with 'content' and 'expected' fields). For simple text steps, use customSteps and customExpected instead. Use customFields for any additional custom fields (e.g., {custom_case_security_score: 'high'}).

Inputs: sectionId (required), title (required), typeId, priorityId, +9 more.

addPlanB

Creates a new test plan in a TestRail project / TestRailプロジェクトに新しいテストプランを作成します

Inputs: projectId (required), name (required), description, milestoneId, +1 more.

addPlanEntryB

Adds a new test plan entry to an existing test plan / 既存のテストプランに新しいテストプランエントリーを追加します

Inputs: planId (required), suiteId (required), name, description, +6 more.

addResultForCaseB

Adds a test result for a specific test case in a test run / テスト実行内の特定のテストケースにテスト結果を追加します

Inputs: runId (required), caseId (required), statusId, comment, +4 more.

addResultsForCasesB

Adds test results for multiple test cases in a test run / テスト実行内の複数のテストケースにテスト結果を追加します

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

addRunC

Creates a new test run in a TestRail project / TestRailプロジェクトに新しいテスト実行を作成します

Inputs: projectId (required), name (required), suiteId, description, +6 more.

addRunToPlanEntryC

Adds a new test run to an existing plan entry / 既存のプランエントリーに新しいテストランを追加します

Inputs: planId (required), entryId (required), configIds (required), description, +4 more.

addSectionB

Creates a new section in a TestRail project / TestRailプロジェクトに新しいセクションを作成します

Inputs: projectId (required), name (required), description, parentId, +1 more.

addSuiteB

Creates a new test suite in the specified project / 指定されたプロジェクトに新しいテストスイートを作成します

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

copyToSectionA

Copies specified test cases to a target section while keeping the originals / 指定されたテストケースを対象のセクションにコピーし、元のケースは保持します

Inputs: caseIds (required), sectionId (required).

deleteCaseB

Deletes a test case from TestRail / TestRailからテストケースを削除します

Inputs: caseId (required).

deleteSectionB

Deletes a section / セクションを削除します

Inputs: sectionId (required), soft.

getBddB

Exports a BDD test case as a .feature file in Gherkin format. REQUIRED: caseId.

Inputs: caseId (required).

getCaseA

Retrieves complete details for a single test case including steps, expected results, and prerequisites. REQUIRED: caseId.

Inputs: caseId (required).

getCaseFieldsA

Retrieves all available test case fields in TestRail / TestRailで利用可能な全テストケースフィールドを取得します

Inputs: no named parameters.

getCaseHistoryA

Retrieves the change history of a test case including updates to fields and custom fields / テストケースの変更履歴(フィールドとカスタムフィールドの更新を含む)を取得します

Inputs: caseId (required).

getCasesA

Retrieves test cases list with basic fields only (excludes steps/expected results for performance). REQUIRED: projectId, suiteId. OPTIONAL: createdBy, filter, limit (default 50), milestoneId, offset (default 0), priorityId, refs, sectionId, templateId, typeId, updatedBy, labelId. Use getCase for full details.

Inputs: projectId (required), suiteId (required), createdBy, filter, +10 more.

getCaseTypesA

Retrieves all available test case types in TestRail / TestRailで利用可能な全テストケースタイプを取得します

Inputs: no named parameters.

getMilestonesB

Retrieves all milestones for a specified TestRail project / 指定されたTestRailプロジェクトの全マイルストーンを取得します

Inputs: projectId (required).

getPlansB

Retrieves all test plans for a specified TestRail project / 指定されたTestRailプロジェクトの全テストプランを取得します

Inputs: projectId (required).

getProjectB

Retrieves details of a specific TestRail project by ID / 特定のTestRailプロジェクトの詳細をIDで取得します

Inputs: projectId (required).

getProjectsA

Retrieves all TestRail projects / すべてのTestRailプロジェクトを取得します

Inputs: no named parameters.

getResultsC

Retrieves test results for a specific test / 特定のテストのテスト結果を取得します

Inputs: testId (required), limit, offset, statusId, +1 more.

getResultsForCaseC

Retrieves test results for a specific test case in a test run / テスト実行内の特定のテストケースのテスト結果を取得します

Inputs: runId (required), caseId (required), limit, offset, +2 more.

getResultsForRunB

Retrieves all test results for a test run / テスト実行の全テスト結果を取得します

Inputs: runId (required), limit, offset, statusId, +1 more.

getRunA

Retrieves details of a specific test run by ID / 特定のテスト実行の詳細をIDで取得します

Inputs: runId (required).

getRunsB

Retrieves all test runs for a specified TestRail project / 指定されたTestRailプロジェクトの全テスト実行を取得します

Inputs: projectId (required), createdAfter, createdBefore, createdBy, +4 more.

getSectionB

Retrieves details of a specific section by ID / 特定のセクションの詳細をIDで取得します

Inputs: sectionId (required).

getSectionsA

Retrieves sections for a specified project and suite. Supports pagination via limit and offset parameters (default: limit=250, offset=0). Use _links.next to determine if more pages are available. / 指定されたプロジェクトとスイートのセクションを取得します。limitとoffsetパラメータでページネーションをサポートします。

Inputs: projectId (required), suiteId, limit, offset.

getSharedStepsC

Retrieves all shared steps for a specified TestRail project / 指定されたTestRailプロジェクトの全共有ステップを取得します

Inputs: projectId (required), createdAfter, createdBefore, createdBy, +5 more.

getSuiteB

Retrieves details of a specific test suite by ID / 特定のテストスイートの詳細をIDで取得します

Inputs: suiteId (required).

getSuitesA

Retrieves all test suites for a specified TestRail project / 指定されたTestRailプロジェクトの全テストスイートを取得します

Inputs: projectId (required).

getTestA

Retrieves complete details for a single test, including all fields such as status, type, and results / 単一のテストの完全な詳細(ステータス、タイプ、結果などのすべてのフィールドを含む)を取得します

Inputs: testId (required).

getTestsB

Retrieves a list of tests for a test run / テスト実行に含まれるテスト一覧を取得します

Inputs: runId (required), limit, offset.

moveSectionC

Moves a section to a new position in the test hierarchy / テスト階層内の新しい位置にセクションを移動します

Inputs: sectionId (required), parentId (required), afterId.

moveToSectionB

Moves specified test cases to a target section / 指定されたテストケースを対象のセクションに移動します

Inputs: caseIds (required), sectionId (required).

updateCaseA

Updates an existing test case. REQUIRED: caseId. OPTIONAL: title, typeId, priorityId, templateId, customSteps, customExpected, customStepsSeparated, customFields, etc. Only specified fields will be updated. NOTE: templateId=2 is required to use customStepsSeparated (array of step objects with 'content' and 'expected' fields). For simple text steps, use customSteps and customExpected instead. Use customFields for any additional custom fields (e.g., {custom_case_security_score: 'high'}).

Inputs: caseId (required), title, typeId, priorityId, +9 more.

updateCasesA

Updates multiple test cases simultaneously with the same field values / 複数のテストケースを同じフィールド値で一括更新します. NOTE: templateId=2 is required to use customStepsSeparated (array of step objects with 'content' and 'expected' fields). For simple text steps, use customSteps and customExpected instead. Use customFields for any additional custom fields (e.g., {custom_case_security_score: 'high'}).

Inputs: projectId (required), suiteId (required), caseIds (required), title, +11 more.

updateRunB

Updates an existing test run / 既存のテスト実行を更新します

Inputs: runId (required), name, description, milestoneId, +4 more.

updateSectionC

Updates an existing section / 既存のセクションを更新します

Inputs: sectionId (required), name, description.

updateSuiteB

Updates an existing test suite / 既存のテストスイートを更新します

Inputs: suiteId (required), name, description.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 42 tools

    Disambiguation5/5

    Each tool targets a distinct entity or operation, with clear differentiation between similar tools (e.g., copyToSection vs moveToSection, getResultsForCase vs getResultsForRun). Descriptions explicitly state required and optional parameters, reducing ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent camelCase verb_noun pattern (e.g., addCase, getCases, deleteSection). Even compound operations like copyToSection and moveToSection follow a predictable structure. No mixing of conventions.

    Tool Count4/5

    42 tools is on the higher end but appropriate for a comprehensive TestRail API wrapper covering CRUD for cases, sections, suites, runs, plans, results, and metadata. The count could be slightly trimmed (e.g., merging some getters), but it remains manageable for the domain.

    Completeness3/5

    The tool surface covers most core CRUD operations for projects, suites, sections, cases, runs, and plans. However, notable gaps exist: missing delete for suites, plans, and runs, and no update for plans. Also absent are tools for milestones (get only), users, and attachments.

    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