
sker65/testrail-mcp 是从 https://github.com/sker65/testrail-mcp. 导入的 MCP 服务器候选
概览
sker65/testrail-mcp 是从 https://github.com/sker65/testrail-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一款适用于TestRail的模型上下文协议(MCP)服务器,允许通过标准化协议与TestRail核心实体交互。
特色
- 使用TestRail API进行认证
- 访问TestRail实体:
- 项目
- 案例
- 跑动
- 结果
- 数据集
- 完全支持 Model Context 协议
- 兼容任何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)TESTRAIL_USERNAME是你用于登录的TestRail邮箱地址TESTRAIL_API_KEY是你的TestRail API密钥(不是密码)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
TestRail MCP Server
A Model Context Protocol (MCP) server for TestRail that allows interaction with TestRail’s core entities through a standardized protocol.
Features
- Authentication with TestRail API
- Access to TestRail entities:
- Projects
- Cases
- Runs
- Results
- Datasets
- Full support for the Model Context Protocol
- Compatible with any MCP client (Claude Desktop, Cursor, Windsurf, etc.)
See it in action together with Octomind MCP
Installation
Installing via Smithery
To install testrail-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @sker65/testrail-mcp --client claude
Manual Installation
-
Clone this repository:
git clone https://github.com/yourusername/testrail-mcp.git cd testrail-mcp -
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate -
Install dependencies:
pip install -e .
Configuration
The TestRail MCP server requires specific environment variables to authenticate with your TestRail instance. These must be set before running the server.
-
Create a
.envfile in the root directory of the project:TESTRAIL_URL=https://your-instance.testrail.io [email protected] TESTRAIL_API_KEY=your-api-keyImportant Notes:
TESTRAIL_URLshould be the full URL to your TestRail instance (e.g.,https://example.testrail.io)TESTRAIL_USERNAMEis your TestRail email address used for loginTESTRAIL_API_KEYis your TestRail API key (not your password)- To generate an API key, log in to TestRail, go to “My Settings” > “API Keys” and create a new key
-
Verify that the configuration is loaded correctly:
uvx testrail-mcp --configThis will display your TestRail configuration information, including your URL, username, and the first few characters of your API key for verification.
If you’re using this server with a client like Claude Desktop or Cursor, make sure the environment variables are accessible to the process running the server. You may need to set these variables in your system environment or ensure they’re loaded from the .env file.
Usage
Running the Server
The server can be run directly using the installed script:
uvx testrail-mcp
This will start the MCP server in stdio mode, which can be used with MCP clients that support stdio communication.
Using with MCP Clients
Claude Desktop
In Claude Desktop, add a new server with the following configuration:
{
"mcpServers": {
安装
uvx testrail-mcp配置
{
"mcpServers": {
"testrail": {
"command": "uvx",
"args": [
"testrail-mcp"
],
"env": {
"TESTRAIL_URL": "https://your-instance.testrail.io",
"TESTRAIL_USERNAME": "[email protected]",
"TESTRAIL_API_KEY": "your-api-key"
}
}
}
}