The Backend That Cursor Already Knows How to Use

Cursor is the AI-first code editor that writes code for you. MoonDB is the backend that Cursor can provision without help. Paste one prompt into your .cursorrules, and Cursor generates a complete backend — database schema, REST API, auth, file storage — in a single conversation.

The Fast Path: MCP Server (recommended)

Cursor speaks the Model Context Protocol natively. The MoonDB MCP server gives Cursor a first-class toolkit for the whole project lifecycle — create_project / list_projects / rotate_keys for projects; set_schema / validate_schema / get_schema / seed / get_reference for schema; query / get_row / insert / update_row / delete_row for data; plus ai_call. The server also ships an initialize.instructions primer so Cursor's model knows MoonDB conventions (auth_table, owner_field, ref types, no SQL columns) before the first call — no more "wrong column type, let me retry" loops.

.cursor/mcp.json
{ "mcpServers": { "moondb": { "url": "https://moondb.ai/mcp", "headers": { "X-API-Key": "mk_..." } } } }
Replace mk_... with your real platform API key. Sign in at /dashboard → Account → copy the mk_ key. Without it Cursor's MCP calls return 401.

Drop the file into your project root, reload Cursor's MCP servers, and prompt Cursor with "Use moondb to set up a backend for a task manager with users and tasks". Cursor invokes the tools directly.

The Drop-in Path: .cursorrules (also works)

If you can't or don't want to use MCP yet, MoonDB also publishes a ready-made prompt that teaches Cursor how to use the REST API. Drop it into your project's .cursorrules file and ask Cursor for a backend in plain English.

  1. Copy the MoonDB prompt:
  2. Paste it into .cursorrules in your project root
  3. Tell Cursor: "Set up a backend for a task manager with users, projects, and tasks"
  4. Cursor calls the MoonDB API — creates the project, sets the schema, wires up the frontend

What Cursor Generates

With the MoonDB prompt in context, Cursor will:

Example: Cursor Calling the MoonDB API

.cursorrules
// Cursor reads .cursorrules, then runs: // 1. Create the project POST https://api.moondb.ai/v1/projects X-API-Key: mk_... { "name": "task-manager" } // 2. Set the schema PUT https://api.moondb.ai/p/{project_id}/v1/schema X-Admin-Key: sk_... { "tables": { "users": { "auth_table": true, "columns": { "display_name": "string" } }, "tasks": { "columns": { "title": "string required", "done": "bool default false", "user_id": "ref users required" }, "access": { "read": "owner", "create": "authenticated", "update": "owner", "delete": "owner" }, "owner_field": "user_id" } } } // 3. REST API is live. Cursor writes fetch() calls. GET https://api.moondb.ai/p/{project_id}/api/tasks?sort=created_at.desc

The Bundled Path: MoonDB Cursor plugin

If you'd rather not assemble the pieces yourself, the official MoonDB plugin for Cursor bundles the MCP server config, the .cursorrules, and a set of Cursor skills (setup-project, define-schema, crud-operations, auth, file-storage, ai-endpoints) so the agent already knows the workflows for each common backend task. Source: github.com/moondb-ai/cursor (MIT-licensed, no install except cloning into ~/.cursor/plugins/moondb).

Why MoonDB + Cursor

Other backends require Cursor to generate SQL migrations, configure ORMs, set up auth middleware, and deploy infrastructure. With MoonDB, Cursor skips all of that. The API is designed so an AI agent can go from zero to a working backend in three calls — and every error response includes a suggestion field that tells Cursor exactly how to fix it.

No deploy step. No config files. No ORM. Just JSON schema in, REST API out.

Get started with Cursor

Install the MCP server (preferred), drop in .cursorrules, or clone the official plugin.

Start building
Copied! Now paste it into your AI agent