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 - 用于环境变量管理
执照
麻省理工学院
You must be authenticated.
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 built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.Last updated -484TypeScript
- -security-license-qualityA specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.Last updated -1TypeScript
- -securityFlicense-qualityA starter template for building Model Context Protocol (MCP) servers, enabling developers to create and add custom tools that can be integrated with Claude Desktop.Last updated -TypeScript
- AsecurityAlicenseAqualityA simple server implementing the Model Context Protocol (MCP) that echoes messages back, designed for testing MCP clients.Last updated -1PythonMIT License