Back to Browse

Pestrail MCP Server

Developer ToolsLow Risk9.5MCP RegistryLocal
Free

Server data from the Official MCP Registry

Safety-first TestRail access: read runs, cases and results, add results. Never deletes anything.

About

Safety-first TestRail access: read runs, cases and results, add results. Never deletes anything.

Security Report

9.5
Low Risk9.5Low Risk

Valid MCP server (1 strong, 0 medium validity signals). 1 known CVE in dependencies Package registry verified. Imported from the Official MCP Registry.

5 files analyzed · 2 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

file_system

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Your TestRail address, https only, e.g. https://your-company.testrail.ioOptional

Environment variable: TESTRAIL_URL

The email address you log in to TestRail withOptional

Environment variable: TESTRAIL_USERNAME

TestRail API key (My Settings > API Keys). Never logged or returnedRequired

Environment variable: TESTRAIL_API_KEY

true: only read tools. false: also add results and attachments (then set TESTRAIL_ATTACHMENT_ROOTS)Optional

Environment variable: TESTRAIL_READ_ONLY

Required when read-only is off: folders uploads may come from (';' between folders on Windows, ':' elsewhere)Optional

Environment variable: TESTRAIL_ATTACHMENT_ROOTS

Optional: writes only in these projects, comma-separated, e.g. 3,P7Optional

Environment variable: TESTRAIL_ALLOWED_PROJECT_IDS

Optional: writes only in these runs, comma-separated, e.g. R56,78Optional

Environment variable: TESTRAIL_ALLOWED_RUN_IDS

Optional: tool groups to offer besides the core tools: attachments, history, fields, milestones, users (core = none). Default: allOptional

Environment variable: PESTRAIL_TOOLSETS

Only this configuration counts: no personal .env file is readOptional

Environment variable: PESTRAIL_ENV_FILE

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "pestrail": {
      "command": "uvx",
      "args": [
        "pestrail==1.2.0"
      ],
      "env": {
        "TESTRAIL_URL": "your-testrail-url-here",
        "TESTRAIL_API_KEY": "your-testrail-api-key-here",
        "PESTRAIL_ENV_FILE": "your-pestrail-env-file-here",
        "PESTRAIL_TOOLSETS": "your-pestrail-toolsets-here",
        "TESTRAIL_USERNAME": "your-testrail-username-here",
        "TESTRAIL_READ_ONLY": "your-testrail-read-only-here",
        "TESTRAIL_ALLOWED_RUN_IDS": "your-testrail-allowed-run-ids-here",
        "TESTRAIL_ATTACHMENT_ROOTS": "your-testrail-attachment-roots-here",
        "TESTRAIL_ALLOWED_PROJECT_IDS": "your-testrail-allowed-project-ids-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

pestrail

A safety-first MCP server for TestRail. Let Claude Desktop, Claude Code or any MCP client do everyday QA work in TestRail: browse projects, cases, runs and plans, read tests and results, add results and attach files (logs, screenshots, reports).

pestrail cannot delete anything, cannot create, edit or move test cases, suites or sections, and cannot close runs or plans. These operations are missing by design and blocked in code, not just in prompts. Everything it writes is additive: new results and new attachments. See docs/safety.md.

Community project, not affiliated with or endorsed by TestRail, Gurock Software or Idera, Inc. "TestRail" is a trademark of its respective owner.

Tools

  • Read (34): projects, suites, sections, cases (with their change history), case/result fields, case types, templates, statuses, priorities, configs, milestones, plans, runs (and a one-call run summary: counts per status and assignee, failed and blocked tests), tests (e.g. only the ones assigned to you), results, attachment lists (name, type, size; the content is never downloaded), users, the current user.
  • Write (9, hidden in read-only mode): add_result, add_result_for_case, add_results_for_cases (report a whole test session in one call), add_result_with_attachments, and add_attachment_to_result / _run / _case / _plan / _plan_entry. Each takes dry_run=true to preview the exact request without sending it.

IDs can be plain numbers or TestRail-style (C1234, R56, T678), and statuses can be given by name ("Failed", custom statuses too). Result comments written in the rich-text editor or pasted from Word/Jira come back as readable Markdown, and large responses are paged to fit your MCP client's limits.

Quick start

  1. Get an API key. A TestRail admin enables the API once (Administration > Site Settings > API). Then go to My Settings > API Keys > Add Key. Prefer a dedicated user with a role that can only view and add results.
  2. Install uv. pestrail is on PyPI, so uvx pestrail downloads and runs it; check with uvx pestrail --version.
  3. Add it to your MCP client. Start read-only and enable writes later.

Claude Desktop, as an extension (easiest): download pestrail-X.Y.Z.mcpb from the latest release and open it with Claude Desktop. Fill in the form: TestRail URL, username, API key (stored securely), Read-only (on by default) and, for writes, the Attachment folders uploads may come from. Optional: Allowed projects / Allowed runs limit where Claude can write, and Tool groups hides tools you don't use. It installs the matching pestrail release from PyPI.

Claude Desktop, by hand: open Settings > Desktop app > Extensions > Manage > Edit Config, add the block below, then quit Claude Desktop completely and start it again.

{
  "mcpServers": {
    "testrail": {
      "command": "uvx",
      "args": ["pestrail"],
      "env": {
        "TESTRAIL_URL": "https://your-company.testrail.io",
        "TESTRAIL_USERNAME": "you@your-company.com",
        "TESTRAIL_API_KEY": "your-api-key",
        "TESTRAIL_READ_ONLY": "true",
        "PESTRAIL_ENV_FILE": "none"
      }
    }
  }
}

Claude Code:

claude mcp add testrail --scope user \
  -e TESTRAIL_URL=https://your-company.testrail.io \
  -e TESTRAIL_USERNAME=you@your-company.com \
  -e TESTRAIL_API_KEY=your-api-key \
  -e TESTRAIL_READ_ONLY=true \
  -e PESTRAIL_ENV_FILE=none \
  -- uvx pestrail

(In PowerShell, end lines with a backtick ` instead of \.)

Enable writes: set TESTRAIL_READ_ONLY to false (pestrail is read-only unless you do) and set TESTRAIL_ATTACHMENT_ROOTS to the full paths of the folders holding your test artifacts (;-separated on Windows, : on macOS/Linux). Write mode won't start without it. Optionally limit writes with TESTRAIL_ALLOWED_PROJECT_IDS / TESTRAIL_ALLOWED_RUN_IDS.

Key settings

VariablePurpose
TESTRAIL_URL, TESTRAIL_USERNAME, TESTRAIL_API_KEYRequired. https:// only.
TESTRAIL_READ_ONLYRead-only unless set to false (which enables the write tools).
TESTRAIL_ATTACHMENT_ROOTSFolders attachments may be uploaded from. Required in write mode.
TESTRAIL_ALLOWED_PROJECT_IDS / TESTRAIL_ALLOWED_RUN_IDSOptional: confine writes to these projects/runs.
PESTRAIL_TOOLSETSOptional: offer only some tool groups, e.g. core or attachments,history. Fewer tools = cheaper conversations.

The full reference covers timeouts, .env files, proxies and corporate TLS: docs/configuration.md.

Example prompts

  • "In run R56, which tests are assigned to me? My TestRail email is me@your-company.com."
  • "How is run R56 doing? Who has failures?"
  • "Show me all Failed or Retest tests in run R56 with their latest comment."
  • "Report my session to run R56: C101 passed, C102 failed (defect UI-55), C103 blocked."
  • "Add a Failed result to C1234 in R56 and attach C:\artifacts\login.log."

Tip: ask the assistant to show you what it will add and wait for your OK. pestrail can't remove a result once it's added.

Optional: the testrail-qa skill

Each release also includes pestrail-skill-X.Y.Z.zip, an agent skill that teaches the assistant pestrail's workflows: run summaries, investigating failures, and reporting results with a dry_run preview first. pestrail works without it.

  • Claude apps: Customize > Skills > + > Create skill > Upload a skill, then choose the zip. Skills need code execution turned on (see Using Skills in Claude).
  • Claude Code: unzip it into ~/.claude/skills/, which gives ~/.claude/skills/testrail-qa/SKILL.md.

Staying up to date

pestrail never checks for updates itself: it only talks to your TestRail.

  • Get notified: on GitHub, click Watch > Custom, tick Releases and apply. Or follow the release feed.
  • Check your version: ask the assistant "Which pestrail version is running?".
  • Claude Desktop extension: it doesn't update itself. Download the new pestrail-X.Y.Z.mcpb from the latest release and open it with Claude Desktop. Your settings are kept.
  • uvx: keeps using the version it downloaded first. Run uvx pestrail@latest --version once to fetch the newest release, then restart your MCP client.

More

License

MIT

Reviews

No reviews yet

Be the first to review this server!