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

On the Buildpad Engine backend, the MCP server is part of the Engine. Connect the AI client to the Engine’s URL, not to the Studio’s URL. Every tool call is authenticated with a static token or a JWT access token, and respects the user’s roles and permissions. AI agents can only do what the user is authorized to do.

Route on the EngineUse
POST /api/mcpOne JSON-RPC request, one response
GET /api/mcp/sse and POST /api/mcp/messagesA Server-Sent Events stream and its message channel
GET /api/mcpServer information and the MCP settings

The Engine sends a ping every 20 seconds on a stream, and accepts up to 10 streams at the same time for each user.

Tokens on a Buildpad Cloud project. The project’s starter kit configures the agent’s MCP client with the project administrator’s static token. That token works on /api/mcp only. The Engine refuses it on the data API.

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

On the Buildpad Engine backend, the variables below have no effect. Use the database settings and the Settings API instead.

VariableDefaultDescription
MCP_ENABLEDtrueEnable or disable the MCP server
MCP_ALLOW_DELETESfalseAllow delete operations via MCP
MCP_PROMPTS_COLLECTION—Collection storing prompt templates
MCP_SYSTEM_PROMPT—Custom 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
POST/api/settings/mcp/generate-prompts-collectionCreate the AI prompts collection (admin)

Keep deletes off (mcp_allow_deletes false, or 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.