MCP server
CLOUD API URL REQUIRED. There is no working hosted default or supported production self-host quick start. Use cloud-dependent source only with a deployment you operate and have independently verified.
@frontguard/mcp gives coding agents structured access to local visual regression reports, DOM clusters and CSS patch validation. Reading local reports needs no cloud account or API key.
Configuration
From your project directory, start the app and prepare reviewed baselines first. JSON output goes to stdout, so create the report directory and redirect it into the file MCP will read:
Exit 1 means the report contains regressions or unaccepted screenshots; exit 2 indicates an error to investigate. Run the MCP client from this project directory, or use an absolute FRONTGUARD_LOCAL_REPORT path.
Cloud-dependent tools require an independently verified FRONTGUARD_API_URL deployment and FRONTGUARD_API_KEY; no working hosted default is supplied. The package ships an MCP Registry server.json manifest under io.github.ravidsrk/frontguard and negotiates both 2025-11-25 and 2026-07-28 MCP protocol versions.
Tools
| MCP Tool Name | Required Arguments | What It Returns to the Coding Agent |
|---|---|---|
list_regressions | pr_id; optional repo, branch | Lists regressions and their diffId values. Use a PR number or a run ID returned by recent_runs; branch is currently reserved. |
inspect_diff_cluster_dom | diff_id; optional cluster_id | Returns captured DOM clusters, bounding boxes, selectors and diff evidence. |
get_suggested_fix | diff_id | Returns a stored suggested fix if one exists. |
verify_css_patch | diff_id, css_patch, target_selector | Validates CSS syntax, target alignment and safety against the report. It does not render or apply the patch. |
promote_baseline | run_id, confirm_reviewed: true; optional routes | Cloud API mode only: records reviewed run approval. Refuses local-report mode; does not promote cloud PNGs. |
accept_baseline | run_id, confirm_all_regressions_reviewed: true | Records whole-run approval metadata in the local JSON report or Cloud API; does not replace screenshot baselines. |
recent_runs | optional repo, branch, limit | Lists runs, including the local run ID when reading a JSON report. |
list_horizontal_overflow | optional run_id | Lists horizontal overflow from the JSON report. A flagged row is a visible unclipped box past the right edge. It does not change the pixel result. |
Agentic debugging workflow
Approval limit
MCP promotion is refused in local-report mode and does not write the frontguard-baselines branch. The local write is the CLI command frontguard update-baselines --confirm-baselines, which a human runs. An agent setting confirm_reviewed: true on itself is not a human review, and an advisory caption cannot set that flag. Cloud approveRun is not a production path; do not point the MCP client at a production host. accept_baseline can mark a JSON report approved, but it does not replace screenshot baselines. Cloud tools record approval metadata only; cloud screenshot promotion is not implemented.
