pocketbase-mcp
Enables AI assistants to interact with Pocketbase backend, providing tools for authentication, collection management, record CRUD operations, and log querying.
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-mcplist records from the 'tasks' collection where status = 'active'"
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
MCP (Model Context Protocol) server for Pocketbase - enables AI assistants to interact with Pocketbase backend through a clean, type-safe API.
Features
š Silent Authentication - Automatic authentication with retry logic
š¦ Full CRUD Operations - Complete record management
š Advanced Querying - Filtering, sorting, pagination, field selection
š Collections Management - List and inspect collections
š Logs Access - Query system logs with filters
š”ļø Type Safety - Full TypeScript support with Zod validation
šļø Clean Architecture - Layered design for easy maintenance
Related MCP server: PocketBase MCP Server
Installation
# Install dependencies
pnpm install
# Build the project
pnpm buildConfiguration
Environment Variables
Create a .env file in the project root:
POCKETBASE_URL=https://your-pocketbase-instance.com
POCKETBASE_IDENTITY=your-email@example.com
POCKETBASE_PASSWORD=your-passwordMCP Client Configuration
Add to your MCP client config (e.g., Claude Desktop):
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pocketbase": {
"command": "node",
"args": ["path/to/pocketbase-mcp/dist/index.js"],
"env": {
"POCKETBASE_URL": "https://your-pocketbase-instance.com",
"POCKETBASE_IDENTITY": "your-email@example.com",
"POCKETBASE_PASSWORD": "your-password"
}
}
}
}Available Tools
1. pocketbase_auth (Optional)
Authenticate with Pocketbase. Note: Authentication is handled automatically for other tools.
pocketbase_auth({
pocketbaseUrl?: string,
identity?: string,
password?: string
})2. pocketbase_list_collections
List all collections from Pocketbase.
pocketbase_list_collections({
page?: number, // default: 1
perPage?: number, // default: 500
skipTotal?: number // default: 1
})3. pocketbase_list_records
List records from a collection with filtering and pagination.
pocketbase_list_records({
collection: string, // required
page?: number,
perPage?: number, // default: 30, max: 500
sort?: string, // e.g., "-created,name"
filter?: string, // e.g., 'status="active"'
expand?: string, // e.g., "user,category"
fields?: string, // e.g., "id,name,email"
skipTotal?: number
})4. pocketbase_get_record
Get a single record by ID.
pocketbase_get_record({
collection: string, // required
id: string, // required
expand?: string,
fields?: string
})5. pocketbase_create_record
Create a new record in a collection.
pocketbase_create_record({
collection: string, // required
data: object, // required - record data
expand?: string,
fields?: string
})6. pocketbase_update_record
Update an existing record.
pocketbase_update_record({
collection: string, // required
id: string, // required
data: object, // required - fields to update
expand?: string,
fields?: string
})7. pocketbase_delete_record
Delete a record from a collection.
pocketbase_delete_record({
collection: string, // required
id: string // required
})8. pocketbase_list_logs
Query system logs with filtering and pagination.
pocketbase_list_logs({
page?: number,
perPage?: number, // default: 50, max: 500
sort?: string,
filter?: string, // e.g., '(message ~ "error")'
skipTotal?: number // default: 1
})Architecture
The project follows a clean, layered architecture:
src/
āāā index.ts # MCP server entry point
āāā config/ # Environment configuration
āāā types/ # TypeScript type definitions
āāā schemas/ # Zod validation schemas
āāā utils/ # Error handling & response formatting
āāā client/ # HTTP client & authentication manager
āāā repositories/ # Data access layer
āāā services/ # Business logic layer
āāā handlers/ # MCP request handlers
āāā tools/ # Tool definitions registryDesign Patterns
Repository Pattern: Separates data access from business logic
Service Pattern: Encapsulates business logic
Singleton Pattern: For HTTP client and auth manager
Template Method: Base classes for common functionality
Dependency Injection: Services injected into handlers
Development
# Run in development mode
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm startLicense
ISC
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -licenseBquality-maintenanceA comprehensive Model Context Protocol server for PocketBase that provides both user and administrative functionality, enabling authentication, collection/record management, file operations, and system administration through a standardized interface.3810
- AlicenseBqualityBmaintenanceEnables MCP-compatible applications to directly interact with PocketBase databases for collection management, record operations, schema generation, and data analysis.221962MIT
- Flicense-qualityCmaintenanceA Model Context Protocol server that provides AI assistants like Claude with full access to PocketBase backends through natural language. It enables CRUD operations on records, collection management, authentication, file handling, and database administration via a Pythonic interface.
- Alicense-qualityFmaintenanceEnables AI assistants and MCP clients to interact with PocketBase databases for authentication, data management, and administrative operations.1065MIT
Related MCP Connectors
The agent-native cloud: database, functions, AI, storage, computers. 50 tools, one API key.
Git-backed platform for skills, tools, and context for AI agents
Run AI customer support from your terminal: conversations, knowledge base, and chat widget.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/thanatath/pocketbase-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server