Metadata-Version: 2.4
Name: miqa-mcp
Version: 0.2.2
Summary: MIQA MCP Server
Author: MIQA / Magna Labs
License: MIT
Keywords: claude,fastmcp,mcp,miqa
Requires-Python: >=3.10
Requires-Dist: fastmcp>=2.0
Requires-Dist: miqatools>=2.0.0rc1
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# MIQA MCP

An MCP server that exposes MIQA test-reporting data to Claude Code and any other
MCP client over stdio.

## Tools

Read-only:

| Tool | Description |
| --- | --- |
| `find_runs_by_version(version_name, limit=100)` | Find Test Chain Runs for a version name, newest-first. |
| `get_test_run(run_id, sample_ds_id=None)` | Details for a single run. |
| `get_test_run_results(run_id, sample_ds_id=None)` | Assertion/result summary table. |
| `get_test_run_report(run_id, sample_ds_id=None, format="json")` | Sample-centric structured report. |
| `get_test_run_sample_metadata(run_id, sample_ds_id=None)` | Sample metadata for a run. |
| `get_test_run_environment(run_id, sample_ds_id=None)` | Captured test/execution environment. |
| `list_component_versions(component_id, limit=100)` | A component's versions, newest-first. |

Write (the only tool that can change MIQA state):

| Tool | Description |
| --- | --- |
| `create_component_version(trigger_id, component_id=None, docker_uri=None, command=None, version_name=None, apply=False)` | Create a new component version (docker uri bump and/or main-step command change). |

`create_component_version` is **dry-run by default**. With `apply=False` nothing is
persisted — it returns a validation verdict and a diff of the would-be version.
Show that diff to the user and get explicit confirmation before re-invoking with
`apply=True`. Applying persists the version; it never starts a test run.

Some tools depend on server-side feature flags or routes and may be unavailable
on older MIQA deployments.

## Configuration

| Variable | Description |
| --- | --- |
| `MIQA_SERVER_URL` | MIQA server hostname, e.g. `yourco.miqa.io` |
| `MIQA_API_KEY` | MIQA API key |

## Setup

No install needed — [uv](https://docs.astral.sh/uv/) runs the server on demand.
Register it with Claude Code:

```bash
claude mcp add miqa-mcp \
  --scope user \
  -e MIQA_SERVER_URL=yourco.miqa.io \
  -e MIQA_API_KEY=your-key-here \
  -- uvx --refresh --prerelease=allow miqa-mcp@0.2.2
```

`--prerelease=allow` is required while the `miqatools` dependency is on a
prerelease. Drop `@0.2.2` to always run the latest published version, or
`--scope user` to register for the current project only.

Verify with `claude mcp list` (or `claude mcp get miqa-mcp`), and remove with
`claude mcp remove miqa-mcp`.
