Get the FREE Ultimate OpenClaw Setup Guide →

pocketbase

MCP server for building PocketBase apps really quickly - Need a front end quick consider FastPocket

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mrwyndham-pocketbase-mcp docker run -i --rm -e POCKETBASE_URL=http://host.docker.internal:8090 -e POCKETBASE_ADMIN_EMAIL=your_admin@example.com -e POCKETBASE_ADMIN_PASSWORD=your_admin_password pocketbase-mcp

How to use

This MCP server provides a PocketBase-focused set of tools that lets you manage collections, records, and basic user authentication in a programmable way through the MCP interface. You can browse and manipulate collections and their schemas, perform CRUD operations on records with optional filtering and pagination, and authenticate users to obtain tokens. The server exposes tools such as create_collection, get_collection, create_record, list_records, update_record, delete_record, and authenticate_user, enabling integrated workflows with PocketBase-backed data. To use it, configure one of the available MCP server entries (Node-based or Docker-based) in your AI assistant or editor's MCP settings, supply the PocketBase instance URL and admin credentials as needed, and then invoke the desired tools to interact with your PocketBase database. The environment is designed to work with PocketBase 26.x using the JS SDK type definitions referenced in the server’s implementation, ensuring compatibility with modern PocketBase features like collection schemas, relations, and record pagination.

How to install

Prerequisites:

  • Node.js and npm (for the Node-based server) or Docker (for the Docker-based setup)
  • A running PocketBase instance (default URL http://127.0.0.1:8090)
  • Access to edit your MCP configuration (cline_mcp_settings.json or VS Code MCP file)

Option A: Node-based installation

  1. Ensure Node.js is installed: node -v and npm -v
  2. Install dependencies and build the MCP server (if a repo provides a build step): npm install npm run build
  3. Run the server locally (example): node build/index.js
  4. In your MCP settings, add a server entry pointing to the built file, e.g.: { "mcpServers": { "pocketbase-server": { "command": "node", "args": ["build/index.js"], "env": { "POCKETBASE_URL": "http://127.0.0.1:8090", "POCKETBASE_ADMIN_EMAIL": "admin@example.com", "POCKETBASE_ADMIN_PASSWORD": "admin_password" }, "disabled": false, "autoApprove": ["list_collections", "list_records"] } } }

Option B: Docker installation

  1. Build the Docker image (from the repository): docker build -t pocketbase-mcp .
  2. Run the container with environment variables: docker run -d
    --name pocketbase-mcp
    -e POCKETBASE_URL=http://127.0.0.1:8090
    -e POCKETBASE_ADMIN_EMAIL=admin@example.com
    -e POCKETBASE_ADMIN_PASSWORD=admin_password
    pocketbase-mcp
  3. In your MCP settings, configure a server entry similar to the example in the README, pointing to the docker-based command and passing the same environment variables.

Prerequisites recap:

  • Access to a PocketBase instance
  • Either Node.js (and npm) for the Node-based setup or Docker for the containerized setup
  • An editor or tool (like Cursor/Claude) that supports MCP configuration to connect to these servers

Additional notes

Tips and notes:

  • Ensure POCKETBASE_URL points to a reachable PocketBase instance; the admin credentials are only needed for operations that require admin access.
  • For Docker usage, use host.docker.internal (on some platforms) or proper network configuration to reach PocketBase from inside the container.
  • If you run into CORS or authentication-related issues, verify that the admin user exists and has the required permissions in PocketBase.
  • The autoApprove lists help streamline tool usage by auto-approving specific actions; adjust to your security needs.
  • When upgrading PocketBase, revalidate compatibility with the MCP server’s JS SDK typings to avoid breaking changes.
  • If you prefer VS Code, you can mirror the command and environment setup in .vscode/mcp.json as shown in the README to ease local testing.

Related MCP Servers

Sponsor this space

Reach thousands of developers