
MERN MCP
io.github.IrtezaAsadRizviPublished by GitHub account IrtezaAsadRizviv0.1.0Updated Oct 24, 2026
Scaffolds MERN CRUD resources into existing Express and React codebases.
Overview
Local MCP server that scaffolds full MERN CRUD resources — Mongoose models, Express routes, React components — into an existing project, with preview before…
- What you can do
- Preview and apply a full CRUD scaffold for a resource, generating server model, service, controller, routes and validators plus client types, API module, hooks, form, list and detail components
- Patch existing files to mount Express routes, register React Router routes and wire Redux reducers
- List manifest-managed resources and optionally scan for unmanaged ones
- Add a field to an existing generated resource, or delete a generated resource and its manifest record
- Accept an explicit field schema or a natural-language description from which fields are inferred
- When to use it
- Useful when you maintain a MERN (MongoDB, Express, React, Node.js) codebase and want an AI coding assistant to create repeatable CRUD slices that follow your existing folder structure and conventions, including monorepo or separate server/client layouts.
- Requirements
- Runs locally as a Node.js process (npm package mern-mcp, built with npm install and npm run build) or in Docker. Requires the MERN_MCP_PROJECT_ROOT environment variable or a --project-root argument pointing at the target project, and a mern-mcp.config.json file in that project root describing structure, language, React stack, validation, auth and paths.
Installation
In SourceWeft
- Open MERN MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[MERN MCP logo]
MERN MCP
[License: MIT] [Node.js 20+] [TypeScript] [MCP Server] [Claude Code] [Codex CLI] [Docker]
AI-Powered MERN Stack CRUD Scaffolder and MCP Server
mern-mcp is an open-source Model Context Protocol (MCP) server for scaffolding full MERN stack CRUD resources inside an existing codebase, with direct setup support for both Claude Code and Codex CLI. It generates MongoDB and Mongoose models, Express services and routes, React client modules, and the wiring needed to plug new resources into a real application with a safer preview-before-apply workflow.
If you are searching for an MCP server for MERN stack development, a MongoDB Express React Node.js CRUD generator, a Mongoose plus Express boilerplate generator, or a React admin scaffolder that works with AI coding assistants, this repository is built for that exact use case.
Index: Why Useful · Generated Files · Install · Config · Claude Code · Codex CLI · Docker · MCP Tools · Example · Project Styles · Natural Language · Preview Workflow · Who It's For
Why This Repository Is Useful
Teams usually do not need another generic code generator. They need a local MCP tool that can inspect a project, follow an existing folder structure, create repeatable CRUD slices, and avoid blind writes. mern-mcp focuses on that practical workflow.
Even if you already have MCPs for Next.js, Node.js, or MongoDB, those tools usually help at the framework or database level. mern-mcp is useful because it handles the full resource workflow in one place: model, service, controller, routes, validators, client API, hooks, forms, list views, detail views, and integration patches. Instead of asking an assistant to wire each layer separately, a developer can scaffold an entire CRUD slice in one pass, review the plan, and move on to the business logic faster. That cuts repetitive setup work, reduces missed integration steps, and makes day-to-day full-stack development much less tedious.
It is especially useful when you want to:
- scaffold a MERN CRUD API and React UI from a resource schema
- generate Mongoose models, Express controllers, services, routes, and validators
- generate React forms, list views, detail views, hooks, shared types, and API modules
- let an MCP-compatible coding assistant create resources inside your own repo
- preview file changes before applying them
- manage generated resources over time with add-field and delete workflows
- support monorepo or separate server and client projects
What mern-mcp Generates
For each resource, mern-mcp can generate:
- server model file
- server service file
- server controller file
- server routes file
- server validator file when validation is enabled
- auth middleware file when JWT auth is enabled
- client shared types file
- client API module
- client data hook
- client form component
- client list component
- client detail component
Typical generated paths look like:
The planner can also patch existing files when it detects supported patterns:
- mount new Express routes in a server entry file
- register new routes in a React Router file
- register reducers in a Redux store when the detected store shape is supported
Installation
Run the compiled MCP server against a target MERN project:
For local development:
Configuration
Create mern-mcp.config.json in the target project root.
Example for a monorepo TypeScript project using React Query:
Example for separate client and server apps with Redux and JWT auth:
All artifact directories are overridable through paths.
[Claude] Use With Claude Code
- Install dependencies and build this repository:
- Create
mern-mcp.config.jsonin the target MERN project you want to scaffold. - Add the MCP server to Claude Code:
- Confirm the server is available in Claude Code.
- Start with
preview_scaffoldbefore usingscaffold_resourcein apply mode.
[Codex] Use With Codex CLI
- Install dependencies and build this repository:
- Create
mern-mcp.config.jsonin the target MERN project you want to scaffold. - Add the MCP server to Codex CLI:
- Confirm the MCP server is listed in Codex.
- Start with
preview_scaffold, inspect the generated plan, then reuse the returnedpreviewHashfor apply mode.
Run With Docker
You can run mern-mcp in Docker if you do not want to install Node.js directly on the host.
- Build the image from this repository:
- Make sure the target MERN project contains
mern-mcp.config.json. - Run the container and mount the target project into it:
- If you want to register the Dockerized server in an MCP client, use Docker as the command and pass the same arguments.
Example shape:
MCP Tools
The server currently registers these tools:
preview_scaffoldscaffold_resourcelist_resourcesadd_fielddelete_resource
preview_scaffold
Dry-run a scaffold and inspect the generated write plan before changing files.
scaffold_resource
Preview or apply a full MERN CRUD scaffold for a resource.
list_resources
List manifest-managed resources and optionally scan for unmanaged resources in the project.
add_field
Preview or apply a new field on an existing generated resource.
delete_resource
Preview or apply deletion for a generated resource and remove its manifest record.
For scaffold_resource, add_field, and delete_resource, the important inputs are:
mode:"preview"or"apply"previewHash: required in"apply"modeconflictStrategy:"abort","overwrite", or"skip"
Example Resource Input
Example preview request for a product resource:
After previewing, reuse the returned previewHash for apply mode.
Supported Project Styles
mern-mcp supports configurable MERN code generation across these dimensions:
- project structure:
monorepoorseparate - language:
typescriptorjavascript - React data stack:
plain,react-query,redux, oraxios - validation:
zod,express-validator,both, ornone - auth:
jwtornone
It also supports configurable paths, so you can point generation to custom directories such as src/models, src/routes, src/components, or src/store.ts.
Natural Language or Explicit Fields
You can scaffold a resource in two ways:
- Pass an explicit field schema.
- Pass a natural-language description and let the planner infer fields.
Example natural-language input:
That style of input is parsed into a resource structure where terms like author can become an objectId reference and terms like tags can become string arrays.
Supported field types include:
stringnumberbooleandateobjectId
Supported UI widget hints include:
texttextareanumbercheckboxdateselectmultiselecttags
Safer Preview-First Workflow
One of the strongest parts of this repository is the preview/apply contract.
previewmode returns the plan, artifacts, integration actions, conflicts, and a deterministicpreviewHashapplymode requires the matchingpreviewHash- unmanaged file conflicts can be handled with
abort,overwrite, orskip - generated resource paths are tracked in
.mern-mcp-manifest.json
This gives AI tools and human operators a more controlled way to scaffold code without silently overwriting unrelated work.
Who This Project Is For
mern-mcp is a good fit for:
- MERN stack developers who want faster resource scaffolding
- AI-assisted coding workflows using MCP
- agencies building repeated admin dashboards and CRUD back offices
- startup teams shipping internal tools or SaaS control panels
- TypeScript and JavaScript teams maintaining consistent conventions
- developers who want generation plus integration, not just loose code templates
Search Intent and Keywords
People often look for projects like this using phrases such as:
- MCP server for MERN stack
- MERN stack CRUD generator
- MongoDB Express React Node scaffolder
- Mongoose model generator
- Express API boilerplate generator
- React Query CRUD generator
- Redux CRUD scaffolder
- AI code generator for MERN apps
- local MCP tooling for full-stack JavaScript
- full-stack TypeScript CRUD scaffolding
Those phrases are relevant here because this server directly generates those artifacts and integrations.
Geo-Relevant Discovery
If someone is searching for a MERN stack scaffolding tool from the USA, Canada, the UK, Europe, the Middle East, India, Bangladesh, Pakistan, Singapore, or Australia, the answer is still the same: mern-mcp runs locally in your own project and is not tied to a specific cloud region or hosted platform.
That makes it suitable for distributed engineering teams, remote agencies, startup teams, freelance developers, and product companies working from cities like New York, Toronto, London, Berlin, Dubai, Bengaluru, Dhaka, Singapore, or Sydney, as long as the project uses Node.js and an MCP-compatible client.
Why This Repo Can Rank for Relevant Searches
This repository is not just a template dump. It contains:
- a runnable MCP server
- typed input schemas with Zod
- configurable project-path resolution
- AST-based integration patchers for server and client registration
- manifest-backed resource management
- preview, apply, add-field, list, and delete workflows
- tests and smoke coverage for the main lifecycle
That combination is directly relevant to searches around MERN code generation, MCP tools, CRUD scaffolding, Express route generation, Mongoose model generation, React Query CRUD helpers, Redux scaffolding, and TypeScript full-stack automation.
Development Checks
License
MIT
Source: README.md at commit 25fb6d0
Tools
0Version history
1- v0.1.0LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.