frontend-dev-mcp
Generates an Axios-based API client from OpenAPI specifications.
Detects ESLint configuration files as part of project structure scanning.
Scans Next.js App Router and Pages Router projects to detect routes, layouts, and API files, and identifies the framework as nextjs.
Detects npm as a package manager in project structure scanning.
Detects pnpm as a package manager in project structure scanning.
Detects Prettier configuration files as part of project structure scanning.
Scans React projects to detect framework setup, routes, modules, and configuration files; also checks for i18n issues and hardcoded Chinese text in JSX.
Optionally generates React Query hooks for API operations when generateHooks is enabled.
Planned future support for React Router AST-based route scanning (mentioned in development roadmap).
Generates TypeScript types from OpenAPI schemas, including path/query/body parameter types, and uses TypeScript AST for i18n scanning.
Scans Vite + React projects to identify routes, modules, and config files like vite.config.*.
Used for testing the MCP server (implementation detail, but explicitly listed in Tech Stack).
Reads OpenAPI YAML files for API type generation.
Detects Yarn as a package manager in project structure scanning.
Used as part of the MCP server's technical stack for input validation (though it is an implementation detail, it is listed explicitly in the Tech Stack).
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., "@frontend-dev-mcp check i18n issues in the current project with default settings"
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.
frontend-dev-mcp
frontend-dev-mcp is an MCP Server designed for frontend development scenarios. Its goal is to encapsulate capabilities such as project structure understanding, OpenAPI type generation, and i18n engineering governance into standardized AI Tools, helping AI assistants understand frontend repositories faster and assisting developers with repetitive engineering tasks.
Current Capabilities
Tool | Status | Description |
| Implemented | Scans locale JSON and source code based on TypeScript AST to check for missing keys, unused keys, and hardcoded Chinese text in JSX. |
| Implemented | Reads OpenAPI JSON/YAML, filters operations by tag, and generates TypeScript types and fetch/axios clients. |
| Implemented | Identifies frontend frameworks, package managers, routing, module directories, and key configuration files. |
All tools return the following uniformly:
{
content: [{ type: "text", text: result.summary }],
structuredContent: result
}Related MCP server: Text-Toolkit
Tech Stack
TypeScript
MCP TypeScript SDK
zod/v3stdio transport
Vitest
Quick Start
Install dependencies:
npm installStart the MCP Server in development mode:
npm run devBuild the production version:
npm run buildStart the built server:
npm run startRun type checking:
npm run typecheckRun tests:
npm run testRun only tool function-level tests:
npm run test:unitRun MCP stdio integration tests after building:
npm run test:integrationMCP Client Configuration Example
After building, you can connect the server as a stdio MCP server to clients that support MCP.
Example configuration:
{
"mcpServers": {
"frontend-dev-mcp": {
"command": "node",
"args": [
"C:/Users/wangqi/Downloads/frontend-dev-mcp/dist/index.js"
]
}
}
}During the development phase, you can also use tsx to run the source code directly:
{
"mcpServers": {
"frontend-dev-mcp": {
"command": "npx",
"args": [
"tsx",
"C:/Users/wangqi/Downloads/frontend-dev-mcp/src/index.ts"
]
}
}
}Tool: check_i18n_issues
Input Parameters
type CheckI18nIssuesInput = {
rootDir?: string;
localeDir?: string;
defaultLocale?: string;
checkHardcodedText?: boolean;
checkMissingKeys?: boolean;
checkUnusedKeys?: boolean;
include?: string[];
exclude?: string[];
};Default values:
rootDir: Current working directorylocaleDir:src/localesdefaultLocale:encheckHardcodedText:truecheckMissingKeys:truecheckUnusedKeys:trueinclude:["src/**/*.{ts,tsx,js,jsx}"]exclude:["**/*.test.*", "**/*.spec.*", "**/node_modules/**", "**/dist/**"]
Output Structure
type CheckI18nIssuesOutput = {
localeDir: string;
locales: string[];
missingKeys: Array<{
locale: string;
key: string;
basedOn: string;
}>;
hardcodedTexts: Array<{
file: string;
text: string;
line?: number;
}>;
unusedKeys: Array<{
locale: string;
key: string;
}>;
summary: string;
};Supported Scanning Capabilities
Reads
.jsonlocale files underlocaleDir.Flattens nested locale objects into dot-notation paths, e.g.,
profile.title.Identifies
t("key")in source code.Identifies
const key = "profile.title"; t(key)in source code.Identifies
intl.formatMessage({ id: "key" })in source code.Identifies
<Trans i18nKey="key" />in JSX.Checks for missing keys in other languages based on
defaultLocale.Checks for keys that exist in locale files but are not referenced in the source code.
Checks for hardcoded Chinese text in JSX text nodes, string expressions, and visible attributes, such as
title,placeholder,alt, andlabel.Supports ignore comments:
File-level:
/* i18n-ignore-file */or// i18n-ignore-fileLine-level:
// i18n-ignoreor{/* i18n-ignore */}, ignores key usage and hardcoded text scanning for the current and next line.
Ignore Examples
Ignore an entire file:
/* i18n-ignore-file */
export function DebugPanel() {
return <button type="button">调试按钮</button>;
}Ignore a single line or the next line:
// i18n-ignore
const title = t("debug.title");
{/* i18n-ignore */}
<button type="button" title="临时按钮">临时保存</button>Tool: generate_api_types
Input Parameters
type GenerateApiTypesInput = {
source: string;
outputDir?: string;
clientStyle?: "fetch" | "axios";
generateHooks?: boolean;
includeTags?: string[];
excludeTags?: string[];
};Default values:
outputDir:src/generated/apiclientStyle:fetchgenerateHooks:false
Output Structure
type GenerateApiTypesOutput = {
source: string;
outputDir: string;
files: Array<{
path: string;
kind: "types" | "client" | "hooks";
}>;
operationsCount: number;
schemaCount: number;
summary: string;
};Supported Generation Capabilities
Reads local or HTTP/HTTPS OpenAPI JSON/YAML.
Reads
components.schemasand generatestypes.ts.Reads
pathsoperations and generatesclient.ts.Generates types for path/query/request body parameters.
Integrates path parameter replacement, query parameters, and JSON request body in the client.
Supports both
fetchandaxiosclient styles.Supports
includeTags/excludeTagsfor operation filtering.Supports generating basic React Query hooks files when
generateHooks = true.
Current limitations:
Limited support for complex OpenAPI schema combinations, e.g.,
oneOf,anyOf,allOfare not yet expanded.Generated hooks require the business project to install
@tanstack/react-queryindependently.
Tool: get_project_structure
Input Parameters
type GetProjectStructureInput = {
rootDir?: string;
includeRoutes?: boolean;
includeModules?: boolean;
includeConfigs?: boolean;
maxDepth?: number;
};Default values:
rootDir: Current working directoryincludeRoutes:trueincludeModules:trueincludeConfigs:truemaxDepth:4
Output Structure
type GetProjectStructureOutput = {
rootDir: string;
framework: "react" | "nextjs" | "vite-react" | "unknown";
packageManager: "npm" | "pnpm" | "yarn" | "unknown";
routes?: Array<{
path: string;
file: string;
kind: "page" | "layout" | "api" | "unknown";
}>;
modules?: Array<{
name: string;
path: string;
role: "pages" | "components" | "services" | "hooks" | "store" | "i18n" | "unknown";
}>;
configFiles?: Array<{
name: string;
path: string;
}>;
summary: string;
};Supported Scanning Capabilities
Identifies
nextjs,vite-react,react,unknown.Identifies
pnpm,npm,yarn.Scans Next.js App Router:
app/**/page.tsx,src/app/**/page.tsx.Scans Next.js Pages Router:
pages/**/*.tsx,src/pages/**/*.tsx.Scans React/Vite pages directory:
src/pages/**/*.tsx.Identifies common module directories:
components,services,hooks,store,locales,i18n.Identifies key configuration files:
package.json,vite.config.*,next.config.*,tsconfig.json, ESLint, Prettier, Tailwind configurations.
Usage Examples
Example 1: Checking i18n issues in test fixtures
Tool: check_i18n_issues
Input:
{
"rootDir": "tests/fixtures/i18n-missing-keys",
"localeDir": "src/locales",
"defaultLocale": "en"
}Expected result summary:
检测到 2 个语言资源:en, zh-CN;发现 2 个缺失 key;1 处硬编码文案;3 个未使用 key。Structured result example:
{
"localeDir": "src/locales",
"locales": ["en", "zh-CN"],
"missingKeys": [
{
"locale": "zh-CN",
"key": "common.cancel",
"basedOn": "en"
},
{
"locale": "zh-CN",
"key": "profile.title",
"basedOn": "en"
}
],
"hardcodedTexts": [
{
"file": "src/App.tsx",
"text": "保存",
"line": 7
}
],
"unusedKeys": [
{
"locale": "en",
"key": "common.cancel"
},
{
"locale": "en",
"key": "common.submit"
},
{
"locale": "zh-CN",
"key": "common.submit"
}
]
}Example 2: Checking only for missing keys
Tool: check_i18n_issues
Input:
{
"rootDir": "tests/fixtures/i18n-missing-keys",
"localeDir": "src/locales",
"defaultLocale": "en",
"checkMissingKeys": true,
"checkUnusedKeys": false,
"checkHardcodedText": false
}Suitable for use in CI checks where only the integrity of multilingual resources is a concern.
Example 3: Limiting the source code scanning scope
Tool: check_i18n_issues
Input:
{
"rootDir": "tests/fixtures/i18n-missing-keys",
"localeDir": "src/locales",
"include": ["src/**/*.{ts,tsx}"],
"exclude": [
"**/*.test.*",
"**/*.spec.*",
"**/node_modules/**",
"**/dist/**"
]
}Suitable for excluding test files, build artifacts, and dependency directories in actual business repositories to reduce false positives.
Example 4: Generating API types and client
Tool: generate_api_types
Input:
{
"source": "tests/fixtures/openapi-basic/openapi.json",
"outputDir": "src/generated/api",
"clientStyle": "fetch",
"generateHooks": false,
"includeTags": ["user"]
}Expected result summary:
从 tests/fixtures/openapi-basic/openapi.json 生成 1 个 schema、1 个 operation,输出 2 个文件到 src/generated/api。Generated files:
src/generated/api/
types.ts
client.tsExample 5: Scanning project structure
Tool: get_project_structure
Input:
{
"rootDir": "tests/fixtures/vite-react-basic",
"includeRoutes": true,
"includeModules": true,
"includeConfigs": true,
"maxDepth": 4
}Expected results will return the framework, package manager, routing, module directories, key configuration files, and a summary.
Project Structure
frontend-dev-mcp/
docs/
technical-design.md
src/
index.ts
tools/
checkI18nIssues.ts
generateApiTypes.ts
getProjectStructure.ts
tests/
fixtures/
i18n-missing-keys/
next-app-router/
openapi-basic/
vite-react-basic/
checkI18nIssues.test.ts
generateApiTypes.test.ts
getProjectStructure.test.ts
package.json
tsconfig.json
vitest.config.tsTest Fixtures
Current test fixtures cover:
i18n-missing-keys: Used to verify missing keys, unused keys, and hardcoded Chinese.openapi-basic: Used for subsequent OpenAPI codegen testing.vite-react-basic: Used for subsequent Vite React project structure scanning.next-app-router: Used for subsequent Next.js App Router project structure scanning.
Tests are divided into two layers:
Function-level integration tests: Directly call tool handlers in
src/tools/*to verify business logic and structured output.MCP stdio integration tests: Start the built
dist/index.js, call real tools via the MCP SDK client to verify server registration, transport, and return format.
Development Roadmap
check_i18n_issues: MVP completed.generate_api_types: JSON/YAML, tag filtering, basic parameter and request body generation completed; complex schemas and more complete hooks to be added later.get_project_structure: MVP completed; React Router AST parsing, monorepo workspace identification, and more complete configuration scanning to be added later.
For a more complete design description, see docs/technical-design.md.
Available Tools
3 toolscheck_i18n_issuesB
Scan locale resources and source files for missing keys, unused keys, and hardcoded text.
Inputs: rootDir, localeDir, defaultLocale, checkHardcodedText, +4 more.
generate_api_typesB
Generate TypeScript API types and client code from an OpenAPI spec.
Inputs: source (required), outputDir, clientStyle, generateHooks, +2 more.
get_project_structureB
Analyze the frontend project structure, routes, modules, and key config files.
Inputs: rootDir, includeRoutes, includeModules, includeConfigs, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool addresses a distinct frontend development concern: i18n checking, API type generation, and project structure analysis. There is no overlap in functionality.
All tool names follow a consistent verb_noun pattern (check_i18n_issues, generate_api_types, get_project_structure) using snake_case, making them predictable.
Three tools is minimal but appropriate for a focused frontend developer assistant covering common tasks. The scope feels slightly thin but not insufficient.
The tools cover i18n, API types, and project structure, but miss other common frontend tasks like linting, dependency checks, or component scaffolding. Some gaps exist but core utilities are present.
Maintenance
Related MCP Connectors
MCP Server for JFrog, providing tools for development and artifact management.
An MCP server that provides asset auto generator
MCP server for Product Management
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn AI-powered MCP server that provides development tools for code analysis, documentation, and project management including code pattern extraction, humorous code reviews, TODO scanning, and PRD generation.10 npmISC
- AlicenseCqualityDmaintenanceAn MCP server that provides text conversion, formatting, and analysis functions, which can be directly integrated into the development workflow.432Apache 2.0
- AlicenseAqualityDmaintenanceAn MCP server that scaffolds full-stack projects with consistent structure, Docker setup, CI/CD pipelines, and database configuration.6MIT
- AlicenseCqualityFmaintenanceMCP server for project management automation, providing tools for project health, documentation, task management, security scanning, and CI/CD validation.271MIT