Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.2.0 instead.
Reason given by maintainers: outdated

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 (33): projects, suites, sections, cases (with their change history), case/result fields, case types, templates, statuses, priorities, configs, milestones, plans, runs, 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. 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: remove TESTRAIL_READ_ONLY and set TESTRAIL_ATTACHMENT_ROOTS to 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

Variable Purpose
TESTRAIL_URL, TESTRAIL_USERNAME, TESTRAIL_API_KEY Required. https:// only.
TESTRAIL_READ_ONLY true registers only the read tools.
TESTRAIL_ATTACHMENT_ROOTS Folders attachments may be uploaded from. Required in write mode.
TESTRAIL_ALLOWED_PROJECT_IDS / TESTRAIL_ALLOWED_RUN_IDS Optional: confine writes to these projects/runs.

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."
  • "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.

More

License

MIT

Metadata

Release files for pestrail 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pestrail 1.0.0
File Size Uploaded Provenance Actions
pestrail-1.0.0.tar.gz 90.1 kB With provenance Details for pestrail-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pestrail 1.0.0
File Interpreter ABI Platform Actions
pestrail-1.0.0-py3-none-any.whl Python 3 none any Details for pestrail-1.0.0-py3-none-any.whl

Total release size: 144.9 kB

Release files / pestrail-1.0.0.tar.gz

Download URL pestrail-1.0.0.tar.gz
Size 90.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e57d16b9c0de528adc464b187d0b5ae7f8cd6536085fc04aa447b1ecb43fc2b5
BLAKE2b-256 checksum
How to use checksums
1078c1b1610ce94c029169e3a9c8da96237a1475a386795cb1636385782f7ace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pestrail-1.0.0-py3-none-any.whl

Download URL pestrail-1.0.0-py3-none-any.whl
Size 54.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79fba2b403a48cbf9b3d4423dbbe6bd9b33511df5d0e2ed54e5167a604c18db5
BLAKE2b-256 checksum
How to use checksums
baed0d643d7184fac7cb17e4eeff4cf7f5a96daa94a7a6e3dcf930b0bff8dfd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for pestrail 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pestrail-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page