React Architecture Scaffolder MCP Server
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., "@React Architecture Scaffolder MCP Server Create a feature-based React project called dashboard-app"
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.
React Architecture Scaffolder MCP Server
A Model Context Protocol (MCP) server that helps developers quickly scaffold React projects with industry-standard architecture patterns.
Features
๐๏ธ 4 Architecture Patterns: Layered, Feature-Based, Atomic Design, and Clean Architecture
๐ Secure: Path validation prevents directory traversal attacks
โ Type-Safe: Full TypeScript with strict mode and Zod validation
๐งช Tested: Comprehensive unit test coverage
๐ฆ Production-Ready: Follows enterprise-grade standards
Related MCP server: mcp-react-frontend
Architecture Patterns
1. Layered (Standard)
Best for small apps and prototypes.
/components
/hooks
/services
/pages
/styles
/utils2. Feature-Based (Modular)
Best for medium-to-large apps with multiple domains.
/features/auth
/features/dashboard
/shared3. Atomic Design
Best for design-system heavy products.
/atoms
/molecules
/organisms
/templates
/pages4. Clean Architecture (MVVM/Hexagonal)
Best for enterprise apps with complex business logic.
/domain (entities, usecases)
/data (repositories, api)
/presentation (components, viewmodels)Installation
npm install
npm run buildConfiguration
Cursor IDE (Recommended)
Step 1: Build the MCP Server
cd C:\path\to\react-mcp
npm install
npm run buildStep 2: Configure Cursor
Open Cursor Settings:
Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(Mac)Type "Preferences: Open User Settings (JSON)"
Or go to:
FileโPreferencesโSettingsโ Click the{}icon (top right)
Add MCP Configuration:
Add this to your Cursor settings.json:
{
"mcp.servers": {
"react-architecture-scaffolder": {
"command": "node",
"args": [
"C:\\Users\\YOUR_USERNAME\\workspace\\react-mcp\\dist\\index.js"
],
"env": {},
"disabled": false
}
}
}Important: Replace YOUR_USERNAME with your actual Windows username!
Step 3: Restart Cursor
Close and reopen Cursor to load the MCP server.
Step 4: Verify Installation
Open Cursor Composer (chat)
Type: "describe all architectures"
If configured correctly, you'll see all 4 architecture patterns!
Alternative: Development Mode (For Testing Changes)
If you're actively developing the MCP server:
{
"mcp.servers": {
"react-architecture-scaffolder": {
"command": "npx",
"args": [
"tsx",
"C:\\Users\\YOUR_USERNAME\\workspace\\react-mcp\\index.ts"
],
"env": {},
"disabled": false
}
}
}Note: Development mode runs TypeScript directly (no build needed), but it's slower.
Claude Desktop
For Claude Desktop, add to claude_desktop_config.json:
Location:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonMac:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Configuration:
{
"mcpServers": {
"react-architecture-scaffolder": {
"command": "node",
"args": ["C:\\path\\to\\react-mcp\\dist\\index.js"]
}
}
}Restart Claude Desktop after configuration.
Tools
describe_architectures
Returns a detailed comparison of all architecture patterns.
Input: None
Output: Text description of all patterns with pros/cons.
scaffold_react_project
Creates a React project with the specified architecture pattern.
Input:
{
path: string; // Target directory (relative or absolute)
pattern_type: 'layered' | 'feature' | 'atomic' | 'clean';
}Output: Summary of created directories and files.
Usage Examples
In Cursor Composer
Once configured, you can use natural language to scaffold projects:
Example 1: Create a Layered project
Create a layered React project named my-appExample 2: Create a Feature-Based project
Create a feature-based project called dashboard-appExample 3: Get architecture info
Describe all four architecture patternsExample 4: Create in parent directory
Create a project in layered architecture with name ../my-projectCommon Commands
# After scaffolding, navigate to your project
cd my-project
# Install dependencies
npm install
# Start development server
npm run dev
# Run tests
npm test
# Build for production
npm run build
# Preview production build
npm run previewProject Structure Generated
Each scaffolded project includes:
โ TypeScript configured with strict mode
โ Vite for fast development and building
โ ESLint with React rules
โ Testing setup (Vitest + Testing Library)
โ CI/CD pipeline (GitHub Actions)
โ Docker configuration for deployment
โ Production-ready folder structure
โ Environment configuration
โ API client setup (axios)
โ State management structure
Development
Scripts
npm run dev # Run in development mode
npm run build # Build for production
npm run lint # Lint code
npm run typecheck # Type check
npm run test # Run tests
npm run format # Format codeTesting
npm testTests include:
Path validation security checks
Scaffolding for all patterns
Error handling
File/directory creation
Security
Path Traversal Protection: All paths are validated to prevent escaping the working directory
Safe File Creation: Uses
wxflag to prevent overwriting existing filesInput Validation: Zod schemas validate all tool inputs
No Secrets: No API keys or secrets in code
Troubleshooting
MCP Server Not Working in Cursor
Problem: Cursor doesn't recognize the MCP server
Solutions:
Verify build:
cd C:\path\to\react-mcp npm run buildMake sure
dist/index.jsexists.Check path in settings.json:
Path must use double backslashes:
C:\\Users\\...Or use forward slashes:
C:/Users/...Verify the file actually exists at that location
Restart Cursor completely:
Close all Cursor windows
Reopen Cursor
Wait 5-10 seconds for MCP to initialize
Check Cursor logs:
Open Developer Tools:
Ctrl+Shift+ILook for MCP-related errors in Console
Verify Node.js version:
node --version # Should be 18.x or higher
Creating Projects Fails
Problem: Project creation fails or creates old structure
Solution:
Rebuild the MCP server:
npm run buildRestart Cursor completely
Try creating the project again
Permission Errors
Problem: "Access denied" when creating files
Solution:
Ensure you have write permissions in the target directory
Try creating in a different location
Run Cursor as Administrator (not recommended, but works)
License
MIT
Contributing
Follow the existing code style (Prettier + ESLint)
Add tests for new features
Ensure all tests pass:
npm run lint && npm run typecheck && npm testUpdate documentation as needed
Available Tools
2 toolsdescribe_architecturesB
Compare common React architecture patterns and when to use each one.
Inputs: no named parameters.
scaffold_react_projectC
Create a React architecture folder structure and placeholder files.
Inputs: path (required), pattern_type (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 2 tools
The two tools serve clearly distinct purposes: one provides comparative information about React architecture patterns, and the other performs project scaffolding. There is no overlap in intent or expected agent behavior.
Both names follow the same verb_noun snake_case convention: describe_architectures and scaffold_react_project. The pattern is predictable and easy to parse.
Two tools is thin for a server with a named domain like React architecture scaffolding. The pair covers a basic learn-then-generate flow, but additional operations such as listing templates or validating a scaffold would make the surface feel better scoped.
The core workflow is covered: compare architecture options, then scaffold a matching project structure. Minor gaps remain, such as validating generated output or updating an existing scaffold, but agents can work around these by inspecting files directly.
Maintenance
Related MCP Connectors
React, Tailwind CSS and shadcn/ui components, sections and landing pages for coding agents.
Search, read and install agent-ready React components, screens and blocks for AI products.
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
React + Tailwind UI components and recipes your AI coding tool can search and install.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables rapid creation of new projects from predefined templates including React, Node.js, Django, Flask, and more. Provides comprehensive project scaffolding with file system operations, template management, and command execution capabilities.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to analyze and scaffold React/Next.js applications enforcing Feature-Sliced Design (FSD) conventions, providing tools for project analysis, rule retrieval, and entity generation.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables generating frontend project scaffolding for multiple frameworks (React, Vue, UmiJS, Electron) via natural language commands.45 npmMIT
- FlicenseNot gradedqualityDmaintenanceAutomates project scaffolding for Domain-Driven Design and Clean Architecture, providing professional naming, structure verification, and bilingual documentation generation.-