Backgen MCP Server

Generate Express.js backend projects with ORMs, auth, payments, and DevOps

Local serverstdioTypeScript

What is the Backgen MCP server?

Backgen MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Generate Express.js backend projects with ORMs, auth, payments, and DevOps.

What you get

BackGen ships a built-in MCP (Model Context Protocol) server that AI assistants (Claude, Cursor, GitHub Copilot, VS Code) can use to scaffold projects on your behalf.

  • Express + TypeScript — — strict mode, ESLint 9 (flat config), Vitest
  • Multi-ORM — — Prisma, Drizzle, or Mongoose. Pick at init time, switch later via the manifest
  • SaaS-ready — — saas-core preset ships Organizations, Memberships, Invitations, RBAC, tenant-scoped queries
  • Hardened by default — — helmet, strict CORS, request ID, request timeout, xss + mongo-sanitize, graceful shutdown, /health + /ready, error envelope
  • Plugin System — — JWT, Clerk, Stripe, S3, ratelimit via backgen add
  • Resource Generator — — CRUD modules with relations, validation, Swagger

Setting it up

The server ships on npm as @ibrahimkhaled19/backgen, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

What the assistant can call

Once Backgen is connected, these are the calls the assistant has available:

  • healthcare — Patient, Doctor, Appointment, Prescription, MedicalRecord — appointments between patients and doctors, prescriptions linked to patients, medical
  • saas — Organization, Team, Membership, Subscription, Invoice — organizations with teams and memberships, subscriptions with invoices
  • ecommerce — Category, Product, Cart, Order, OrderItem, Payment — products in categories, carts with items, orders with line items and payments

Configuration and credentials

You will need 2 environment variables: DATABASE_URL, JWT_REFRESH_SECRET. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the backgen mcp server does with a few real requests.

Choosing this one

Plenty of payments and commerce servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Backgen's toolset — healthcare, saas, ecommerce — is a fair guide to whether it matches your workflow. It is maintained by IbrahimKhaled19; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
healthcarePatient, Doctor, Appointment, Prescription, MedicalRecord — appointments between patients and doctors, prescriptions linked to patients, medical records per patient.
saasOrganization, Team, Membership, Subscription, Invoice — organizations with teams and memberships, subscriptions with invoices.
ecommerceCategory, Product, Cart, Order, OrderItem, Payment — products in categories, carts with items, orders with line items and payments.

How to install the Backgen MCP server

{
  "mcpServers": {
    "backgen": {
      "command": "npx",
      "args": ["-y", "@ibrahimkhaled19/backgen"],
      "env": {
        "DATABASE_URL": "your-value",
        "JWT_REFRESH_SECRET": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
DATABASE_URLEndpoint or connection string the server talks to.Yes
JWT_REFRESH_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • Use Backgen to healthcare.
  • Use Backgen to saas.
  • Use Backgen to ecommerce.

Frequently asked questions

It connects Backgen to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (healthcare, saas, ecommerce) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Backgen directly.