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):

Shell
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):

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

ToolDescription
get_project_infoGet basic information about the current project.

Database

ToolDescription
list_collectionsList the database collections in the current project.
get_collection_schemaGet a collection's field schema (name, type, required, validation) — call this before querying or writing so field names/types are known.
create_collectionCreate a new collection with a field schema.
query_documentsQuery documents with an optional filter, sort, and pagination.
get_documentGet a single document by id.
create_documentCreate a document (validated against the collection's schema).
update_documentUpdate fields on an existing document.
delete_documentDelete a document.

Storage

ToolDescription
list_filesList files in the project's storage, optionally scoped to one bucket.
upload_fileUpload a file (base64-encoded content).
get_file_urlGet a signed, time-limited download URL for a file.
delete_fileDelete a file.

Functions

ToolDescription
list_functionsList the serverless functions deployed in this project.
invoke_functionInvoke a deployed function with a JSON payload and return its result.

Webhooks

ToolDescription
get_webhook_configGet the project's configured webhook URL and subscribed events (read-only).

Users

ToolDescription
list_usersList end-users registered in this project (never returns credentials).
get_userGet a single end-user by id (never returns credentials).

Add-ons

ToolDescription
list_addonsList the available add-ons (PDF, QR code, CSV, ICS, vCard, …).
generate_addonRun an add-on with the given input and return the result link or inline data.

Errors

StatusMeaning
401Missing or invalid API key.
402The org's plan doesn't include MCP access.
500The 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.