Skip to content

MCP Setup

Your AI assistant connects to Butterbase through MCP. That connection lets the assistant manage your entire backend — creating apps, evolving schemas, configuring authentication, managing storage, deploying functions, and more — using structured tools instead of manual work.

The Model Context Protocol (MCP) is a standard for connecting AI assistants to external tools and data sources. When you connect Butterbase via MCP, your assistant gains access to a broad set of tools and a quickstart prompt for managing your backend — creating apps, picking a region, evolving schemas, configuring auth, deploying functions, and more.

Section titled “Option 1: Claude Code Plugin (recommended)”

Install Butterbase Skills for Claude Code. This auto-configures the MCP server and includes 6 guided skills:

Terminal window
# Add the marketplace
claude plugin marketplace add https://github.com/butterbase-ai/butterbase-skills
# Install the plugin
claude plugin install butterbase

Set your API key:

Terminal window
export BUTTERBASE_API_KEY=bb_sk_your_key_here

The plugin includes:

  • Auto-configured MCP server — 43 tools and 1 prompt available immediately
  • 6 skills/butterbase-skills:build-app, /butterbase-skills:schema, /butterbase-skills:deploy, /butterbase-skills:debug-rls, /butterbase-skills:function, /butterbase-skills:contributing
  • Always-on context — environment variables, workflows, and patterns

If you already have the Butterbase CLI installed:

Terminal window
butterbase plugin setup

This generates a .mcp.json in your project directory that configures the MCP connection.

Add this to your MCP configuration (.mcp.json or editor MCP settings):

{
"mcpServers": {
"butterbase": {
"url": "https://api.butterbase.ai/mcp",
"headers": {
"Authorization": "Bearer ${BUTTERBASE_API_KEY}"
}
}
}
}

This works with Claude Code, Cursor, Windsurf, and any MCP-compatible editor.

The MCP endpoint is available at:

MethodPathPurpose
GET, POST, DELETE/mcpStreamable HTTP MCP session

Include your API key as a Bearer token in the Authorization header.

ToolWhat it does
init_appCreate a new backend app. You supply a name (and optionally a region); you receive the app id and API base URL.
list_regionsList the regions an app can be created or moved to.
move_appMove an existing app to another region.
move_app_statusCheck the progress of a move in flight.
list_appsList all apps you have access to with their metadata.
delete_appPermanently delete an app and its database. This is irreversible.
get_app_configRead an app’s current configuration (CORS origins, JWT settings, storage limits).
update_corsSet the list of allowed origins for browser requests to your app’s API.
update_jwt_configConfigure access token lifetime and refresh token lifetime.
generate_service_keyGenerate a bb_sk_ prefixed API key for programmatic access.
ToolWhat it does
get_schemaRead the current database schema for an app.
apply_schemaApply a declarative schema. Set dry_run: true to preview.
dry_run_schemaPreview SQL statements without executing.
list_migrationsView the history of all schema migrations.
ToolWhat it does
select_rowsQuery table rows with filtering, sorting, pagination.
insert_rowInsert a row into a table.
ToolWhat it does
configure_oauth_providerRegister a social sign-in provider.
get_oauth_configList all configured OAuth providers.
update_oauth_providerModify an existing OAuth provider.
delete_oauth_providerRemove an OAuth provider.
enable_rlsEnable row-level security on a table.
create_policyCreate a custom RLS policy.
create_user_isolation_policyQuick user isolation setup.
get_rls_policiesList active RLS policies.
delete_rls_policyRemove RLS from a table.
query_audit_logsSearch authentication audit logs.
ToolWhat it does
generate_upload_urlGet a presigned upload URL.
generate_download_urlGet a presigned download URL.
get_storage_objectsList all files for an app.
delete_storage_objectDelete a file from storage.
ToolWhat it does
deploy_functionDeploy a TypeScript/JavaScript function.
list_functionsList all deployed functions.
invoke_functionTest-invoke a deployed function.
delete_functionDelete a deployed function.
update_function_envUpdate environment variables.
get_function_logsView invocation logs.
ToolWhat it does
create_frontend_deploymentCreate a deployment and get an upload URL.
start_frontend_deploymentStart a deployment after uploading.
list_frontend_deploymentsView deployment history.
set_frontend_envConfigure environment variables for builds.
ToolWhat it does
configure_realtimeEnable realtime on tables.
get_realtime_configView current realtime configuration.
ToolWhat it does
submit_suggestionSubmit feedback or bug reports.
butterbase_docsRead the documentation by topic.

You can generate API keys through the dashboard on the API Keys page, or using the generate_service_key MCP tool. Keys are prefixed with bb_sk_ and provide full access to your apps and data.