MCP tool protocol
@hover-dev/mcp is a standard Model Context Protocol server. Your coding agent connects to it over stdio; the server exposes a small set of tools and one prompt. Add it once and your agent gets both:
npm i -g @hover-dev/mcp
claude mcp add hover -- hover-mcp
Configuration (env)
The server reads its target from the environment its host sets:
| Variable | Default | Purpose |
|---|---|---|
HOVER_TARGET | http://localhost:5173 | The app under test — the origin the engine matches a CDP tab against. |
HOVER_CDP_PORT | 9222 | The debug Chrome's remote-debugging port. |
HOVER_PROJECT_ROOT | process.cwd() | Where __vibe_tests__/ and .hover/ are written. |
Tools
Every tool returns a short text result (✓ / ✗) and never throws — a failed locate or action becomes a ✗ message the calling agent can react to, not a transport error.
| Tool | Input | Purpose |
|---|---|---|
browser_navigate | { url } | Open a URL in the app under test. |
browser_snapshot | {} | Return the page as an ARIA snapshot (role + accessible-name tree). Call before actuating. |
click_control | grounded target | Click a control by role+name → testId → text. |
fill_control | grounded target + { value } | Type a value into a textbox / field. |
select_control | grounded target + { value } | Choose an option in a <select>. |
check_control | grounded target + { checked? } | Check / uncheck a checkbox or radio. |
assert_visible | grounded target | Assert visible now — captures expect(...).toBeVisible(). |
recall_business_knowledge | {} | Recall what earlier runs learned about this app. |
record_fact | { title, rule, type? } | Persist a durable business rule (rules only — no secrets / PII). |
crystallize_spec | { name, description? } | Save the recorded grounded flow as a plain Playwright spec in __vibe_tests__/. |
The grounded target shape
{
role?: string; // ARIA role from the snapshot — pair with name
name?: string; // accessible name, exactly as shown — pair with role
testId?: string; // a data-testid, if no clean role+name exists
text?: string; // real visible text — last resort
within?: { role: string; name: string }; // scope to a container first
}
record_fact types
type is one of business-rule (default), expected-behavior, validation, or access-policy. The fact is written under .hover/memory/ — see your app's test knowledge.
Prompt
| Prompt | Args | Purpose |
|---|---|---|
test_app | { scope? } | The phased, scale-aware authoring workflow. Claude Code surfaces it as /mcp__hover__test_app. Omit scope to cover the whole app, or pass an area / flow to focus on. |
For the authoritative definitions see packages/mcp/src/mcp/server.ts and the controller it wraps.