BackendGen MCP server
io.github.SiTouhemi/backendgen·v0.2.2Validate compact backend specs and generate tested NestJS, Prisma, and PostgreSQL repositories.
0 stars28 downloads/wk
Reviews
Write oneNobody has reviewed BackendGen yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
BackendGen tools (12, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
describe_featureOne feature's configuration JSON Schema, dependencies, conflicts and worked examples.
describe_targetFull detail for one target: databases, capabilities and project commands.
explain_customization_pointsWhere to put custom code for a specification, and which interface each extension point expects.
generate_backendGenerate the backend. Refuses by default if a generated file was edited by hand; pass force to overwrite. Never overwrites src/custom/.
get_capabilitiesWhat this compiler can generate: specification version, targets, features and response limits. Call this first.
get_generation_reportRead the generation manifest of an already-generated project: versions, checksums and file ownership.
inspect_specCompile a specification and return the normalized backend IR: entities, endpoints, events, secrets and infrastructure.
list_featuresFeature packs available, with their dependencies and conflicts. Use describe_feature for the configuration schema.
list_targetsBackend targets this compiler can generate, with their supported databases.
preview_generationDry run: what generation would create, update, delete or refuse to overwrite. Writes nothing.
run_generated_testswrite actionRun the generated project's test suites and return counts, not logs. Integration tests need a reachable database.
validate_specValidate a specification. Returns stable error codes and JSON pointers, so a failure can be fixed without guessing.
Public scan report
scanner v0.1.9 · 2026-09-25 · same rubric, same numbers if you re-run it
- Code scan3 source files scanned15/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 63 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (2)
- mediumeval / new Function used
exec.evaldist/backendgen-mcp.cjs: …ode, sch); const makeValidate = new Function(`${names_1.default.self}`, `${names_1.de… - mediumNetwork call to a raw IP address
net.raw-ipdist/backendgen-mcp.cjs: … expect(assertValidWebhookUrlShape('https://8.8.8.8/ingest').hostname).toBe('8.8.8.8'); })…
How BackendGen compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 72/100
- higher than 38% of 48,255 servers
- Tools
- 12
- the typical server has 7
- Tools that change things
- 8%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 28
- more than 15% of 12,191 servers with a package
What its tools let an agent do: 10 read · 1 create · 1 run or deploy
Install BackendGen in Claude Code, Cursor or VS Code
Runs npx -y @2hemi/backendgen-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add backendgen -- npx -y @2hemi/backendgen-mcp
What the publisher says
From the BackendGen repository's README, as published. We do not edit it. Read it on GitHub
BackendGen
BackendGen is a deterministic backend compiler for AI coding agents. Give an agent a compact, versioned YAML or JSON specification and it can generate a structured, tested backend instead of inventing database models, permissions, API routes, and migrations from scratch.
It currently generates NestJS 11 + Prisma 6 + PostgreSQL repositories, including a typed TypeScript client and a small frontend-contract.json for the frontend agent to consume. Generated projects have no BackendGen runtime dependency.
Alpha status: BackendGen is ready for design-partner trials and local
projects. Review generated applications before production use; it has not yet
completed independent security review or three design-partner trials.
npm CLI · npm MCP server · Report an issue · Design-partner program
What it is for
BackendGen is useful when an AI agent needs a real backend behind a frontend:
custom code;
- model entities, relations, filters, sorting, and pagination;
- add authentication, roles, row ownership, organizations, and tenant isolation;
- generate reservations, notifications, webhooks, durable jobs, and uploads;
- preserve a clean boundary between compiler-owned code and application-owned
and explicit review gates for destructive changes.
- safely regenerate after a specification changes, with incremental migrations
BackendGen is not a hosted backend service, deployment platform, or frontend builder. It runs locally and produces code that a developer or coding agent can review, customize, test, deploy, and connect to a frontend.
Requirements
- Node.js 22 or newer
- npm 10 or newer
- PostgreSQL only when you want to run a generated project's integration tests
Try it in five minutes
You do not need an npm account or this repository to try BackendGen.
mkdir backendgen-try
cd backendgen-try
npx -y @2hemi/backendgen init backend.yaml --name team-api
npx -y @2hemi/backendgen validate backend.yaml
npx -y @2hemi/backendgen generate backend.yaml --output ./team-api
cd team-api
npm install
npm testThe generated project runs prisma generate during installation, so this first-run path does not require a separate Prisma command. From the parent directory, use npx -y @2hemi/backendgen test-generated --output ./team-api --install when an agent should perform installation, validation, build, and unit tests through one bounded compiler command.
init creates a valid starter specification. Edit backend.yaml, then run validate and generate again. Before regenerating an existing project, use diff to preview what would change:
npx -y @2hemi/backendgen diff backend.yaml --output ./team-apiTest a complete SaaS example
The repository includes working specifications from basic CRUD to a full-featured backend. This multi-tenant task example is a good first test:
git clone https://github.com/SiTouhemi/Backendgen.git
cd Backendgen
npx -y @2hemi/backendgen validate examples/saas-tasks/backend.yaml
npx -y @2hemi/backendgen generate examples/saas-tasks/backend.yaml --output ./generated/saas-tasks
cd generated/saas-tasks
npm install
npm testBrowse every example and what it demonstrates in examples/README.md:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
BackendGen: common questions
- Is BackendGen MCP server safe?
- Mostly: it is graded B (72/100). Read the BackendGen safety report
- How do I install BackendGen?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does BackendGen need an API key?
- No secret keys are declared. It reads 1 setting from the environment.
- Is BackendGen maintained?
- The last commit was 103 days ago (2026-07-24). The latest release is v0.2.2.
- How does BackendGen compare with other MCP servers?
- safety score 72/100 (higher than 38% of 48,255 servers); tools 12 (the typical server has 7); tools that change things 8% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.