mcp · butterbase-ai — Butterbase MCP server for Claude Code: backend from chat
The Butterbase MCP server gives your agent access to schemas, auth, functions, storage, RAG and deploys. Useful when your backend runs on Butterbase.
claude mcp add mcp -e BUTTERBASE_API_KEY=<BUTTERBASE_API_KEY> -- npx -y @butterbase/mcpWhat mcp does
The server exposes 38 tools: apps and regions, schemas and migrations, auth and OAuth, row operations, function deploys, storage and KV, frontends and previews, RAG, realtime, RLS, integrations and billing, API keys and audit logs. There is also butterbase_docs for reference and a way to submit suggestions. It works from Claude, Codex, Cursor, GitHub Copilot, Windsurf, Cline and Zed.
Two ways to run it. Locally with npx @butterbase/mcp, or globally via npm install -g @butterbase/mcp and the butterbase-mcp command. Or point your client at the hosted endpoint https://api.butterbase.ai/mcp and skip the local install.
BUTTERBASE_API_KEY is required — without it the server cannot authenticate against Butterbase. Keys look like bb_sk_... and you get one at butterbase.ai, then pass it as an environment variable in your MCP client config.
What it helps with
- create an app and pick a region
- run a schema migration and seed the database
- deploy a function and invoke it
- set up RLS and access rules
- load content into RAG and query it
Example prompts for the agent
- List my Butterbase apps and show their config
- Deploy the
send_emailfunction and invoke it with test data - Insert a row into the
userstable through Butterbase
How to install mcp
1Platform CLI
claude mcp add mcp -e BUTTERBASE_API_KEY=<BUTTERBASE_API_KEY> -- npx -y @butterbase/mcpReplace <…> with your own values
2Platform CLI: remote server
claude mcp add --transport http mcp-server https://api.butterbase.ai/mcp1Platform CLI: remote server
codex mcp add mcp-server --url https://api.butterbase.ai/mcp2Platform CLI
codex mcp add mcp-server --env BUTTERBASE_API_KEY=<BUTTERBASE_API_KEY> -- npx -y @butterbase/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"mcp-server": {
"url": "https://api.butterbase.ai/mcp"
}
}
}{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@butterbase/mcp"
],
"env": {
"BUTTERBASE_API_KEY": "<BUTTERBASE_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mcp-server": {
"type": "http",
"url": "https://api.butterbase.ai/mcp"
}
}
}{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@butterbase/mcp"
],
"env": {
"BUTTERBASE_API_KEY": "<BUTTERBASE_API_KEY>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http mcp-server https://api.butterbase.ai/mcp2Platform CLI
gemini mcp add -e BUTTERBASE_API_KEY=<BUTTERBASE_API_KEY> mcp-server npx -y @butterbase/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp
How do I install mcp in Claude Code?
Locally: claude mcp add mcp -e BUTTERBASE_API_KEY=<BUTTERBASE_API_KEY> -- npx -y @butterbase/mcp. For the hosted endpoint: claude mcp add --transport http mcp-server https://api.butterbase.ai/mcp.
What does mcp do?
It manages your Butterbase backend from an MCP client: schemas, auth, functions, storage, RAG, realtime and deploys, across 38 tools.
Do I need an API key?
Yes, BUTTERBASE_API_KEY goes into the environment when you configure the server. You can get a key at butterbase.ai.
Similar MCP servers
All MCP servers for Backend and APIs →mcp by other authors comes first.