The PocketBase MCP Server enables AI assistants to comprehensively manage PocketBase backends through 23 tools covering database operations, authentication, file handling, and developer utilities.
Collection Management: Create, delete, update, list, and migrate collections with full schema configuration including fields, indexes, and access control rules. Truncate collections to preserve structure while removing data.
Record Operations: Perform CRUD operations with advanced filtering, sorting, pagination, field expansion, and data analysis capabilities. Execute complex queries with aggregation support.
Authentication & User Management: Authenticate as admin or user with email/password, create accounts with email verification, check auth status, manage auth collections, and configure auto-refresh tokens.
File Operations: Upload files from content or URLs, download files from record fields, and manage file field types in collections.
Access Control: Configure API rules for collections (list, view, create, update, delete) with rule-based permissions for fine-grained access control.
Data Management: Create backups in JSON/CSV formats, import data with create/update/upsert modes, perform batch operations, and transform data during migrations.
Index Management: Create, delete, and list database indexes for performance optimization.
Developer Tools: Generate TypeScript interfaces from PocketBase collections and vice versa, with support for relation types and configurable timestamps.
Server Utilities: Check server health, access field schema documentation, and reference API rules syntax.
Provides integration with PocketBase databases, offering tools for collection management, record operations, schema generation, authentication, and data analysis. Enables bidirectional conversion between TypeScript interfaces and PocketBase schemas.
Supports bidirectional conversion between TypeScript interfaces and PocketBase schemas, allowing users to generate TypeScript interfaces from PocketBase collections and create collections from TypeScript definitions.
Click on "Install 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 all collections in my database"
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
Model Context Protocol (MCP) server for PocketBase, enabling AI assistants to interact with your PocketBase backend.
Features
π§ 18 Tools for complete PocketBase management
π Collections: Create, update, delete, and view collections
π Records: Full CRUD operations with filtering, sorting, and pagination
π Authentication: Login/logout and check auth state via tools
π Rules: Manage API access control rules
π References: Built-in field schema and rules reference
π Resources: Expose collections as MCP resources
Related MCP server: PocketBase MCP Server
Installation
Usage
With Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
If POCKETBASE_URL is not set, server defaults to http://localhost:8090.
Direct Usage
Authentication Flow (via tools)
Use tools to authenticate after server starts:
auth_adminorauth_userget_auth_statuslogout
Available Tools
Health & Reference
health- Check PocketBase server health statusget_field_schema_reference- Get field types documentationget_rules_reference- Get API rules syntax reference
Authentication
auth_admin- Authenticate as admin/superuserauth_user- Authenticate as auth collection user (email/username)get_auth_status- Check current authentication statuslogout- Clear authentication session
Collections
list_collections- List all collectionsview_collection- View collection by name/IDcreate_collection- Create new collectionupdate_collection- Update collection schema/settingsdelete_collection- Delete collectionupdate_collection_rules- Update access control rules
Records
list_records- List/search records with filtering, sorting, paginationview_record- View single record by IDcreate_record- Create new recordupdate_record- Update existing recorddelete_record- Delete record
Development
Environment Variables
Variable | Required | Description |
| No | PocketBase server URL (default: |
License
MIT