Skip to Content
AI & MCPOverview

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

VariableDefaultDescription
MCP_ENABLEDtrueEnable or disable the MCP server
MCP_ALLOW_DELETESfalseAllow delete operations via MCP
MCP_PROMPTS_COLLECTIONCollection storing prompt templates
MCP_SYSTEM_PROMPTCustom system prompt override
MCP_SYSTEM_PROMPT_ENABLEDtrueEnable the system-prompt tool

Database settings

These settings can also be managed via the DaaS Studio at Settings → AI Settings:

SettingTypeDescription
mcp_enabledbooleanEnable/disable MCP
mcp_allow_deletesbooleanAllow deletes via MCP
mcp_prompts_collectiontextCollection for AI prompt templates
mcp_system_prompttextSystem prompt injected into every session
mcp_system_prompt_enabledbooleanEnable system-prompt tool

Settings API

MethodPathDescription
GET/api/settings/mcpGet MCP settings (admin)
PUT/api/settings/mcpUpdate MCP settings (admin)
GET/api/settings/mcp/collectionsList 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.

Last updated on