fetch_recordLABSCO SUMMARY
PocketBase collections become readable and writable where the question was asked.
The listing tool carries PocketBase's own query options - filter, sort, pagination and relation expansion - so a question with conditions in it does not turn into several round trips, and a record can be created in the same thread that read the last one.
What it is
An MCP server for a PocketBase instance: it fetches, lists, creates and updates records, uploads and downloads files, reads collection schemas and API request logs, runs cron jobs, and writes and applies migrations.
What you get
- Records — fetch_record by ID, list_records with pagination, filtering, sorting and expanded relations, create_record and update_record
- Files — upload_file to a field of a record, and download_file for a stored file's download URL
- Collections — list_collections and get_collection_schema
- Logs — list_logs, get_log and get_logs_stats over PocketBase's API request logs, which need admin authentication and may not be available on every instance
- Cron jobs — list_cron_jobs and run_cron_job
- Migrations — set_migrations_directory, create_migration, create_collection_migration, add_field_migration, list_migrations, apply_migration, revert_migration, apply_all_migrations and revert_to_migration
Requirements
A PocketBase instance the server can reach, and an admin authentication token for it, generated from the PocketBase admin interface. Both are set as environment variables; the instance URL defaults to PocketBase running locally.
Setup effort
One command plus a key — npx -y @smithery/cli install @mabeldata/pocketbase-mcp --client claude, then supply credentials
USE CASES
Answering a question about what is in a collection
Ask with the conditions attached - filter, sort and page size go to PocketBase rather than being applied after the fact.
Pulling one record you have the ID for
Fetch the single record instead of listing the collection and searching through it.
Adding a row without opening the admin interface
Create the record in the collection you name, in the conversation where the values were decided.
Following a relation without a second lookup
Expand the related records in the same listing call, so the linked data comes back with the rows rather than after them.
22 tools
Listed in project docs. Your client may show a different list.
list_recordscreate_recordupdate_recordget_collection_schemaupload_filelist_collectionsdownload_filelist_logsget_logget_logs_statslist_cron_jobsrun_cron_jobset_migrations_directorycreate_migrationcreate_collection_migrationadd_field_migrationlist_migrationsapply_migrationrevert_migrationapply_all_migrationsrevert_to_migrationBEFORE YOU INSTALL
What to know first
Tools you get
22 tools named in the project's documentation.
Requires
- npx on PATH
- POCKETBASE_ADMIN_TOKEN in your environment
INSTALLATION
Connect your client
Server setup
Claude Desktop
npx -y @smithery/cli install @mabeldata/pocketbase-mcp --client claudeMCP Clients
Cline
git clone https://github.com/mabeldata/pocketbase-mcp.git
cd pocketbase-mcp
npm install
npm run build{
"mcpServers": {
"pocketbase-mcp": {
"command": "node",
"args": [
"<YOUR_PATH_TO_POCKETBASE_MCP>/build/index.js"
],
"env": {
"POCKETBASE_API_URL": "<YOUR_POCKETBASE_API_URL>",
"POCKETBASE_ADMIN_TOKEN": "<YOUR_POCKETBASE_ADMIN_TOKEN>"
},
"disabled": false
}
}
}<YOUR_PATH_TO_POCKETBASE_MCP> is the absolute path of your clone, and <YOUR_POCKETBASE_API_URL> is your instance's URL (for example http://127.0.0.1:8090), and <YOUR_POCKETBASE_ADMIN_TOKEN> is an admin token generated in the PocketBase admin UI.