PocketBase MCP Server
Provides full administrative control over a PocketBase instance via its admin API: managing collections (create, update, delete, truncate, import, scaffolds), CRUD and batch operations on records, authentication flows (password auth, impersonation, email verification, password reset, email change), file token/URL generation, request logs and statistics, application settings and email/S3 tests, backups (create, restore, download, upload), cron job listing and triggering, health checks, and a raw request escape hatch for any PocketBase endpoint.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PocketBase MCP Serverlist the latest records in the posts collection"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PocketBase MCP Server
A Model Context Protocol (MCP) server for managing a PocketBase instance from chat. Works with Claude Desktop, Cursor, OpenCode, and any MCP-compatible client.
Features
Auto-login: Authenticates as superuser on startup and refreshes tokens automatically
30+ tools covering the full PocketBase admin API:
Collections: list, get, create, update, delete, truncate, import, scaffolds
Records: list, get, create, update, delete, batch operations
Auth: password auth, impersonation, verification, password reset, email change
Files: file token generation, URL building
Logs: list, get, stats, truncate
Settings: get/update settings, test email, test S3
Backups: list, create, delete, restore, download, upload
Crons: list, run
System: health check
Raw request: escape hatch for any PocketBase API endpoint
Token refresh: Automatically re-authenticates on 401/403 errors
Local test setup: Docker-based PocketBase instance with e2e tests
Related MCP server: PocketBase MCP Server
Quick Start
1. Install dependencies
npm install2. Build the server
npm run build3. Configure your MCP client
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"pocketbase": {
"command": "node",
"args": ["/absolute/path/to/pocketbase-mcp/dist/index.js"],
"env": {
"POCKETBASE_URL": "http://127.0.0.1:8090",
"POCKETBASE_SUPERUSER_EMAIL": "admin@example.com",
"POCKETBASE_SUPERUSER_PASSWORD": "your-password"
}
}
}
}Cursor
Create .cursor/mcp.json in your project:
{
"mcpServers": {
"pocketbase": {
"command": "node",
"args": ["/absolute/path/to/pocketbase-mcp/dist/index.js"],
"env": {
"POCKETBASE_URL": "http://127.0.0.1:8090",
"POCKETBASE_SUPERUSER_EMAIL": "admin@example.com",
"POCKETBASE_SUPERUSER_PASSWORD": "your-password"
}
}
}
}OpenCode
Add to opencode.json in your project or ~/.config/opencode/config.json globally:
{
"mcp": {
"pocketbase": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/pocketbase-mcp/dist/index.js"],
"env": {
"POCKETBASE_URL": "http://127.0.0.1:8090",
"POCKETBASE_SUPERUSER_EMAIL": "admin@example.com",
"POCKETBASE_SUPERUSER_PASSWORD": "your-password"
}
}
}
}VS Code
Create .vscode/mcp.json:
{
"inputs": [
{
"type": "promptString",
"id": "pocketbase-email",
"description": "PocketBase superuser email",
"password": false
},
{
"type": "promptString",
"id": "pocketbase-password",
"description": "PocketBase superuser password",
"password": true
}
],
"servers": {
"pocketbase": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/pocketbase-mcp/dist/index.js"],
"env": {
"POCKETBASE_URL": "http://127.0.0.1:8090",
"POCKETBASE_SUPERUSER_EMAIL": "${input:pocketbase-email}",
"POCKETBASE_SUPERUSER_PASSWORD": "${input:pocketbase-password}"
}
}
}
}Environment Variables
Variable | Required | Description |
| Yes | PocketBase instance URL (e.g. |
| Yes | Superuser email for auto-login |
| Yes | Superuser password |
| No | Request timeout in milliseconds (default: |
Available Tools
Collections
list_collections— List all collections (paginated)get_collection— Get a single collection by name or IDcreate_collection— Create a new collection (base, auth, or view)update_collection— Update an existing collectiondelete_collection— Delete a collection and all its recordstruncate_collection— Delete all records (keeps schema)import_collections— Bulk import collectionslist_collection_scaffolds— Get default collection templates
Records
list_records— List records with filtering, sorting, paginationget_record— Get a single record by IDcreate_record— Create a new recordupdate_record— Update an existing recorddelete_record— Delete a recordbatch_records— Batch create/update/upsert/delete in one transaction
Authentication
list_auth_methods— List allowed auth methods for a collectionauth_with_password— Authenticate a user with email/username + passwordimpersonate_user— Impersonate an auth record (superuser only)request_verification— Send email verification requestconfirm_verification— Confirm email verificationrequest_password_reset— Send password reset emailconfirm_password_reset— Confirm password resetrequest_email_change— Request email changeconfirm_email_change— Confirm email change
Files
get_file_token— Generate a short-lived file access tokenbuild_file_url— Build a public file URL for a record's file field
Logs
list_logs— List request logs (paginated)get_log— Get a single log entrylog_stats— Get hourly aggregated log statisticstruncate_logs— Delete all logs
Settings
get_settings— Get all application settings (secrets redacted)update_settings— Update application settingstest_email— Send a test emailtest_s3— Test S3 storage connection
Backups
list_backups— List all backup filescreate_backup— Create a new backupdelete_backup— Delete a backuprestore_backup— Restore a backup (restarts PocketBase)get_backup_download_url— Generate a download URLupload_backup— Upload a backup file
Crons
list_crons— List all registered cron jobsrun_cron— Manually trigger a cron job
System
health_check— Check PocketBase API health
Raw
raw_request— Send a raw HTTP request to any PocketBase API endpoint
Local Development
Run with MCP Inspector
npm run inspectThen open http://localhost:5173 in your browser to interactively test tools.
Run the server directly
POCKETBASE_URL=http://127.0.0.1:8090 \
POCKETBASE_SUPERUSER_EMAIL=admin@test.local \
POCKETBASE_SUPERUSER_PASSWORD=password123 \
npm run devLocal Test Setup
The test/local/ directory contains a Docker-based PocketBase instance for testing:
cd test/local
docker compose up -d
./setup.shThis starts PocketBase on http://127.0.0.1:8090 with:
Email: admin@test.local
Password: SuperSecret123!
Run the e2e test suite:
cd ../..
npm run test:e2eSee test/local/README.md for details.
Docker
Build and run with Docker:
docker build -t pocketbase-mcp .
docker run -i --rm \
-e POCKETBASE_URL=http://host.docker.internal:8090 \
-e POCKETBASE_SUPERUSER_EMAIL=admin@example.com \
-e POCKETBASE_SUPERUSER_PASSWORD=your-password \
pocketbase-mcpUse host.docker.internal to access PocketBase running on your host machine.
Architecture
TypeScript + Node 22 — modern, type-safe
@modelcontextprotocol/server v2 — latest MCP SDK with
registerTool()APINative fetch — no PocketBase SDK dependency, explicit token management
Auto-login + refresh — authenticates on startup, re-auths on 401/403
stdio transport — works with all MCP clients (Claude Desktop, Cursor, OpenCode, etc.)
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage PocketBase Cloud projects, instances, deploys, domains, collections and records.
ParseHub.dev is a hosted document-to-records service with a remote MCP server. Agents can upload a CSV, PDF, or Word file, summarize and analyze CSV data (filter, sort, group_by, and more), read text from PDF and Word files, extract attendees, agenda items, and action items from meeting notes, ask a question about an uploaded document, and store files as database records to list and read later. Each account sees only its own files and records. **Endpoint:** `https://parsehub.dev/mcp` (Streamable HTTP, stateless) **Auth:** API key in the `X-API-Key` header (keys start with `mcp_`), or `Authorization: Bearer <API key or JWT>`. Every request without credentials returns 401. **Plans:** Free (100 API requests/month, 1 document upload), or 5,000 requests/month on the $9/month or $42/year plan. Every MCP request counts toward the allowance. **Tools:** upload_csv, summarize_csv, analyze_csv, upload_document, read_document, extract_meeting_notes, ask_document, database_status, list_database_documents, get_database_document, store_document, extract_stored_meeting_notes, export_database (administrators only). Not affiliated with ParseHub (parsehub.com), the web-scraping tool. ParseHub.dev does not scrape websites. By Poietes LLC. Docs: https://parsehub.dev/guide#connect-via-mcp
Hosted Airtable MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Claude to manage a self-hosted PocketBase instance: querying and editing records, inspecting and changing collection schemas, handling files, users and backups, and auditing API rules for exposure risks. Writes are gated by a read-only mode plus a two-step confirmation that returns a preview diff and single-use token, so nothing changes until the identical call is approved.109 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to perform advanced database operations and schema management against PocketBase instances via the Model Context Protocol. Supports collection creation, record CRUD, user authentication and management, and database backups.109 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with PocketBase databases through the Model Context Protocol, providing tools for collection management, CRUD record operations, user authentication, and database backups.109 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with PocketBase databases through the Model Context Protocol for collection schema management, record CRUD with filtering and pagination, user authentication, and database backups.109 npmISC