PocketBase MCP server

PocketBase MCP server

pocketbase-mcp-tokenscompany•bytokenscompany

A stateless remote MCP server that lets MCP clients manage and query a PocketBase instance, available as a hosted endpoint or self-hosted container.

License: MIT•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Provides tools for managing PocketBase collections, including listing, getting schemas, creating, updating, deleting, and bulk importing collections.
  • •Offers record CRUD and search tools plus a resource exposing all collection schemas as JSON.
  • •Supports backup, settings, and log operations, and returns download URLs for file fields.
  • •Authenticates per request using superuser email and password or an auth token, and is fully stateless with no credential storage.

BEST FOR

  • •Managing PocketBase schemas and records from MCP-capable AI agents like Claude Code or Cursor.
  • •Querying logs and managing backups for a PocketBase instance through an MCP client.

ABOUT POCKETBASE-MCP-TOKENSCOMPANY

PocketBase MCP server is cataloged as an MCP server attributed to tokenscompany. A stateless remote MCP server that lets MCP clients manage and query a PocketBase instance, available as a hosted endpoint or self-hosted container. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for PocketBase MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can the server be self-hosted instead of using the hosted endpoint?

Yes, it can be self-hosted with Bun or Docker; the server listens on PORT with a default of 3000.

What authentication headers does the MCP endpoint require?

Each request must include X-PB-URL plus either X-PB-Email and X-PB-Password or X-PB-Token; if both are provided, the token takes priority.

Upstream README

View this exact version on GitHub

README.md · 9bd9e7d4b312 · Fetched 2026-11-13 11:34:37 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

pocketbase-mcp

License: MIT CI Docker

Remote MCP server that connects any MCP client to a PocketBase instance over stateless HTTP.

Quick start

Use the hosted instance at https://pocketbase.tokenscompany.co/mcp or self-host your own.

Install with AI agent

Copy and paste this prompt into your AI agent (Claude Code, Cursor, Windsurf, etc.):

Install the PocketBase MCP server. The MCP endpoint is https://pocketbase.tokenscompany.co/mcp and the transport type is http (NOT sse). It requires X-PB-URL set to my PocketBase instance URL and either X-PB-Email + X-PB-Password (superuser credentials) or X-PB-Token (superuser auth token). Add it to my project MCP config with type "http". Then fetch https://raw.githubusercontent.com/tokenscompany/pocketbase-mcp/main/SKILL.md and save it to my project's agent instructions so you always know how to use the PocketBase tools.
Claude Code
claude mcp add --transport http pocketbase https://pocketbase.tokenscompany.co/mcp \
  --header "X-PB-URL: https://your-pocketbase.example.com" \
  --header "X-PB-Email: admin@example.com" \
  --header "X-PB-Password: your-password"

Or add to .mcp.json in your project root:

{
  "mcpServers": {
    "pocketbase": {
      "type": "http",
      "url": "https://pocketbase.tokenscompany.co/mcp",
      "headers": {
        "X-PB-URL": "${PB_URL}",
        "X-PB-Email": "${PB_EMAIL}",
        "X-PB-Password": "${PB_PASSWORD}"
      }
    }
  }
}

Claude Code expands ${VAR} from your environment, so set PB_URL, PB_EMAIL, and PB_PASSWORD in your shell or .env.

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "pocketbase": {
      "url": "https://pocketbase.tokenscompany.co/mcp",
      "headers": {
        "X-PB-URL": "https://your-pocketbase.example.com",
        "X-PB-Email": "admin@example.com",
        "X-PB-Password": "your-password"
      }
    }
  }
}
OpenCode

Add to opencode.json in your project root:

{
  "mcp": {
    "pocketbase": {
      "type": "remote",
      "url": "https://pocketbase.tokenscompany.co/mcp",
      "headers": {
        "X-PB-URL": "https://your-pocketbase.example.com",
        "X-PB-Email": "admin@example.com",
        "X-PB-Password": "your-password"
      },
      "enabled": true
    }
  }
}

Self-hosting

Bun

bun install
bun run src/index.ts

The server listens on PORT (default 3000).

Docker (GHCR)

docker pull ghcr.io/tokenscompany/pocketbase-mcp:latest
docker run -p 3000:3000 ghcr.io/tokenscompany/pocketbase-mcp:latest

Or build locally:

docker build -t pocketbase-mcp .
docker run -p 3000:3000 pocketbase-mcp

Verifying the image

Every image published to GHCR includes SLSA provenance attestation. You can verify that an image was built from this repository:

gh attestation verify oci://ghcr.io/tokenscompany/pocketbase-mcp:latest \
  --owner tokenscompany

Authentication

Every request to POST /mcp must include X-PB-URL and one of two auth methods:

HeaderDescription
X-PB-URLBase URL of your PocketBase instance
X-PB-EmailSuperuser email
X-PB-PasswordSuperuser password

The server authenticates against PocketBase on each request. No manual token management needed.

Option 2: Token

HeaderDescription
X-PB-URLBase URL of your PocketBase instance
X-PB-TokenSuperuser auth token

To get a token manually:

curl -X POST https://your-pb.example.com/api/admins/auth-with-password \
  -H 'Content-Type: application/json' \
  -d '{"identity":"admin@example.com","password":"your-password"}'

The token field in the response is your X-PB-Token. If both token and email+password are provided, the token takes priority.

Tools

ToolDescription
pb_healthPocketBase health check
pb_list_collectionsList all collections with full field schemas
pb_get_collection_schemaGet a single collection's full schema
pb_create_collectionCreate a new collection
pb_update_collectionUpdate a collection's schema or rules
pb_delete_collectionDelete a collection
pb_import_collectionsBulk import/overwrite collection schemas
pb_list_recordsList/search records in a collection
pb_get_recordGet a single record by ID
pb_create_recordCreate a new record
pb_update_recordUpdate an existing record
pb_delete_recordDelete a record by ID
pb_list_backupsList available backups
pb_create_backupCreate a new backup
pb_delete_backupDelete a backup by key
pb_get_file_urlGet download URL for a file field
pb_get_settingsGet app settings
pb_update_settingsUpdate app settings
pb_list_logsQuery request logs

Resources

ResourceURIDescription
schemapocketbase://schemaAll collection schemas as JSON

Security & Privacy

This server is fully stateless — it does not store, log, or retain any of your data:

  • No database, no disk writes — each request creates a fresh MCP server and transport in memory, processes it, and discards everything. Nothing is written to disk.
  • No credential storage — your X-PB-URL, X-PB-Token, X-PB-Email, and X-PB-Password headers are used for the duration of the request and never persisted, cached, or logged.
  • No telemetry or analytics — the server collects zero usage data. No third-party services are contacted.
  • No sessions — there are no cookies, no session IDs, and no server-side state between requests.
  • Open source — the entire codebase is MIT-licensed. Every Docker image includes SLSA provenance attestation, so you can verify it was built directly from this repository with no modifications.
  • Self-host it yourself — for maximum control, run your own instance. The server is a single container with no external dependencies beyond your PocketBase instance.

Hardening

When hosting a public instance, the server includes several additional measures:

  • SSRF protection — X-PB-URL is validated: only http/https schemes are allowed, and hostnames that resolve to private/reserved IP ranges (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, ::1, fc00::/7, fe80::/10) are rejected.

  • Rate limiting — in-memory token-bucket per IP. Configurable via environment variables:

    VariableDefaultDescription
    RATE_LIMIT_RPM60Requests per minute per IP
    RATE_LIMIT_BURST10Max burst size
  • CORS — Access-Control-Allow-Origin: * with preflight support on /mcp.

  • Body size limit — requests larger than 1 MB are rejected with 413.

Endpoints

MethodPathDescription
POST/mcpMCP endpoint (stateless, JSON responses)
GET/healthHealth check

Troubleshooting

"Failed to reconnect" error

Your MCP client config likely uses "type": "sse". This server uses stateless streamable HTTP, not Server-Sent Events. Change the transport type to "http":

{
  "mcpServers": {
    "pocketbase": {
      "type": "http",
      ...
    }
  }
}

For Claude Code CLI, use --transport http when adding:

claude mcp add --transport http pocketbase https://pocketbase.tokenscompany.co/mcp ...

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for PocketBase MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/pocketbase-mcp-tokenscompany)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage