Skip to main content
Glama
pocketbase-mcp-server

pocketbase-mcp-server

by yhauxell

PocketBase MCP Server

License: MIT NPM Version

A Model Context Protocol (MCP) server for interacting with PocketBase databases.

This server allows you to inspect collections and query, create, update, and delete records inside a PocketBase instance.

Installation & Usage

You can use this server directly via npx (recommended) or install it globally.

Option 1: Run via npx

To run the server without installing it locally, configure your MCP client to use:

npx @yhauxell/pocketbase-mcp-server

Option 2: Global Installation

npm install -g @yhauxell/pocketbase-mcp-server

Then run the command:

pocketbase-mcp-server

Related MCP server: pocketbase-mcp

Configuration for Claude Desktop or MCP Clients

To register the server, add the following to your MCP client settings file (e.g., claude_desktop_config.json):

Using npx (Recommended)

Using admin email & password:

{
  "mcpServers": {
    "pocketbase-mcp-server": {
      "command": "npx",
      "args": ["-y", "@yhauxell/pocketbase-mcp-server"],
      "env": {
        "POCKETBASE_URL": "http://127.0.0.1:8090",
        "POCKETBASE_ADMIN_EMAIL": "your_email@example.com",
        "POCKETBASE_ADMIN_PASSWORD": "your_password"
      }
    }
  }
}

Using an auth token:

{
  "mcpServers": {
    "pocketbase-mcp-server": {
      "command": "npx",
      "args": ["-y", "@yhauxell/pocketbase-mcp-server"],
      "env": {
        "POCKETBASE_URL": "http://127.0.0.1:8090",
        "POCKETBASE_AUTH_TOKEN": "your_auth_token_here"
      }
    }
  }
}

Using Local Build (For Development)

If you are developing locally, run npm run build and use:

{
  "mcpServers": {
    "pocketbase-mcp-server": {
      "command": "node",
      "args": ["/absolute/path/to/pocketbase-mcp-server/dist/index.js"],
      "env": {
        "POCKETBASE_URL": "http://127.0.0.1:8090",
        "POCKETBASE_ADMIN_EMAIL": "your_email@example.com",
        "POCKETBASE_ADMIN_PASSWORD": "your_password"
      }
    }
  }
}

Local Setup (Development)

  1. Clone the repository and install dependencies:

    npm install
  2. Build the project:

    npm run build
  3. Configure environment variables in a .env file:

    POCKETBASE_URL=http://127.0.0.1:8090
    POCKETBASE_ADMIN_EMAIL=your_email@example.com
    POCKETBASE_ADMIN_PASSWORD=your_password

Available Tools

  • pb_list_collections: List all collections in the PocketBase database.

  • pb_get_collection: Get schema details of a specific collection.

  • pb_list_records: Retrieve paginated, filtered, and sorted records from a collection.

  • pb_view_record: Retrieve a single record by its ID.

  • pb_create_record: Create a new record in a collection.

  • pb_update_record: Update an existing record in a collection.

  • pb_delete_record: Delete a record from a collection.


Contributing

Contributions are welcome! Please read CONTRIBUTING.md for details on how to get started.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Available Tools

7 tools
pb_create_recordC

Create a new record in a collection

Inputs: data (required), collectionIdOrName (required).

pb_delete_recordB

Delete a record from a collection

Inputs: recordId (required), collectionIdOrName (required).

pb_get_collectionA

Get schema details and metadata of a specific collection by its name or ID

Inputs: collectionIdOrName (required).

pb_list_collectionsA

List all collections in the PocketBase database

Inputs: no named parameters.

pb_list_recordsA

Retrieve a paginated list of records from a collection with optional filtering, sorting, and relations expansion

Inputs: collectionIdOrName (required), page, sort, expand, +2 more.

pb_update_recordB

Update an existing record in a collection

Inputs: data (required), recordId (required), collectionIdOrName (required).

pb_view_recordB

Retrieve a single record from a collection by its ID

Inputs: recordId (required), collectionIdOrName (required), expand.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct operation (create, read, update, delete records, list collections, get collection schema) with no overlapping functionality.

    Naming Consistency5/5

    All tools follow a consistent 'pb_verb_noun' pattern (e.g., pb_create_record, pb_list_records) with clear verbs and nouns.

    Tool Count5/5

    Seven tools is an appropriate number for performing core CRUD operations on records and exploring collection metadata without being excessive.

    Completeness4/5

    Covers all standard record operations and collection schema queries, but lacks tools for creating, updating, or deleting collections, which may be needed for full lifecycle management.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants and MCP clients to interact with PocketBase databases for authentication, data management, and administrative operations.
      65
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to perform CRUD operations on Pocketbase collections, manage authentication, and query logs via a type-safe API.
      ISC
    • F
      license
      A
      quality
      C
      maintenance
      Enables managing PocketBase instances through intent-first tools for schema inspection, record CRUD, bulk operations, authentication, file handling, and server monitoring, with optional destructive operations gated behind explicit opt-in.
      11
      15
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables creating and managing collections, performing record CRUD operations with pagination and expansions, handling user authentication, and backing up PocketBase databases through MCP tools.
      18 npm
      ISC