PocketBase MCP Server
@mabeldata
This is an MCP server that interacts with a PocketBase instance. It allows you to fetch, list, create, update, and manage records and files in your PocketBase collections.
Overview
What is PocketBase MCP Server?
PocketBase MCP Server is an MCP server that interacts with a PocketBase instance, enabling AI agents to fetch, list, create, update, and manage records and files in PocketBase collections. It provides tools for record management, collection schema inspection, log management, cron job execution, and migration directory configuration.
How to use PocketBase MCP Server?
Install via Smithery using npx -y @smithery/cli install @mabeldata/pocketbase-mcp --client claude, or clone the repository, install dependencies (npm install), and build (npm run build). Configure the environment variables POCKETBASE_API_URL (default http://127.0.0.1:8090) and POCKETBASE_ADMIN_TOKEN (required). Then add the server to an MCP client (e.g., Claude Desktop) to use its tools.
Key features of PocketBase MCP Server
- Fetch, list, create, and update records in collections.
- Upload files and obtain download URLs for stored files.
- List all collections and retrieve collection schemas.
- Manage API request logs with filtering and pagination.
- Trigger and list cron jobs.
- Set a custom directory for migration files.
Use cases of PocketBase MCP Server
- Automate data entry and record updates in PocketBase from an AI agent.
- Manage file uploads and retrieval across collections.
- Monitor API request logs for debugging or analytics.
- Schedule and trigger cron jobs programmatically.
- Streamline migration file management through MCP tools.
FAQ from PocketBase MCP Server
What is PocketBase MCP Server?
It is an MCP server that acts as a bridge between AI agents (via the Model Context Protocol) and a PocketBase backend, allowing CRUD operations on records, files, collections, logs, cron jobs, and migrations.
How do I configure the server?
Set the POCKETBASE_API_URL environment variable to your PocketBase instance URL (defaults to http://127.0.0.1:8090) and POCKETBASE_ADMIN_TOKEN to an admin authentication token generated from the PocketBase admin UI.
What tools does the server provide?
Tools are grouped into Record Management (fetch_record, list_records, create_record, update_record, upload_file, download_file, list_collections, get_collection_schema), Log Management (list_logs, get_log, get_logs_stats), Cron Job Management (list_cron_jobs, run_cron_job), and Migration Management (set_migrations_directory).
Does the server require authentication?
Yes, the POCKETBASE_ADMIN_TOKEN is required. Log and Cron Job tools additionally require admin authentication and may not be available in all PocketBase configurations.
How is file download handled?
The download_file tool returns the file URL; the actual download must be performed separately by the client using that URL.