@fadlee/pocketbase-mcp
v1.2.0
Published
PocketBase MCP Server - Model Context Protocol server for PocketBase
Maintainers
Readme
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
Installation
npm install @fadlee/pocketbase-mcp
# or
bun install @fadlee/pocketbase-mcpUsage
With Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"pocketbase": {
"command": "npx",
"args": ["@fadlee/pocketbase-mcp"]
}
}
}If POCKETBASE_URL is not set, server defaults to http://localhost:8090.
Direct Usage
# Use default URL (http://localhost:8090)
npx @fadlee/pocketbase-mcp
# Or use custom PocketBase URL
POCKETBASE_URL=https://pb.example.com \
bunx @fadlee/pocketbase-mcpAuthentication 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
# Install dependencies
bun install
# Run in development mode
bun run dev
# Type check
bun run typecheck
# Run tests (builds dist first)
bun run test
# Run all checks (typecheck + tests)
bun run check
# Interactive release helper (bump, check, publish, push tag)
bun run release
# Build for production
bun run buildEnvironment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| POCKETBASE_URL | No | PocketBase server URL (default: http://localhost:8090) |
License
MIT
