MCP Frontend Tools Server
mcp-frontend-tools
El servidor de referencia del Model Context Protocol para trabajo frontend. Una instalación le da a cualquier agente de programación — Claude Desktop, Cursor, VS Code, Zed, Continue — ojos y manos reales sobre tu interfaz:
axe_audit— ejecuta el motor de reglas realaxe-corecontra HTML sin procesar (vía jsdom) o una URL en vivo (vía Playwright). Devuelve violaciones agrupadas por impacto WCAG con enlaces de corrección.page_screenshot— PNGs de Chromium headless de cualquier URL o selector CSS, con controles de viewport / DPR / esquema de color /waitForSelector.bundle_budget_check— recorre un directoriodist/, calcula tamaños gzip (+ brotli opcional), aplica un presupuesto en KB global o por entrada. JSON de aprobado/fallo listo para CI.design_token_diff— diferencia estructural de dos archivos de tokens W3C DTCG / Style Dictionary. Informa de tokens añadidos / eliminados / cambiados con notas que reconocen$type.storybook_story_run— carga una historia individual de Storybook en Chromium headless víaiframe.html?id=…, toma una captura de pantalla y ejecuta una auditoría axe solo sobre el componente renderizado.scaffold_react_component— emite un componente React tipado (funcional /forwardRef/aspolimórfico) además de pruebas Vitest e historias de Storybook opcionales.
Todas las herramientas devuelven JSON estructurado sobre el que el modelo puede razonar. Sin envoltorios personalizados por editor.
Instalación
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 chromiumSe requiere Node ≥ 20. Sin Playwright, el servidor aún se inicia; esas tres herramientas devolverán un error claro de "instalar playwright" si se llaman.
Claude Desktop
Añadir a ~/Library/Application Support/Claude/claude_desktop_config.json (o el equivalente en Windows):
{
"mcpServers": {
"frontend-tools": {
"command": "mcp-frontend-tools"
}
}
}Cursor
Settings → MCP → Add new server:
{
"frontend-tools": { "command": "mcp-frontend-tools" }
}VS Code (modo agente de GitHub Copilot)
Añadir a .vscode/mcp.json:
{
"servers": {
"frontend-tools": { "command": "mcp-frontend-tools" }
}
}MCP Inspector
npx @modelcontextprotocol/inspector mcp-frontend-toolsRelated MCP server: Components Build MCP
Referencia de herramientas
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
}Devuelve violaciones y reglas incompletas con impact, help, helpUrl y hasta 5 nodos de ejemplo fallidos por regla.
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;
}Devuelve cada archivo con tamaños raw / gzip / brotli, su presupuesto aplicado y status: "pass" | "fail".
design_token_diff
{
beforePath: string;
afterPath: string;
ignoreKeys?: string[];
}Entiende la forma W3C DTCG ($value, $type). Las claves de metadatos de grupo que comienzan con $ se ignoran. Los cambios de color / dimensión obtienen notes anotadas.
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;
}Carga ${storybookUrl}/iframe.html?viewMode=story&id=${storyId}, espera a #storybook-root e informa de cualquier error de página + violaciones de axe limitadas a la historia.
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 }>;
}¿Por qué esto en lugar de scripts ad-hoc?
Los agentes obtienen contratos tipados. Cada herramienta es un JSON Schema validado por Zod que el modelo puede inspeccionar.
Sin alucinaciones locales. Las violaciones de Axe provienen del motor real axe-core, no de una expresión regular. Los tamaños de paquete provienen de la compresión real
zlib, no de estimaciones.Componible. Fallo en
bundle_budget_check→ pide al agente que lleve el archivo más grande apage_screenshot→ alimenta la imagen en un paso de regresión visual. Todo a través de MCP.Superficie estable. Las herramientas cambian detrás de un aumento de versión; tu
.vscode/mcp.jsonno.
Desarrollo
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 checkLicencia
MIT © ashios15
mcp-frontend-tools
El servidor de referencia del Model Context Protocol para trabajo frontend. Una instalación le da a cualquier agente de programación — Claude Desktop, Cursor, VS Code, Zed, Continue — ojos y manos reales sobre tu interfaz:
axe_audit— ejecuta el motor de reglas realaxe-corecontra HTML sin procesar (vía jsdom) o una URL en vivo (vía Playwright). Devuelve violaciones agrupadas por impacto WCAG con enlaces de corrección.page_screenshot— PNGs de Chromium headless de cualquier URL o selector CSS, con controles de viewport / DPR / esquema de color /waitForSelector.bundle_budget_check— recorre un directoriodist/, calcula tamaños gzip (+ brotli opcional), aplica un presupuesto en KB global o por entrada. JSON de aprobado/fallo listo para CI.design_token_diff— diferencia estructural de dos archivos de tokens W3C DTCG / Style Dictionary. Informa de tokens añadidos / eliminados / cambiados con notas que reconocen$type.storybook_story_run— carga una historia individual de Storybook en Chromium headless víaiframe.html?id=…, toma una captura de pantalla y ejecuta una auditoría axe solo sobre el componente renderizado.scaffold_react_component— emite un componente React tipado (funcional /forwardRef/aspolimórfico) además de pruebas Vitest e historias de Storybook opcionales.
Todas las herramientas devuelven JSON estructurado sobre el que el modelo puede razonar. Sin envoltorios personalizados por editor.
Instalación
npm i -g @ashishjoshi/mcp-frontend-tools
# Optional — enables page_screenshot, storybook_story_run, and URL-mode axe_audit
npm i -g playwright
npx playwright install chromiumSe requiere Node ≥ 20. Sin Playwright, el servidor aún se inicia; esas tres herramientas devolverán un error claro de "instalar playwright" si se llaman.
Claude Desktop
Añadir a ~/Library/Application Support/Claude/claude_desktop_config.json (o el equivalente en Windows):
{
"mcpServers": {
"frontend-tools": {
"command": "mcp-frontend-tools"
}
}
}Cursor
Settings → MCP → Add new server:
{
"frontend-tools": { "command": "mcp-frontend-tools" }
}VS Code (modo agente de GitHub Copilot)
Añadir a .vscode/mcp.json:
{
"servers": {
"frontend-tools": { "command": "mcp-frontend-tools" }
}
}MCP Inspector
npx @modelcontextprotocol/inspector mcp-frontend-toolsReferencia de herramientas
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
}Devuelve violaciones y reglas incompletas con impact, help, helpUrl y hasta 5 nodos de ejemplo fallidos por regla.
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;
}Devuelve cada archivo con tamaños raw / gzip / brotli, su presupuesto aplicado y status: "pass" | "fail".
design_token_diff
{
beforePath: string;
afterPath: string;
ignoreKeys?: string[];
}Entiende la forma W3C DTCG ($value, $type). Las claves de metadatos de grupo que comienzan con $ se ignoran. Los cambios de color / dimensión obtienen notes anotadas.
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;
}Carga ${storybookUrl}/iframe.html?viewMode=story&id=${storyId}, espera a #storybook-root e informa de cualquier error de página + violaciones de axe limitadas a la historia.
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 }>;
}¿Por qué esto en lugar de scripts ad-hoc?
Los agentes obtienen contratos tipados. Cada herramienta es un JSON-Schema validado por Zod que el modelo puede inspeccionar.
Sin alucinaciones locales. Las violaciones de Axe provienen del motor real axe-core, no de una expresión regular. Los tamaños de paquete provienen de la compresión real
zlib, no de estimaciones.Componible. Fallo en
bundle_budget_check→ pide al agente que lleve el archivo más grande apage_screenshot→ alimenta la imagen en un paso de regresión visual. Todo a través de MCP.Superficie estable. Las herramientas cambian detrás de un aumento de versión; tu
.vscode/mcp.jsonno.
Desarrollo
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 checkLicencia
MIT © Ashish Joshi
Servidor de herramientas de frontend para MCP
Un servidor de Model Context Protocol (MCP) que da a los asistentes de IA (Claude, Copilot, Cursor) acceso a herramientas de desarrollo frontend — creación de componentes, análisis de paquetes, comprobaciones de accesibilidad y guías de diseño responsivo.
Herramientas disponibles
Herramienta | Descripción |
| Genera un componente React tipado con pruebas, historias y módulo CSS |
| Escanea un directorio de compilación en busca de JS/CSS sobredimensionado, informa de los hallazgos |
| Comprobaciones estáticas WCAG 2.2 en HTML con sugerencias de corrección |
| Genera patrones de CSS responsivo, consultas de contenedor y Tailwind |
Configuración
Claude Desktop
Añadir a ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"frontend-tools": {
"command": "node",
"args": ["/path/to/mcp-frontend-tools/dist/index.js"]
}
}
}VS Code con Copilot
Añadir a .vscode/settings.json:
{
"github.copilot.chat.mcpServers": {
"frontend-tools": {
"command": "node",
"args": ["${workspaceFolder}/mcp-frontend-tools/dist/index.js"]
}
}
}Ejemplo de uso (en chat de IA)
"Crea un componente UserProfileCard con props de avatar, nombre y biografía"
La IA llama a scaffold_react_component y obtiene:
UserProfileCard.tsx— Componente tipado con forwardRefUserProfileCard.test.tsx— Pruebas con Testing LibraryUserProfileCard.stories.tsx— Historia de StorybookUserProfileCard.module.css— Módulo CSSindex.ts— Exportación de barril
"Analiza mi carpeta dist/ en busca de problemas de tamaño de paquete"
La IA llama a analyze_bundle y devuelve un informe en markdown con archivos sobredimensionados, recomendaciones y una tabla resumen.
Arquitectura
src/
├── index.ts # MCP server setup (stdio transport)
└── tools/
├── index.ts # Tool definitions + router
├── scaffold-component.ts # React component generator
├── bundle-analyzer.ts # Build output analyzer
├── a11y-checker.ts # Static WCAG checks
└── responsive-guide.ts # Responsive CSS pattern generatorDesarrollo
npm install
npm run build
npm run inspector # Test with MCP InspectorLicencia
MIT
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