Skip to main content
Glama
bun913

TestRail MCP Server

by bun913

TestRail MCP 服务器

此模型上下文协议 (MCP) 服务器提供了一些工具,用于直接从 Claude AI 和其他支持 MCP 的客户端(如 Cursor)与 TestRail 进行交互。它允许你在不离开与 AI 对话的情况下管理测试用例、项目、套件、运行等。

可用工具

TestRail MCP 服务器提供以下工具:

类别

工具

项目

getProjects, getProject

套件

getSuites, getSuite, addSuite, updateSuite

用例

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

章节

getSection, getSections, addSection, moveSection, updateSection, deleteSection

运行

getRuns, getRun, addRun, updateRun

测试

getTests, getTest

结果

getResults, getResultsForCase, getResultsForRun, addResultForCase, addResultsForCases

计划

getPlans

里程碑

getMilestones

共享步骤

getSharedSteps

Related MCP server: TestRail MCP Server

使用方法

你可以通过如下设置连接此 MCP 服务器。此方法使用 npx 自动下载并运行最新版本的包,无需本地安装。

// 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
      }
    }
  }
}

故障排除

  • spawn node ENOENT 错误:确保已正确安装 Node.js 并将其添加到 PATH 中。

  • 身份验证问题:检查你的 TestRail API 凭据。

  • 对话过长:对于测试用例和章节,请使用 limitoffset 参数进行分页查询。

  • 创建/更新测试用例时出现 HTTP 400 错误:TestRail 项目具有不同的模板、自定义字段和必填字段。此 MCP 服务器直接将你的参数传递给 TestRail API,它不会验证或转换这些参数。如果遇到 400 错误,请在 CLAUDE.mdAGENTS.md 中定义项目的规则,以便 LLM 发送正确的参数。例如:

    # 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

贡献

欢迎贡献!请随时提交 Pull Request。

致谢

Install Server
A
license - permissive license
A
quality
F
maintenance

Maintenance

Maintainers
1dResponse time
2wRelease cycle
20Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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
    43
    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
    93
    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
    1,334
    MIT

View all related MCP servers

Related MCP Connectors

  • Official MCP server for Qase — manage test cases, runs, suites, defects via AI tools.

  • MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.

  • Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bun913/mcp-testrail'

If you have feedback or need assistance with the MCP directory API, please join our Discord server