AI & MCP
BuildPad DaaS includes a built-in Model Context Protocol (MCP) server that lets AI assistants — Claude, Cursor, and others — query and mutate your data safely through a standardized tool interface.
What is MCP?
The Model Context Protocol is an open standard for connecting AI models to external data sources and tools. MCP provides a unified interface that any compatible client can use without custom integration code.
How It Works
AI Client (Claude / Cursor)
│
│ JSON-RPC over HTTP
▼
BuildPad DaaS MCP Server (POST /api/mcp)
│
│ Internal service calls (auth + RBAC enforced)
▼
PostgreSQL (Supabase)Every tool call is authenticated — via a static Bearer token or a cookie session — and respects the associated user’s role and permissions. AI agents can only do what the user is authorized to do.
Configuration
Environment variables
| Variable | Default | Description |
|---|---|---|
MCP_ENABLED | true | Enable or disable the MCP server |
MCP_ALLOW_DELETES | false | Allow delete operations via MCP |
MCP_PROMPTS_COLLECTION | — | Collection storing prompt templates |
MCP_SYSTEM_PROMPT | — | Custom system prompt override |
MCP_SYSTEM_PROMPT_ENABLED | true | Enable the system-prompt tool |
Database settings
These settings can also be managed via the DaaS Studio at Settings → AI Settings:
| Setting | Type | Description |
|---|---|---|
mcp_enabled | boolean | Enable/disable MCP |
mcp_allow_deletes | boolean | Allow deletes via MCP |
mcp_prompts_collection | text | Collection for AI prompt templates |
mcp_system_prompt | text | System prompt injected into every session |
mcp_system_prompt_enabled | boolean | Enable system-prompt tool |
Settings API
| Method | Path | Description |
|---|---|---|
GET | /api/settings/mcp | Get MCP settings (admin) |
PUT | /api/settings/mcp | Update MCP settings (admin) |
GET | /api/settings/mcp/collections | List available collections |
Keep MCP_ALLOW_DELETES=false in production unless the AI agent specifically needs delete access. Use a dedicated low-privilege MCP user rather than an admin account.
System Prompt
Configure a system prompt to give the AI agent context about your data model, conventions, and what operations it should or should not perform:
{ "mcp_system_prompt": "You are managing a content platform. Do not delete any published articles without explicit confirmation. Always set status='draft' for newly created items." }The system prompt is returned by the system-prompt tool and injected automatically by MCP-compatible clients that support it.