ST

sker65/testrail-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

20 stars 35 forks 质量 66 趋势 10MIT

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:

手动安装

  1. 克隆此仓库:

  2. 创建并激活虚拟环境:

  3. 安装依赖:

配置

TestRail MCP 服务器需要特定的环境变量来与你的 TestRail 实例进行认证。这些变量必须在运行服务器之前设置好。

  1. 在项目根目录中创建一个 .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

  1. Clone this repository:

    git clone https://github.com/yourusername/testrail-mcp.git
    cd testrail-mcp
    
  2. Create and activate a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  3. 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.

  1. Create a .env file in the root directory of the project:

    TESTRAIL_URL=https://your-instance.testrail.io
    [email protected]
    TESTRAIL_API_KEY=your-api-key
    

    Important Notes:

    • TESTRAIL_URL should be the full URL to your TestRail instance (e.g., https://example.testrail.io)
    • TESTRAIL_USERNAME is your TestRail email address used for login
    • TESTRAIL_API_KEY is 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
  2. Verify that the configuration is loaded correctly:

    uvx testrail-mcp --config
    

    This 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": {
在 GitHub 查看完整 README

安装

uvx testrail-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }