vivarium-mcp
v0.11.0MCP server exposing the Vivarium reproduction catalogue (list_recipes, get_recipe, lookup_verdict, match_error, search_upstream_issues, verify_branch_fix…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_recipes
List Vivarium reproduction recipes — pages or container images that demonstrate a specific upstream bug. Returns metadata only; live verdicts come from `lookup_verdict`. Filter by `layer` (1=WASM in browser, 2=Docker, 3=live preview of an upstream pull request or of a commit before one), `project` (upstream project name like "pandas" or "bash"), or `q` (substring search across slug, project, and title).
| Parameter | Type | Description |
|---|---|---|
layer | integer | Optional layer filter. 1 = WASM in browser, 2 = Docker, 3 = live preview of an upstream pull request or of a commit before one. |
project | string | Optional upstream project name (e.g. 'pandas', 'bash'). Case-insensitive exact match. |
q | string | Optional substring search across slug, project, and title. Case-insensitive. |
get_recipe
Get full metadata for a single recipe by slug, including the live page URL, verdict snapshot URL (Layer 2), upstream pull request number and commit link (Layer 3), and GitHub source URL. Use `list_recipes` first to discover available slugs. Returns `found: false` with an error message if the slug is unknown.
| Parameter | Type | Description |
|---|---|---|
slug * | string | Kebab-case recipe slug (e.g. 'pandas-56679', 'bash-local-shadows-exit'). |
lookup_verdict
Look up the latest verdict for a recipe by slug. Layer 1 recipes produce live in-browser verdicts and have no static snapshot — this returns kind='live' with the page URL and a note suggesting the agent open the page directly. Layer 3 recipes are live previews of an upstream pull request, or of a commit before one, with no verdict; this returns kind='preview' with the preview's link, which asks for a GitHub sign-in. Layer 2 recipes return kind='snapshot' with the deployed verdict.json contents (verdict, exit code, image digest, captured-at timestamp, stdout, stderr tail). Returns kind='unava…
| Parameter | Type | Description |
|---|---|---|
slug * | string | Kebab-case recipe slug. |
match_error
Find Vivarium recipes that match a pasted error message or stack trace by mechanical token overlap (no LLM). The text is tokenised, lowercase-compared against each recipe's symptom (weight 5 per segment), tags (3), project (2), and slug (2). Matching includes adjacent-pair tokens (so 'data type' can hit `dtype`), a small synonym table (e.g. dtype⇄datatype, segfault⇄sigsegv), and bounded Levenshtein-1 fuzzy matching for tokens of length >= 6. Stopword set covers English, Japanese, German, Spanish, French, Chinese, and Korean noise tokens. Recipes with score > 0 are returned in descending sc…
| Parameter | Type | Description |
|---|---|---|
text * | string | Error message, stack trace, or any free-text fragment to match against the catalogue. Tokenised on non-alphanumeric runs after lowercasing; tokens shorter than 3 chars and a multi-language stopword li… |
limit | integer | Maximum number of matches to return. Defaults to 10; capped at 50. |
search_upstream_issues
Search an upstream GitHub repository for issues that are candidates for Vivarium reproduction. Thin wrapper over `gh search issues`. Strict mode (default) applies two filters: GitHub's standard `-linked:pr` qualifier (drops issues with related PRs), and a caller-supplied `exclude_repos` list (drops matches whose repo is in that list). Permissive mode applies neither and surfaces everything for manual triage with `has_pr` left unset. Returns the first `limit` matches with body snippets, labels, and `posted_at` so the caller can rank further. This tool ships no built-in exclusion list and no act…
| Parameter | Type | Description |
|---|---|---|
exclude_repos | array | Optional list of `owner/repo` strings to exclude in strict mode. The tool itself ships no defaults — pass your own if your workflow has reasons to skip specific projects (e.g. they already operate e… |
labels | array | Optional label filter. Each label is passed as `--label <label>` to gh, requiring ALL labels (gh's AND semantics). |
limit | integer | Maximum number of matches to return. Clamped to [1, 50]. |
project | string | Kebab-case project name (e.g. 'node', 'cpython'). Resolves to a default owner/repo via the same map used by prepare_new_recipe. Either project or repo must be supplied. |
query | string | Optional extra search query appended to the gh search invocation (e.g. 'in:title parser', 'comments:>5'). Combined with the policy's automatic qualifiers. |
repo | string | Full upstream `owner/repo` (e.g. 'nodejs/node'). Overrides the project's default mapping when both are passed. Either project or repo must be supplied. |
selection_policy | string | Selection policy. 'strict' (default) appends `-linked:pr` server-side and drops matches whose repo is in `exclude_repos`. 'permissive' surfaces everything for manual triage and leaves has_pr unset. |
state | string | Issue state. Defaults to open since closed issues are usually already resolved upstream. |
verify_branch_fix
Generate a deep-link URL and instructions for verifying a candidate branch-fix against a Vivarium recipe. SCAFFOLDING HELPER, not an execution engine — actual reproduction runs in the visitor's browser (Layer 1) or in GitHub Actions (Layer 2). Layer dispatch is automatic from the recipe's catalogue layer. A Layer 1 recipe that sets `path_a` returns a recipe-page URL with the fix pre-loaded via `?fix_url=` or `?fix=<base64url>`; any other Layer 1 recipe returns an error. Layer 2 returns Path B: a `/repro/compare` URL plus the `gh workflow run branch-fix-verdict.yml` command the contributor ru…
| Parameter | Type | Description |
|---|---|---|
slug * | string | Kebab-case recipe slug (e.g. 'lark-1585', 'bash-local-shadows-exit'). |
fix_source | string | Inline candidate fix source (max 4096 bytes). Layer 1 only — embedded in the returned compare_url as `?fix=<base64url>`. Mutually exclusive with fix_url. Long fixes should use fix_url instead. |
fix_url | string | Public URL of the candidate fix source (raw.githubusercontent.com / gist.githubusercontent.com). Layer 1 only — embedded in the returned compare_url as `?fix_url=`. Mutually exclusive with fix_sourc… |
verify_and_report_fix
Layer-abstracted round-trip verification driver. Computes the state-machine next_action from the recipe's current round-trip state and, when `auto_execute` is true (the default), runs the appropriate verdict capture: a Playwright `--grep` targeted run for Layer 1 or a `gh workflow run branch-fix-verdict.yml` dispatch + artefact download for Layer 2. Layer 3 live previews are rejected: they have no verdict and no round-trip. Returns the merged state with any captured verdict in `verdicts`, the next state-machine action in `next_action`, and the commands to run for any non-executing action (PR o…
| Parameter | Type | Description |
|---|---|---|
slug * | string | Kebab-case recipe slug (e.g. 'lark-1585', 'bash-local-shadows-exit'). |
auto_execute | boolean | Whether to actually run the verify_unfixed / verify_fixed action when the state machine selects one. Defaults to true. Set false to return the commands without running anything. |
branch_image | string | Layer 2 only. GHCR tag of the contributor's branch-fix Docker image. Required for verify_fixed on Layer 2 — passed as the `branch_image` input to `branch-fix-verdict.yml`. |
current_state | object | Current round-trip state for the slug, matching roundtrip.schema.json. Pass the parsed contents of the recipe's roundtrip.json. Omit for a fresh round-trip — the tool will compute `verify_unfixed` a… |
fix_source | string | Inline candidate fix source. Layer 1 only — surfaced in the returned `compare_url` for visual inspection; not used by auto-execute (`fix_url` is the executable input). |
fix_url | string | Public URL of the candidate fix source. Layer 1 only — injected as `?fix_url=` when capturing the fixed verdict. Required for verify_fixed on Layer 1. |
poll_interval_ms | integer | Layer 2 only. Interval between `gh run view` polls when waiting for branch-fix-verdict.yml to complete. Default 15000ms. |
poll_timeout_ms | integer | Layer 2 only. Hard cap on the total wait for the workflow to complete. Default 600000ms (10 minutes). |
workspace_path | string | Layer 1 only. Filesystem path to the `src/layer1_wasm/` workspace (where Playwright config lives). Defaults to the monorepo-relative path `src/layer1_wasm`. Pass an absolute path if the MCP server is… |
prepare_new_recipe
Prepare everything an AI agent needs to author a new Vivarium recipe for a given upstream project + issue. SCAFFOLDING HELPER, not an execution engine — returns the exact `mise run recipes:new` and `mise run recipes:verify` commands the agent should run, plus a placeholder `recipe.json` (validates against docs/site/public/spec/recipe.schema.json) to drop into the recipe directory, an optional `projects.json` row (only when the recipe debuts a new upstream project), a commit-subject template, and a sequenced next-steps checklist. Validates the slug at call time against the same regex `docs/sc…
| Parameter | Type | Description |
|---|---|---|
issue * | integer | Upstream issue number (positive integer, e.g. 63041 for nodejs/node#63041). |
project * | string | Upstream project name in kebab-case (e.g. 'node', 'cpython', 'typescript'). Must not contain trailing digits — those would confuse the slug parser. |
title * | string | One-line bug title (e.g. "Intl.DateTimeFormat drops month with calendar:'iso8601'"). Used in the scaffold command and as the recipe README's H1. |
base_image | string | Optional Docker base image for Layer 2 recipes (e.g. 'node:26-slim'). Forwarded to `mise run recipes:new -- ... --base <image>`. Layer 1 ignores this. |
layer | integer | Vivarium layer: 1=WASM (in-browser), 2=Docker (default). 3=live preview is rejected: those recipes are one per upstream pull request or commit and are written by hand. The commit scope, scaffold comma… |
repo_owner | string | Optional upstream owner/repo override (e.g. 'microsoft/TypeScript'). Defaults to a heuristic per project name: 'node' → 'nodejs/node', 'cpython' → 'python/cpython', etc. Only forward to the scaffo… |
prepare_fix_candidate
Register a fix-candidate spec on an existing Layer 1 (WASM/Pyodide) Vivarium recipe so the recipe page runs the fix branch's wheel side-by-side with the released build. SCAFFOLDING HELPER, not an execution engine — same pattern as prepare_new_recipe and verify_branch_fix. Given a recipe slug + fork repo URL + branch name, returns: the `fix-candidate.json` content the agent should write, the recommended commit subject + PR title, a ready-to-paste PR body (with the AI-authorship and fix-candidate spec details tucked inside a `<details>` block), and the exact `gh` / `git` commands to fork-and-c…
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch name on the fork that contains the fix (e.g. 'claude/fix-lark-1585-aBcDe'). |
fork_url * | string | Bare GitHub repo URL of the fork that hosts the fix branch (e.g. 'https://github.com/your-user/lark'). Tree / blob / pull URLs are rejected; pass the canonical clone URL. |
slug * | string | Existing Layer 1 recipe slug to register the fix candidate on (e.g. 'lark-1585'). Must resolve to a Layer 1 entry in the bundled catalogue — call list_recipes if you need to discover it. |
package | string | Optional pip distribution name override. Defaults to the recipe's project name. Override only when the project name and the pip distribution name diverge. |
purpose | string | Optional purpose / one-liner. Defaults to 'fix-candidate verification for <project>/<project>#<issue>'. |
upstream_pr | string | Optional URL of the PR you opened from this fork branch (e.g. 'https://github.com/lark-parser/lark/pull/<n>' or the fork-side draft PR URL while the upstream PR is still in progress). Embedded in the… |
create_fork_pr
Open a draft PR on the upstream repository from the contributor's already-pushed fork branch. The output side of the round-trip loop. Conservative by design: `dry_run` defaults to true (returns the gh command without executing); `--draft` is mandatory (caller cannot opt out); AI authorship is disclosed via a boilerplate footer appended to the PR body (no label is applied, because upstream repositories rarely have one). The tool refuses to run unless `computeNextAction(current_state) === 'open_fork_pr'` — that single check enforces all the round-trip preconditions in one place (verdicts captu…
| Parameter | Type | Description |
|---|---|---|
current_state * | object | Parsed roundtrip.json contents. Must contain `upstream_issue`, `fork` (owner/repo/branch), and `verdicts` with both `unfixed.verdict='reproduced'` and `fixed.verdict='unreproduced'`. The tool refuses… |
pr_title * | string | PR title. Caller is responsible for following the upstream project's commit / PR title conventions (Conventional Commits, etc.). |
slug * | string | Kebab-case recipe slug (e.g. 'lark-1585', 'bash-local-shadows-exit'). Must exist in the catalogue. |
dry_run | boolean | When true (the default), the tool returns the exact `gh pr create` command + a structured summary WITHOUT calling gh. Set to false to actually open the PR. The MCP server never opens an upstream PR by… |
pr_body | string | PR body (Markdown). Defaults to empty. Include a link back to the Vivarium recipe and the upstream issue, and disclose AI authorship (the tool appends a footer and applies no label). |