
PocketBase MCP
par mabeldata
Connect AI agents to your PocketBase instance — fetch, create, update records, manage collections, upload files, handle logs, and run schema migrations.
What it does
PocketBase MCP bridges your AI coding agent to a live PocketBase instance. Once configured, agents can query and mutate any collection, upload and retrieve files, inspect API logs, trigger cron jobs, and manage database schema migrations — all without leaving the chat interface.
This is especially useful for AI-assisted backend development: let Claude inspect your data model, create test records, or scaffold migration files on demand.
Tools
- fetch_record — Retrieve a single record from a collection by ID
- list_records — List records with pagination, filtering, sorting, and relation expansion
- create_record — Insert a new record into a collection
- update_record — Patch an existing record by ID
- get_collection_schema — Inspect the field definitions of a collection
- list_collections — List all collections in the PocketBase instance
- upload_file — Upload file content to a record's file field
- download_file — Get the download URL for a file attached to a record
- list_logs — Fetch API request logs with filtering and pagination
- get_log — Retrieve a single log entry by ID
- get_logs_stats — Aggregate log statistics with optional filters
- list_cron_jobs — List registered app-level cron jobs
- run_cron_job — Trigger a cron job by ID
- create_migration — Scaffold a new timestamped migration file
- create_collection_migration — Generate a migration for creating a new collection
- add_field_migration — Generate a migration for adding a field to an existing collection
- apply_all_migrations — Apply all pending migration files
Installation
Quickest path via Smithery:
npx -y @smithery/cli install @mabeldata/pocketbase-mcp --client claude
Manual — Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"pocketbase-mcp": {
"command": "node",
"args": ["/path/to/pocketbase-mcp/build/index.js"],
"env": {
"POCKETBASE_API_URL": "http://127.0.0.1:8090",
"POCKETBASE_ADMIN_TOKEN": "<your-admin-token>"
}
}
}
}
Generate your admin token from the PocketBase admin UI under Settings → API Keys.
Supported hosts
Confirmed in README: Claude Desktop, Cline (VS Code extension).
Installation rapide
npx -y @smithery/cli install @mabeldata/pocketbase-mcp --client claude