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 37+ structured tools for managing your backend.

Add this to your MCP configuration:

{
"mcpServers": {
"butterbase": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-butterbase"],
"env": {
"BUTTERBASE_API_KEY": "bb_sk_your_key_here",
"BUTTERBASE_API_URL": "https://api.butterbase.ai"
}
}
}
}

Follow the same pattern — add the MCP server configuration to your editor’s MCP settings file.

If your environment connects to a hosted MCP endpoint, include your API key as a Bearer token in the Authorization header:

Authorization: Bearer bb_sk_your_key_here

The MCP endpoint is available at:

MethodPathPurpose
GET, POST, DELETE/mcpStreamable HTTP MCP session
ToolWhat it does
init_appCreate a new backend app. You supply a name; you receive the app id and API base URL.
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.