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 Engine | Use |
|---|---|
POST /api/mcp | One JSON-RPC request, one response |
GET /api/mcp/sse and POST /api/mcp/messages | A Server-Sent Events stream and its message channel |
GET /api/mcp | Server 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.
| 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 |
POST | /api/settings/mcp/generate-prompts-collection | Create 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.