MCP Server
import { Aside } from ‘@astrojs/starlight/components’;
@frontend-qa/mcp-server wraps the same scan/report pipeline the CLI uses
and exposes it as five MCP tools, so an AI
coding assistant can call them directly instead of parsing terminal output
or reading JSON off disk itself.
Running it today
Section titled “Running it today”From a clone of the monorepo:
pnpm installpnpm buildnode packages/mcp-server/dist/bin.jsThe server speaks MCP over stdio — register it with your client by pointing
at that command, e.g. in an .mcp.json:
{ "mcpServers": { "frontend-qa": { "command": "node", "args": ["packages/mcp-server/dist/bin.js"] } }}(This is exactly how this project’s own repository dogfoods it — see the
root .mcp.json.)
| Tool | Purpose |
|---|---|
frontend.run_scan |
Run a scan and return an issue-count summary |
frontend.get_report |
Return the full Report JSON for a run |
frontend.get_issues |
Return Issue[], filterable by severity/collector/category |
frontend.get_console_errors |
Return only browser.console issues |
frontend.get_screenshot |
Return a route’s screenshot as base64 PNG image content |
Full argument schemas: MCP Tools Reference.
Why a separate server instead of shelling out to the CLI
Section titled “Why a separate server instead of shelling out to the CLI”The CLI and the MCP server both call into the same @frontend-qa/core and
@frontend-qa/browser packages directly — the MCP server isn’t a wrapper
that spawns the CLI as a subprocess and scrapes stdout. That means tool
results are structured JSON (or an image content block for screenshots),
not text an assistant has to re-parse.