T

Testrail MCP Server

by uarlouski · io.github.uarlouski/testrail-mcp-server

AI-native Model Context Protocol (MCP) server for TestRail. Lets Claude, Cursor, Windsurf, and other AI assistants browse projects, create and update test cases, kick off test runs, and record results through natural-language conversation — with strongly-typed tool schemas and per-project custom field validation that helps LLMs generate valid TestRail requests on the first try.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-uarlouski-testrail-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@uarlouski/testrail-mcp-server"
      ],
      "env": {
        "TESTRAIL_INSTANCE_URL": "<VALUE>",
        "TESTRAIL_USERNAME": "<VALUE>",
        "TESTRAIL_API_KEY": "<YOUR_VALUE>",
        "TESTRAIL_ENABLE_SHARED_STEPS": "false",
        "TESTRAIL_ENABLE_CASE_HISTORY": "<VALUE>",
        "TESTRAIL_ENABLE_RAG_TOOLS": "<VALUE>",
        "TESTRAIL_ALLOW_WRITE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_READ_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_DELETE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ENABLE_DEPRECATED_TOOLS": "<VALUE>",
        "TESTRAIL_DISABLED_TOOLS": "<VALUE>",
        "TESTRAIL_REQUEST_TIMEOUT_MS": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-uarlouski-testrail-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@uarlouski/testrail-mcp-server"
      ],
      "env": {
        "TESTRAIL_INSTANCE_URL": "<VALUE>",
        "TESTRAIL_USERNAME": "<VALUE>",
        "TESTRAIL_API_KEY": "<YOUR_VALUE>",
        "TESTRAIL_ENABLE_SHARED_STEPS": "false",
        "TESTRAIL_ENABLE_CASE_HISTORY": "<VALUE>",
        "TESTRAIL_ENABLE_RAG_TOOLS": "<VALUE>",
        "TESTRAIL_ALLOW_WRITE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_READ_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_DELETE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ENABLE_DEPRECATED_TOOLS": "<VALUE>",
        "TESTRAIL_DISABLED_TOOLS": "<VALUE>",
        "TESTRAIL_REQUEST_TIMEOUT_MS": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-uarlouski-testrail-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@uarlouski/testrail-mcp-server"
      ],
      "env": {
        "TESTRAIL_INSTANCE_URL": "<VALUE>",
        "TESTRAIL_USERNAME": "<VALUE>",
        "TESTRAIL_API_KEY": "<YOUR_VALUE>",
        "TESTRAIL_ENABLE_SHARED_STEPS": "false",
        "TESTRAIL_ENABLE_CASE_HISTORY": "<VALUE>",
        "TESTRAIL_ENABLE_RAG_TOOLS": "<VALUE>",
        "TESTRAIL_ALLOW_WRITE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_READ_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_DELETE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ENABLE_DEPRECATED_TOOLS": "<VALUE>",
        "TESTRAIL_DISABLED_TOOLS": "<VALUE>",
        "TESTRAIL_REQUEST_TIMEOUT_MS": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-uarlouski-testrail-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@uarlouski/testrail-mcp-server"
      ],
      "env": {
        "TESTRAIL_INSTANCE_URL": "<VALUE>",
        "TESTRAIL_USERNAME": "<VALUE>",
        "TESTRAIL_API_KEY": "<YOUR_VALUE>",
        "TESTRAIL_ENABLE_SHARED_STEPS": "false",
        "TESTRAIL_ENABLE_CASE_HISTORY": "<VALUE>",
        "TESTRAIL_ENABLE_RAG_TOOLS": "<VALUE>",
        "TESTRAIL_ALLOW_WRITE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_READ_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_DELETE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ENABLE_DEPRECATED_TOOLS": "<VALUE>",
        "TESTRAIL_DISABLED_TOOLS": "<VALUE>",
        "TESTRAIL_REQUEST_TIMEOUT_MS": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-uarlouski-testrail-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@uarlouski/testrail-mcp-server"
      ],
      "env": {
        "TESTRAIL_INSTANCE_URL": "<VALUE>",
        "TESTRAIL_USERNAME": "<VALUE>",
        "TESTRAIL_API_KEY": "<YOUR_VALUE>",
        "TESTRAIL_ENABLE_SHARED_STEPS": "false",
        "TESTRAIL_ENABLE_CASE_HISTORY": "<VALUE>",
        "TESTRAIL_ENABLE_RAG_TOOLS": "<VALUE>",
        "TESTRAIL_ALLOW_WRITE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_READ_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_DELETE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ENABLE_DEPRECATED_TOOLS": "<VALUE>",
        "TESTRAIL_DISABLED_TOOLS": "<VALUE>",
        "TESTRAIL_REQUEST_TIMEOUT_MS": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-uarlouski-testrail-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@uarlouski/testrail-mcp-server"
      ],
      "env": {
        "TESTRAIL_INSTANCE_URL": "<VALUE>",
        "TESTRAIL_USERNAME": "<VALUE>",
        "TESTRAIL_API_KEY": "<YOUR_VALUE>",
        "TESTRAIL_ENABLE_SHARED_STEPS": "false",
        "TESTRAIL_ENABLE_CASE_HISTORY": "<VALUE>",
        "TESTRAIL_ENABLE_RAG_TOOLS": "<VALUE>",
        "TESTRAIL_ALLOW_WRITE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_READ_OPERATIONS": "<VALUE>",
        "TESTRAIL_ALLOW_DELETE_OPERATIONS": "<VALUE>",
        "TESTRAIL_ENABLE_DEPRECATED_TOOLS": "<VALUE>",
        "TESTRAIL_DISABLED_TOOLS": "<VALUE>",
        "TESTRAIL_REQUEST_TIMEOUT_MS": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
TESTRAIL_INSTANCE_URL Yes Your TestRail instance URL (e.g., https://example.testrail.io)
TESTRAIL_USERNAME Yes Your TestRail user email address
TESTRAIL_API_KEY secret Yes Your TestRail API key
TESTRAIL_ENABLE_SHARED_STEPS No Set to true to enable Shared Steps management tools Default: false
TESTRAIL_ENABLE_CASE_HISTORY No Enable test case history management
TESTRAIL_ENABLE_RAG_TOOLS No Enable Knowledge Base and RAG export tools
TESTRAIL_ALLOW_WRITE_OPERATIONS No Allow write operations on TestRail (defaults to true)
TESTRAIL_ALLOW_READ_OPERATIONS No Allow read operations on TestRail (defaults to true)
TESTRAIL_ALLOW_DELETE_OPERATIONS No Allow delete operations on TestRail (defaults to false)
TESTRAIL_ENABLE_DEPRECATED_TOOLS No Enable deprecated tools for backward compatibility (defaults to true)
TESTRAIL_DISABLED_TOOLS No Comma-separated list of tool names to disable
TESTRAIL_REQUEST_TIMEOUT_MS No Timeout in milliseconds for TestRail HTTP requests (defaults to 30000ms)

Similar servers