React Patterns MCP Server
Provides tools and resources for exploring and comparing React design and rendering patterns, including HOC, Hooks, Compound, Container/Presentational, Render Props, CSR, SSR, SSG, ISR, Progressive Hydration, Streaming SSR, RSC, and Selective Hydration.
Click on "Install 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 Patterns MCP ServerCompare SSR and CSR patterns"
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 Patterns MCP Server v2
A comprehensive MCP (Model Context Protocol) server that teaches and applies React architecture, design patterns, and best practices — covering everything from patterns.dev/react.
Built in TypeScript / Node.js for use with Claude Code.
Features
Category | Tools |
Pattern Reference | All patterns.dev/react patterns with full details, comparisons, recommendations |
Code Analyzer | Detect anti-patterns and suggest refactors in existing React code |
Template Engine | Ready-to-use TypeScript code templates per pattern |
Scaffold | Generate project skeleton based on architecture + patterns |
Architecture Doc | ADR generator that recommends patterns for your project |
Live Docs | Fetch docs.react.dev + React version-aware API guidance |
Mobile | Tailwind responsive patterns + React Native layouts |
Memory | Persist project state between sessions |
Task Planner | Break goals into parallelisable subtasks for Claude subagents |
Token Optimizer | Compress outputs, manage response cache |
Related MCP server: PatternFly MCP Server
Covered Patterns
🎨 Design Patterns
ID | Pattern |
| Higher-Order Component (HOC) |
| Hooks Pattern |
| Compound Pattern |
| Container / Presentational |
| Render Props |
| Observer / Pub-Sub (Zustand) |
| Provider (React Context) |
| Prototype / Object Pool |
| Module / Feature Slice |
| Singleton (API clients, stores) |
⚙️ Rendering Patterns
ID | Pattern |
| CSR (Vite SPA, dashboards) |
| SSR (Next.js per-request) |
| SSG (Next.js build-time) |
| ISR (stale-while-revalidate) |
| Progressive Hydration |
| Streaming SSR |
| RSC (Next.js App Router) |
| Selective Hydration (React 18) |
⚡ Performance Patterns
ID | Pattern |
| Dynamic Import / Code Splitting |
| Import on Visibility (IntersectionObserver) |
| Import on Interaction (defer until click/hover) |
| Route-Based Code Splitting |
| Bundle Splitting / Vendor Chunking |
| Tree Shaking (dead-code elimination) |
| Preload Critical Resources |
| Prefetch Next-Page Resources |
| PRPL Pattern (PWA loading strategy) |
Tool Reference
Tool | Description |
| All patterns grouped by category |
| Performance patterns only |
| Full detail + code example for a pattern |
| Side-by-side comparison of 2–5 patterns |
| Describe a problem, get pattern recommendations |
| Call this first — shows architecture options |
| Generate project skeleton |
| Detect anti-patterns in React code |
| Ready-to-use TypeScript code template |
| ADR — which patterns and why for your project |
| Live fetch from docs.react.dev with version guidance |
| Persist and recall project context across sessions |
| Break a goal into parallelisable subtasks |
| Compress verbose responses to save tokens |
Installation
Prerequisites
Node.js 20+
npm or pnpm
Setup
git clone https://github.com/1beyza/react-patterns-mcp.git
cd react-patterns-mcp
npm install
npm run buildAdd to Claude Code
In your project's .claude/mcp.json (or global ~/.claude/mcp.json):
{
"mcpServers": {
"react-patterns": {
"command": "node",
"args": ["/absolute/path/to/react-patterns-mcp/dist/index.js"]
}
}
}Or run directly for testing:
npm run dev # tsx (no build needed)Usage Workflows
New Project
1. create_task_plan — break the goal into subtasks
2. generate_architecture_doc — get pattern recommendations + ADR
3. scaffold_project — generate directory structure + setup commands
4. get_code_template — get starter code for each essential pattern
5. save_memory — persist architecture choicesExisting Project Improvement
1. analyze_code — detect issues and pattern opportunities
2. compare_patterns — compare alternatives
3. suggest_refactor — get a refactor plan toward a target pattern
4. get_code_template — get the target pattern's starter codeQuick Pattern Lookup
list_all_patterns — browse everything
get_pattern <id> — full details + code example
find_pattern_for_use_case — describe your problem, get recommendationsArchitecture
react-patterns-mcp/
├── src/
│ ├── index.ts # MCP server entry — registers all tools
│ ├── tools/ # Tool layer — MCP tool handlers
│ │ ├── index.ts # Barrel export
│ │ ├── pattern-tools.ts # Pattern query / compare / recommend
│ │ ├── scaffold-tools.ts # Project scaffolding
│ │ ├── analyzer-tools.ts # Code analysis + refactor suggestions
│ │ ├── template-tools.ts # Code template retrieval
│ │ ├── architecture-tools.ts # ADR generation
│ │ ├── docs-tools.ts # Live React docs + version guidance
│ │ ├── mobile-tools.ts # Mobile / responsive patterns
│ │ ├── memory-tools.ts # Project state persistence
│ │ ├── task-planner-tools.ts # Subtask decomposition
│ │ └── token-optimizer-tools.ts # Output compression + cache
│ ├── data/ # Data layer — pure data, no MCP logic
│ │ ├── patterns.ts # All design & rendering pattern definitions
│ │ ├── templates.ts # Code templates per pattern
│ │ └── mobile-patterns.ts # Mobile responsiveness patterns
│ └── utils/ # Utility layer — shared functions
│ ├── validator.ts # Zod schemas for all tool inputs
│ ├── formatter.ts # Markdown output formatting
│ ├── cache.ts # TTL response cache
│ └── file-io.ts # Memory persistence (JSON files)
├── memory/ # Runtime project memory (gitignored)
├── dist/ # Compiled JavaScript output
├── package.json
├── tsconfig.json
└── README.mdLayer rules:
data/— pure data objects, no side effectsutils/— pure functions and shared helpers, no MCP awarenesstools/— MCP tool handlers; validate with Zod, call data/utils, return stringsindex.ts— MCP protocol binding only; no business logic
All MCP Tools
Tool | Description |
| List all patterns with summaries |
| List design patterns only |
| List rendering patterns only |
| Full details + code example for a pattern |
| Side-by-side comparison of 2–5 patterns |
| Describe your problem → get recommendations |
| Patterns related to a given pattern |
| Quick pros/cons for a pattern |
| Generate full project scaffold |
| Detect anti-patterns in React code |
| Refactor plan toward a target pattern |
| Get ready TypeScript code for a pattern |
| List all available code templates |
| ADR with pattern recommendations |
| Live docs.react.dev content |
| Version-specific API guidance |
| Mobile/responsive pattern details |
| Tailwind responsive design guide |
| Persist project state to disk |
| Retrieve saved project state |
| Delete project memory |
| List all projects with saved state |
| Break a goal into parallelisable subtasks |
| Reduce token cost of verbose output |
| View response cache statistics |
| Clear all response caches |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/1beyza/react-patterns-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server