MoonDB + Claude Code: Backend in One Conversation
Claude Code is Anthropic's CLI agent that writes, runs, and debugs code directly in your terminal.
MoonDB is the backend it can provision without leaving the conversation. Add the MoonDB prompt to
your CLAUDE.md and Claude builds a complete backend — schema, API, auth,
storage — while you describe the app.
The Fast Path: MCP Server (recommended)
Claude Code supports MCP servers natively. One command and Claude has a complete MoonDB
toolkit in every session — no CLAUDE.md prompt to maintain, no
mid-conversation "what's your API key?" interrupt. The server's
initialize.instructions field briefs Claude on MoonDB schema conventions
automatically, so it doesn't burn turns guessing column types or trying SQL syntax.
mk_... with your real platform API key from
/dashboard → Account.
Exposed tools, grouped:
- Projects:
create_project,list_projects,rotate_keys - Schema:
set_schema,validate_schema(dry-run),get_schema,seed(with@table.indexcross-refs),get_reference(full agent docs) - Data:
query,get_row,insert,update_row,delete_row - AI:
ai_callfor schema-defined AI endpoints
Get your mk_... account key from the dashboard Account tab.
The Drop-in Path: CLAUDE.md (also works)
If you prefer to keep MCP servers per-project, MoonDB also publishes a prompt for
CLAUDE.md that teaches Claude the REST API directly.
- Add the MoonDB prompt to your
CLAUDE.md: - Tell Claude: "Build me a blog platform with users, posts, and comments"
- Claude signs up, creates a project, designs and applies the schema
- Claude fetches
/v1/llm-contextto get exact API docs for your schema - Claude writes the frontend, wired to the live API — no stubs, no placeholders
The llm-context Endpoint
Every MoonDB project exposes GET /p/{id}/v1/llm-context, which returns a
machine-readable document with your actual table names, column types, endpoints, auth flow,
and access rules. Claude reads this and generates code that matches your exact schema —
no hallucinated column names, no wrong endpoints.
Why Claude Code + MoonDB
Claude Code excels at multi-step tasks: it can sign up for a service, create resources, read documentation, and write application code — all in one session. MoonDB is designed for exactly this workflow:
- API-first — everything is an HTTP call, no dashboard required
- Self-documenting —
/v1/llm-contextprovides exact API docs for the current schema - Self-correcting — every error includes a
suggestionfield, so Claude fixes mistakes in one retry - Declarative schema — Claude describes the data model in JSON, never writes SQL
- Zero deploy — the API is live the moment the schema is set
The result: Claude goes from "build me an app" to a deployed backend with working auth, REST API, and file storage — in a single conversation, typically under 60 seconds.
Build with Claude Code + MoonDB
Add the prompt to CLAUDE.md and let Claude handle the rest.
Get started