MCP Frontend Tools Server
This server provides MCP tools for frontend development workflows, enabling AI agents to audit accessibility, capture screenshots, enforce bundle budgets, diff design tokens, test Storybook components, and scaffold React components.
Accessibility Auditing (
axe_audit): Run axe-core against raw HTML (via jsdom) or a live URL (via Playwright) to detect WCAG violations grouped by impact level, with fix guidance andhelpUrllinks.Page Screenshots (
page_screenshot): Capture headless Chromium PNG screenshots of any URL or specific CSS selector, with control over viewport size, device pixel ratio, color scheme (light/dark), and wait conditions.Bundle Budget Checks (
bundle_budget_check): Walk a build/dist directory, measure raw, gzip, and brotli sizes for JS/CSS files, and enforce global or per-entry KB budgets — returning CI-ready pass/fail results.Design Token Diffs (
design_token_diff): Structurally compare two W3C DTCG / Style Dictionary token files to identify added, removed, or changed tokens with$type-aware annotations (e.g., color or dimension changes).Storybook Story Testing (
storybook_story_run): Load a single Storybook story in headless Chromium, optionally screenshot it, and run an axe-core audit scoped to the rendered component.React Component Scaffolding (
scaffold_react_component): Generate typed TypeScript React components (functional,forwardRef, or polymorphicas-prop variants) with optional Vitest tests and Storybook stories.
Generates CSS modules for React components and provides responsive CSS patterns, including container queries and Tailwind patterns for styling.
Generates typed React components with tests, stories, and CSS modules, providing scaffolding capabilities for React component development.
Creates Storybook stories for generated React components, enabling component documentation and visual testing.
Generates Testing Library test files for React components, providing testing capabilities for component behavior and interactions.
Creates typed React components with TypeScript support, ensuring type safety in generated frontend code.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Frontend Tools Server scaffold a login form component with email and password fields"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-frontend-tools
The reference Model Context Protocol server for frontend work. One install gives any coding agent — Claude Desktop, Cursor, VS Code, Zed, Continue — real eyes and hands on your UI:
axe_audit— run the realaxe-corerule engine against raw HTML (via jsdom) or a live URL (via Playwright). Returns violations grouped by WCAG impact with fix links.page_screenshot— headless-Chromium PNGs of any URL or CSS selector, with viewport / DPR / color-scheme /waitForSelectorcontrols.bundle_budget_check— walk adist/directory, compute gzip (+ optional brotli) sizes, enforce a global or per-entry KB budget. CI-ready pass/fail JSON.design_token_diff— structural diff of two W3C DTCG / Style Dictionary token files. Reports added / removed / changed tokens with$type-aware notes.storybook_story_run— load a single Storybook story in headless Chromium viaiframe.html?id=…, screenshot it, and run an axe audit against just the rendered component.scaffold_react_component— emit a typed React component (functional /forwardRef/ polymorphicas) plus optional Vitest test and Storybook story.
All tools return structured JSON the model can reason over. No bespoke wrappers per editor.
Install
npm i -g @ashios15/mcp-frontend-tools
# Optional — enables page_screenshot, storybook_story_run, and URL-mode axe_audit
npm i -g playwright
npx playwright install chromiumNode ≥ 20 is required. Without Playwright the server still starts; those three tools will return a clear "install playwright" error if called.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (or the Windows equivalent):
{
"mcpServers": {
"frontend-tools": {
"command": "mcp-frontend-tools"
}
}
}Cursor
Settings → MCP → Add new server:
{
"frontend-tools": { "command": "mcp-frontend-tools" }
}VS Code (GitHub Copilot agent mode)
Add to .vscode/mcp.json:
{
"servers": {
"frontend-tools": { "command": "mcp-frontend-tools" }
}
}MCP Inspector
npx @modelcontextprotocol/inspector mcp-frontend-toolsRelated MCP server: Components Build MCP
Tool reference
axe_audit
{
url?: string; // require playwright
html?: string; // jsdom
tags?: string[]; // default: wcag2a/aa + wcag21aa + wcag22aa + best-practice
selector?: string; // URL mode only
timeoutMs?: number; // default 15000
}Returns violations and incomplete rules with impact, help, helpUrl, and up to 5 example failing nodes per rule.
page_screenshot
{
url: string;
outPath: string; // absolute; parent dirs auto-created
selector?: string;
fullPage?: boolean;
width?: number; // default 1280
height?: number; // default 800
deviceScaleFactor?: number;// default 2
colorScheme?: "light" | "dark" | "no-preference";
waitForSelector?: string;
timeoutMs?: number;
}bundle_budget_check
{
buildDir: string;
budgetKb?: number; // default 250 (gzipped)
perEntryBudgetKb?: Record<string, number>;// key = path substring, longest match wins
ext?: string[]; // default [".js",".mjs",".cjs",".css"]
includeBrotli?: boolean;
}Returns every file with raw / gzip / brotli sizes, its applied budget, and status: "pass" | "fail".
design_token_diff
{
beforePath: string;
afterPath: string;
ignoreKeys?: string[];
}Understands the W3C DTCG shape ($value, $type). Group metadata keys starting with $ are ignored. Color / dimension changes get annotated notes.
storybook_story_run
{
storybookUrl: string; // e.g. http://localhost:6006
storyId: string; // e.g. components-button--primary
screenshotPath?: string;
runAxe?: boolean; // default true
viewport?: { width: number; height: number };
colorScheme?: "light" | "dark" | "no-preference";
timeoutMs?: number;
}Loads ${storybookUrl}/iframe.html?viewMode=story&id=${storyId}, waits for #storybook-root, and reports any page errors + axe violations scoped to the story.
scaffold_react_component
{
name: string; // PascalCase
outDir: string; // absolute
variant?: "functional" | "forwardRef" | "polymorphic";
withTests?: boolean; // default true
withStory?: boolean; // default true
props?: Array<{ name: string; type: string; required?: boolean; defaultValue?: string }>;
}Why this over ad-hoc scripts?
Agents get typed contracts. Every tool is a Zod-validated JSON Schema the model can introspect.
No local hallucination. Axe violations come from the real axe-core engine, not a regex. Bundle sizes come from actual
zlibcompression, not estimates.Composable.
bundle_budget_checkfailure → ask the agent to pull the largest file intopage_screenshot→ feed the image into a visual-regression step. All through MCP.Stable surface. Tools change behind a version bump; your
.vscode/mcp.jsondoesn't.
Development
git clone https://github.com/ashios15/mcp-frontend-tools.git
cd mcp-frontend-tools
npm install
npm run test # 3 unit tests (bundle + tokens + scaffold)
npm run build
npm run inspector # opens MCP Inspector against the built server
node scripts/smoke.mjs # quick stdio tools/list checkLicense
MIT © ashios15
Available Tools
6 toolsaxe_auditaxe-core Accessibility AuditA
Run the axe-core accessibility ruleset against an HTML string (jsdom) or a live URL (Playwright). Returns violations grouped by impact with fix guidance and helpUrl links.
Inputs: url, html, tags, selector, +1 more.
bundle_budget_checkBundle Budget CheckA
Walk a build directory, measure raw + gzip (+ optional brotli) sizes per file, and flag files that exceed a global or per-entry KB budget. CI-friendly JSON output.
Inputs: buildDir (required), budgetKb, perEntryBudgetKb, ext, +1 more.
design_token_diffDesign Token DiffA
Diff two design-token JSON files (W3C DTCG / Style Dictionary style). Reports added, removed, and changed tokens with $type-aware classification. Useful for PR review of design-system changes.
Inputs: beforePath (required), afterPath (required), ignoreKeys.
page_screenshotPage Screenshot (Playwright)A
Launch headless Chromium, navigate to a URL, and save a PNG screenshot. Supports element selectors, full-page capture, dark mode, and custom viewports. Requires the optional playwright peer dependency.
Inputs: url (required), outPath (required), selector, fullPage, +6 more.
scaffold_react_componentScaffold React ComponentB
Write a TypeScript React component, optional test, and optional Storybook story into outDir. Supports functional, forwardRef, and polymorphic (as prop) variants.
Inputs: name (required), outDir (required), variant, withTests, +2 more.
storybook_story_runStorybook Story RunA
Load a single Storybook story in headless Chromium via iframe.html, optionally screenshot it, and run an axe-core audit against the rendered output. Requires playwright.
Inputs: storybookUrl (required), storyId (required), screenshotPath, runAxe, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct frontend concern: accessibility auditing, bundle sizing, design token diffs, page screenshots, component scaffolding, and Storybook testing. No two tools could be confused.
All tool names follow a consistent 'object_action' or 'domain_action' pattern with lowercase underscores (e.g., axe_audit, design_token_diff). No mixing of conventions.
Six tools is an appropriate size for a frontend utility toolkit. Each tool provides a distinct, useful function without being overwhelming or too sparse.
The set covers key frontend tasks: accessibility, performance, design tokens, component generation, and testing. A minor gap is the lack of a linting or formatting tool, but the surface is coherent for its scope.
Maintenance
Related MCP Connectors
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
Run accessibility, contrast, and design token audits and file QA issues from your AI coding tool.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides AI assistants with advanced frontend debugging capabilities through 36 specialized tools for inspecting React/Vue/Angular/Svelte applications. Uses Playwright browser automation and source map intelligence to analyze components, network requests, bundle optimization, and resolve production errors.-
- AlicenseBqualityDmaintenanceProvides AI assistants with tools to grade, generate, and validate UI components against the components.build specification. Supports searching documentation, checking compliance, and generating framework-agnostic accessible components.1121 npmApache 2.0
- AlicenseAqualityDmaintenanceProvides Figma integration, accessibility auditing, and React code generation tools.8MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI-powered UI design, repo intelligence, and frontend code generation tools, enabling assistants to scaffold projects, generate and modify UI components, manage design tokens, and analyze repositories.MIT