Guides
MCP (connect an AI coding tool)
Mudbase runs a Model Context Protocol server so AI coding tools — Claude Code, Claude Desktop, or any other MCP client — can build against your project directly: create collections, read and write documents, manage files, invoke functions, and more, without you writing integration code. Connection details for your own project are on the MCP console page; this guide is its reference.
MCP access is included on the Basic, Starter, Growth, Scale, and Enterprise plans. It's also open to the Free plan for a limited time, through November 1, 2026 (UTC) — after that, Free-plan access reverts and a paid plan is required.
Connecting
Auth is the same API key you already use for the REST API — there is no separate MCP token. Any active key for the project works as the bearer credential.
Claude Code (CLI):
claude mcp add --transport http mudbase https://api.mudbase.dev/mcp --header "X-API-Key: <YOUR_API_KEY>"claude mcp add --transport http mudbase https://api.mudbase.dev/mcp --header "X-API-Key: <YOUR_API_KEY>"Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"mudbase": {
"url": "https://api.mudbase.dev/mcp",
"headers": { "X-API-Key": "<YOUR_API_KEY>" }
}
}
}{
"mcpServers": {
"mudbase": {
"url": "https://api.mudbase.dev/mcp",
"headers": { "X-API-Key": "<YOUR_API_KEY>" }
}
}
}Any other MCP client that supports Streamable HTTP transport works the same way: POST to the endpoint with X-API-Key (or Authorization: Bearer <key>) set.
If your organization has dedicated infrastructure, connect to your dedicated host instead of api.mudbase.dev — the exact URL is shown on the console page.
Available tools
Every tool is scoped to the project the API key belongs to, and to that key's own permission
grants — a key created with read-only database access gets a permission error from
create_document/update_document/delete_document exactly as it would calling the REST API
directly. Writes made through MCP trigger the same Functions/Webhooks events a REST write would.
Project
| Tool | Description |
|---|---|
get_project_info | Get basic information about the current project. |
Database
| Tool | Description |
|---|---|
list_collections | List the database collections in the current project. |
get_collection_schema | Get a collection's field schema (name, type, required, validation) — call this before querying or writing so field names/types are known. |
create_collection | Create a new collection with a field schema. |
query_documents | Query documents with an optional filter, sort, and pagination. |
get_document | Get a single document by id. |
create_document | Create a document (validated against the collection's schema). |
update_document | Update fields on an existing document. |
delete_document | Delete a document. |
Storage
| Tool | Description |
|---|---|
list_files | List files in the project's storage, optionally scoped to one bucket. |
upload_file | Upload a file (base64-encoded content). |
get_file_url | Get a signed, time-limited download URL for a file. |
delete_file | Delete a file. |
Functions
| Tool | Description |
|---|---|
list_functions | List the serverless functions deployed in this project. |
invoke_function | Invoke a deployed function with a JSON payload and return its result. |
Webhooks
| Tool | Description |
|---|---|
get_webhook_config | Get the project's configured webhook URL and subscribed events (read-only). |
Users
| Tool | Description |
|---|---|
list_users | List end-users registered in this project (never returns credentials). |
get_user | Get a single end-user by id (never returns credentials). |
Add-ons
| Tool | Description |
|---|---|
list_addons | List the available add-ons (PDF, QR code, CSV, ICS, vCard, …). |
generate_addon | Run an add-on with the given input and return the result link or inline data. |
Errors
| Status | Meaning |
|---|---|
401 | Missing or invalid API key. |
402 | The org's plan doesn't include MCP access. |
500 | The MCP request failed server-side. |
A tool call itself can also fail with a permission error (returned as a normal MCP tool result
with isError: true, not an HTTP status) if the API key's permissions don't include the
resource/action the tool needs — e.g. create_document on a key scoped to read-only database
access.