The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Butterbase Oss listing page.
AI-native, open-source backend-as-a-service.
Postgres · Auth · Storage · Functions · AI Gateway · MCP server
Website · Discord · LinkedIn · Self-host · Docs · Roadmap · Examples · Contributing
Butterbase gives you the building blocks for AI-driven applications without lock-in: a Postgres-backed backend with row-level security, serverless functions, an LLM gateway, realtime subscriptions, key-value store, file storage, RAG, durable per-key actors, and a built-in Model Context Protocol (MCP) server so agents can operate your backend with tools instead of glue code.
Data
/schema), automatic REST endpoints (/auto-api), and migrations./rls)./v1/:app/kv/*). New in v0.2.0./storage).Compute
/functions)./durable-objects)./realtime)./edge-ssr, /edge-ssr-from-source)./frontend, /custom-domains).AI
/gateway, /ai-config)./rag)./integrations).Identity & ops
/auth, /oauth-config, /api-keys)./audit-logs)./webhooks).scripts/move-app/).Agent surface
/mcp (HTTP) or via stdio (@butterbase/mcp — npx @butterbase/mcp).packages/plugin (submodule of butterbase-skills) ships 30+ guided skills (idea → plan → schema → auth → functions → deploy → submit) for agentic app building.This repo ships the runtime data plane — everything required to self-host a fully featured Butterbase instance. The managed offering at butterbase.ai adds multi-region orchestration, billing, upstream AI router adapters, lease-based quota enforcement, and ops dashboards (those live in a private repo that consumes this one as a submodule).
When you self-host, the AI gateway runs without upstream router adapters, billing uses a no-op provider, and quotas are unlimited. Wire your own implementations via the BillingProvider, QuotaEnforcer, and RouterAdapter interfaces in packages/shared.
Requirements: Docker, Node 22+, npm.
The Claude Code plugin containing skills (packages/plugin) is a git submodule (butterbase-skills). A plain clone leaves packages/plugin/ empty and npm install silently skips that workspace.
If you already cloned without submodules:
Optional — keep submodules updated on every pull:
docker-compose.local.yml sets KV_REDIS_URL_US_EAST_1 for you. Edit .env only if you override defaults (e.g. run control-api on the host — use redis://localhost:6379).
First run builds images and can take several minutes.
Wait until control-api is healthy:
Schema is not applied automatically on container start. From the repo root (with the stack running):
With AUTH_ENABLED=false, the API uses DEV_OWNER_ID from compose. That user must exist in platform_users (fresh volumes start empty):
Auth is disabled in the local compose profile (AUTH_ENABLED=false):
| Service | URL / port |
|---|---|
| Control API | http://localhost:4000 |
| MCP (HTTP, via control-api) | http://localhost:4000/mcp |
| Deno runtime | http://localhost:7133 |
| Docs site | http://localhost:4321 |
| Control plane Postgres | localhost:5433 |
| Data plane Postgres | localhost:5435 |
| Runtime plane Postgres | localhost:5437 |
| LocalStack (S3) | http://localhost:4566 |
Full setup (auth, MCP clients, troubleshooting, production notes): SETUP.md.
Three Postgres planes:
db/control-plane/) — platform metadata: users, apps, billing, audit.db/runtime-plane/) — hot-path runtime tables (KV expose rules, realtime channels, sessions).db/data-plane/) — per-app user data; each app gets isolated schemas with RLS.Services (services/)
| Service | Language | What it does |
|---|---|---|
control-api | Node.js / Fastify | Main entry point. All public APIs, embeds MCP at /mcp. |
mcp-server | Node.js | MCP tool implementations (built into control-api; also ships as butterbase-mcp stdio binary). |
deno-runtime | Deno | Executes user serverless functions in isolates. |
agent-runtime | Python (uv) | Long-running agent executor for manage_ai / agent tasks. |
build-runner | Cloudflare Worker | Builds frontends and edge-SSR bundles from source. |
storage-indexer | Node.js | Async indexer for uploaded objects. |
docs | Astro | Public documentation site (also served locally at :4321). |
Packages (packages/)
| Package | Description |
|---|---|
@butterbase/sdk | Universal TypeScript SDK (browser + server). |
@butterbase/cli | butterbase CLI for scaffolding and backend management. |
@butterbase/plugin | Claude Code plugin — 30+ guided skills for AI-driven app building. Git submodule of butterbase-skills. |
@butterbase/shared | Shared types, constants, and pluggable interfaces (BillingProvider, QuotaEnforcer, RouterAdapter). |
Other top-level pieces
dispatch-worker/ — Cloudflare Worker that routes per-app subdomain traffic.bb-placeholder/ — placeholder origin for unprovisioned subdomains.infra/ — pgbouncer and traefik configs for self-host.db/ — SQL migrations for the three Postgres planes.Examples/ — todo-2026-04-02, grocery-list-2026-04-03.templates/ — full production-shaped apps: butterSupport, butterbaseCRM.The OSS / managed boundary is intentional. The following are private to the managed offering:
If you need these for self-host, implement against the interfaces in packages/shared — see CONTRIBUTING.md for the scope rules.
SETUP.md — self-host and local development guideCHANGELOG.md — release notes (latest: v0.2.0, 2026-05-25 — KV store)ROADMAP.md — what's nextCONTRIBUTING.md — contributor workflow and OSS scopeSUBDOMAIN_IMPLEMENTATION.md — tenant subdomain routingdocs/runbooks/local-e2e.md — multi-region E2E stackdocs/runbooks — operational runbooksExamples/ — small example apps (todo, grocery list)templates/ — full apps you can clone and run (butterSupport, butterbaseCRM)http://localhost:4321 after docker compose upLatest release: v0.2.0 (2026-05-25) — adds the KV store across SDK / REST / CLI / MCP. The data plane is production-tested by the managed offering; the OSS distribution is young — please file self-host issues and we'll tighten docs and defaults from feedback. See CHANGELOG.md for the full history.
See CONTRIBUTING.md. The boundary between OSS and the managed offering is intentional — please read the scope section before opening a PR that touches billing, quota math, or upstream router adapters.
See SECURITY.md. Report vulnerabilities to security@butterbase.ai.
Apache-2.0. Copyright 2026 NetGPT Inc.