TestRail MCP 服务器
TestRail 的模型上下文协议 (MCP) 服务器允许通过标准化协议与 TestRail 的核心实体进行交互。
特征
- 使用 TestRail API 进行身份验证
- 访问 TestRail 实体:
- 项目
- 案例
- 运行
- 结果
- 数据集
- 全面支持模型上下文协议
- 与任何 MCP 客户端兼容(Claude Desktop、Cursor、Windsurf 等)
与 Octomind MCP 一起查看实际运行情况
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 testrail-mcp:
手动安装
- 克隆此存储库:
- 创建并激活虚拟环境:
- 安装依赖项:
配置
TestRail MCP 服务器需要特定的环境变量来与您的 TestRail 实例进行身份验证。这些变量必须在运行服务器之前设置。
- 在项目根目录下创建
.env
文件:重要提示:TESTRAIL_URL
应该是您的 TestRail 实例的完整 URL(例如,https://example.testrail.io
://example.testrail.io)TESTRAIL_USERNAME
是您用于登录的 TestRail 电子邮件地址TESTRAIL_API_KEY
是您的 TestRail API 密钥(不是您的密码)- 要生成 API 密钥,请登录 TestRail,转到“我的设置”>“API 密钥”并创建新密钥
- 验证配置是否正确加载:这将显示您的 TestRail 配置信息,包括您的 URL、用户名以及 API 密钥的前几个字符以供验证。
如果您将此服务器与 Claude Desktop 或 Cursor 等客户端一起使用,请确保运行服务器的进程可以访问环境变量。您可能需要在系统环境中设置这些变量,或者确保它们从.env
文件加载。
用法
运行服务器
可以使用安装的脚本直接运行服务器:
这将以 stdio 模式启动 MCP 服务器,可与支持 stdio 通信的 MCP 客户端一起使用。
与 MCP 客户端一起使用
克劳德桌面
在 Claude Desktop 中,添加具有以下配置的新服务器:
光标
在 Cursor 中,添加一个新的自定义工具,其配置如下:
风帆冲浪
在 Windsurf 中,添加一个具有以下配置的新工具:
使用 MCP Inspector 进行测试
为了进行测试和调试,您可以使用 MCP Inspector:
这将打开一个 Web 界面,您可以在其中探索和测试所有可用的工具和资源。
发展
该服务器使用以下方式构建:
- FastMCP - 用于构建 MCP 服务器的 Python 框架
- 请求- 用于与 TestRail API 进行 HTTP 通信
- python-dotenv - 用于环境变量管理
执照
麻省理工学院
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器允许通过与 Claude Desktop 等 MCP 客户端兼容的标准化协议与 TestRail 的核心实体(项目、案例、运行、结果、数据集)进行交互。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that integrates with the Qase test management platform, allowing users to create and retrieve test cases, manage test runs, and interact with Qase projects.Last updated -31JavaScript
- AsecurityFlicenseAqualityA Model Context Protocol server that enables executing and interacting with JMeter tests through MCP-compatible clients like Claude Desktop, Cursor, and Windsurf.Last updated -2Python
- AsecurityFlicenseAqualityA testing server that demonstrates Model Context Protocol features, providing access to user data, todos, and system information through resources, tools for user management and calculations, and prompt templates for various analyses.Last updated -4TypeScript
- -securityFlicense-qualityA simple server for testing Model Context Protocol (MCP) that serves CSV and image resources, allowing developers to test MCP implementations with sample data via SSE transport.Last updated -9JavaScript