Schema, row-level security, functions, storage, realtime and RAG all sit behind the same MCP surface, so the model can provision the thing it needs instead of asking you to open a dashboard first.
The runtime data plane of Butterbase, an open-source backend-as-a-service. A Fastify control API fronts three Postgres planes, a Deno runtime for serverless functions, S3/R2 storage and a Python agent runtime, and embeds an MCP server at `/mcp`.
- Data: per-app Postgres databases with declarative schema and automatic REST endpoints, first-class row-level security policy management, a quota-protected key-value store with TTL and audit trail, and S3/R2-backed file storage with presigned URLs
- Compute: TypeScript serverless functions on the Deno runtime, durable per-key actors for chat rooms and rate limiters, WebSocket subscriptions to table changes, edge SSR for Next.js / Remix / Astro, and static or build-from-source frontend hosting with custom domains
- AI: a single gateway endpoint for chat, embeddings and model listing, plus managed RAG collections with document ingestion, semantic search and synthesized answers
- Identity and ops: email and OAuth sign-in (Google, GitHub, Apple, X), JWT tuning, service keys, structured audit logs and outbound webhooks
- All of it reachable by an agent — the same capabilities are exposed as MCP tools over HTTP at `/mcp` or over stdio via `npx @butterbase/mcp`
Docker, Node 22+ and npm. Clone with `--recurse-submodules`, because a plain clone leaves `packages/plugin/` empty and `npm install` silently skips that workspace. Then `npm ci`, `cp .env.example .env`, and `docker compose -f docker-compose.local.yml up -d`; the first run builds images and can take several minutes. Schema is not applied on container start — run `npm run migrate:all`, then `npm run seed:dev` to create the local dev user. The control API answers on http://localhost:4000 and MCP on http://localhost:4000/mcp. Self-hosting runs the AI gateway without upstream router adapters and with a no-op billing provider; those live in the managed offering, and you wire your own through the `BillingProvider`, `QuotaEnforcer` and `RouterAdapter` interfaces.
One command — npx @butterbase/mcp
