semvec/pypi-packages huggingface dataset:
mcp-testrail 0.1.1
MCP integration enabling automated test case creation and updates in TestRail, powered by Goose AI intelligence

# mcp_testrail

This is an MCP server for **mcp_testrail**, enabling read and write access to TestRail data (projects, suites, runs, cases, results, and attachments) using the FastMCP Python SDK.

---

## 🛠 Install Instructions

Before starting, please make sure you have followed the general MCP setup instructions.

To install this MCP from Artifactory:

```bash
uvx mcp_testrail@latest
```

---

## 🤝 Contribution Guide

Read this [MCP playbook](https://example.com/goose-playbook) that outlines best practices for designing Goose extensions and MCPs.

---

## 🚀 Getting Started

Initialize & activate your local Python environment:

```bash
uv sync
source .venv/bin/activate
```

Then start your server via:

```bash
mcp_testrail
```

> The terminal may appear to "hang" with no logs — that's expected. Your server is now running on port `3000`.

---

## 🧪 Test with MCP Inspector

You can launch the server with Inspector support for debugging and UI-based testing:

```bash
uv run mcp dev src/mcp_testrail/server.py
```

Then open your browser to: [http://localhost:6274](http://localhost:6274)

---

## 🧩 Integrating with Goose

In Goose:

1. Go to **Settings > Extensions > Add**
2. Set **Type** to `StandardIO`
3. Enter the absolute path to the MCP CLI in your environment. For example:

   ```bash
   uv run /path/to/mcp_testrail/.venv/bin/mcp_testrail
   ```

4. Enable the extension and confirm that Goose detects your tools.

---

## 🔐 Environment Variables

This MCP uses the following environment variables for authentication:

- `TESTRAIL_USERNAME` – your TestRail username or API email
- `TESTRAIL_API_KEY` – your TestRail API key
- `TESTRAIL_BASE_URL` – base instance URL, e.g., `https://yourcompany.testrail.io`

---

## 📚 Supported Tools

- `get_test_projects`
- `get_test_suites`
- `get_test_sections`
- `get_test_cases`
- `get_test_runs`
- `get_tests`
- `add_test_suite`
- `add_test_case`
- `add_test_run`
- `update_test_case`
- `add_result`
- `add_result_for_case`
- `add_attachment_to_result`

---