Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
init_projectA

Creates a new backend project directory with Express.js + TypeScript strict mode, ORM data layer (Prisma/Drizzle/Mongoose), Zod env validation, Swagger docs, Docker, ESLint, Vitest, and a .backgenrc.json manifest. Run add_plugin afterwards to add auth, payments, storage, rate-limiting, or CI/CD. Run generate_resource to add CRUD modules. Use --preset to generate a full domain (healthcare/saas/ecommerce/crm/lms) with pre-built resources and auto-installed JWT auth in one command. Call list_presets first to see what each domain preset includes. Typical generation takes 10–30 seconds with npm install being the longest step.

add_pluginA

Installs a feature plugin into an existing BackGen-generated project. Each plugin injects its own source files (controllers, routes, middleware, services), registers routes in app.ts, adds npm dependencies, injects environment variables into .env, and updates the .backgenrc.json manifest with ownership tracking. Call list_plugins first to see all available options with descriptions and categories. Run doctor afterwards to verify the project is healthy. IMPORTANT: jwt and clerk conflict — they cannot be installed together. The devops shorthand ('ci-github', 'dependabot', 'codeql', 'docker-registry', 'release') installs the full DevOps suite.

remove_pluginA

Removes a previously installed plugin from a BackGen-generated project. This is a destructive but safe operation: it deletes plugin-owned source files (controllers, routes, middleware), removes npm dependencies, strips injected environment variables from .env, reverts route registrations in app.ts, and removes the plugin entry from .backgenrc.json. User-owned files are never touched. Only files that the plugin originally installed are affected. Use this to undo an add_plugin command, switch auth providers (e.g. jwt → clerk), or clean up unused features. Run doctor afterwards to verify the project is healthy after removal. Run list_plugins first to see what's currently installed. Use add_plugin if you want to install (not remove) a plugin.

generate_resourceA

Generates a full CRUD module for a resource — controller with 5 REST endpoints (GET /:id, GET /, POST, PATCH /:id, DELETE /:id), service layer with business logic, repository with database operations, Zod validation schemas, TypeScript interfaces, route definitions auto-registered in the Express app with Swagger/OpenAPI docs, and a test file. If fields are not provided, the CLI will prompt interactively (use non-interactive mode by passing fields directly). Relations create foreign key columns in the database and populate the Prisma/Drizzle/Mongoose schema with the correct association types (belongsTo for singular, hasMany for plural relation names). Run add_plugin first if you need auth protection on the generated endpoints.

generate_seedA

Creates a database seed file for a resource — a script that inserts realistic development data into your database so you don't manually populate tables while building features. The seed file is ORM-aware: it outputs to prisma/seeds/.ts for Prisma, db/seeds/.ts for Drizzle, or seeds/.ts for Mongoose. Each seed record uses faker-generated realistic values matching the resource's field types. Run generate_resource first for the resource you want to seed. After generating, you run the seed via 'npm run seed' in the project directory to insert the data. Use count to control how many records to generate — 10 is fine for development, 50-100 for load testing or demo environments. Maximum 1000.

generate_factoryA

Creates a test factory file for a resource — a reusable builder that generates valid resource instances with sensible defaults for writing tests. Factories let you create test data in one line (e.g. createProduct({ name: 'Widget' })) instead of manually constructing full objects with required fields, timestamps, and relations every time. The generated factory is ORM-aware: it uses the same schema as your generated resource. Factories are written to src/factories/.factory.ts and use the faker library for realistic default values. Run generate_resource for a resource first — the factory matches its fields. Only PascalCase resource names are valid (e.g. 'Product', not 'product').

doctorA

Runs 6 health check categories against a BackGen-generated project and returns a structured pass/fail report for each one. (1) Runtime — Node version >= 18, npm availability. (2) Configuration — .env exists, DATABASE_URL is set, all required env vars from installed plugins are present. (3) Database — Prisma schema / Drizzle config / Mongoose connection string is reachable. (4) Dependencies — package.json deps match installed node_modules, no missing peer deps. (5) File integrity — every file tracked in .backgenrc.json exists on disk with the correct ownership classification (framework vs user). (6) Ownership — all files are properly classified as framework/shared/user, no orphaned plugins. Run this tool BEFORE telling the user that a project is ready to use. Use --fix to auto-resolve missing manifest entries and file ownership issues.

list_pluginsA

List all available BackGen plugins with their descriptions and categories. Call this first to show the user what features they can add, then call add_plugin with the chosen plugin name. Call list_presets to see domain presets.

list_presetsA

List all available domain presets with their pre-built resources and relationships. Each preset generates multiple interconnected resources with database models, CRUD endpoints, and Swagger docs in a single command. Call this first to help the user choose the right domain, then call init_project with --preset to generate it. All presets auto-install JWT authentication and wire resources together with proper foreign keys.

project_infoA

Runs 6-category diagnostics on a BackGen-generated project and returns a structured report covering Node.js version, npm availability, .env configuration, database connection (Prisma/Drizzle/Mongoose), dependency integrity, file ownership classification, and manifest data from .backgenrc.json. Use this BEFORE or AFTER making changes to verify the project is in a valid state. Read-only — never modifies any files. For a focused health check with auto-fix capability, use doctor instead.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/IbrahimKhaled19/BackGen'

If you have feedback or need assistance with the MCP directory API, please join our Discord server