PocketBase
A comprehensive MCP server for managing PocketBase database schemas and migrations via REST API. It enables users to generate and execute migrations for creating, modifying, and deleting collections and fields directly through MCP-compatible clients.
What is PocketBase?
PocketBase is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to comprehensive mcp server for managing pocketbase database schemas and migrations via rest api. it enables users to generate and execute migrations for creating, modifying, and deleting collections and...
A comprehensive MCP server for managing PocketBase database schemas and migrations via REST API. It enables users to generate and execute migrations for creating, modifying, and deleting collections and fields directly through MCP-compatible clients.
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A comprehensive MCP server for managing PocketBase database
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx pocketbase-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use PocketBase
PocketBase MCP Server is a comprehensive MCP integration for PocketBase, the open-source backend-as-a-service, that lets AI agents manage database collections and records through natural language. It exposes tools for full CRUD operations on records, collection schema creation and retrieval, user account management, authentication, and database backups — all via the PocketBase REST API. Developers use it to let Claude scaffold and manage their PocketBase databases during development or automate data operations without writing repetitive REST calls.
Prerequisites
- Node.js 18+ and npm installed
- A running PocketBase instance (local or hosted) accessible at a known URL
- PocketBase admin credentials (email and password) for privileged operations
- An MCP-compatible client such as Claude Desktop, Claude Code, or Cursor/Cline
Clone the repository and install dependencies
Clone the pocketbase-mcp repository and install Node.js dependencies.
git clone https://github.com/mrwyndham/pocketbase-mcp.git
cd pocketbase-mcp
npm installBuild the project
Compile the TypeScript source to the dist/build directory.
npm run buildEnsure PocketBase is running
Start your PocketBase instance if it is not already running. The default port is 8090.
./pocketbase serveConfigure environment variables
Set the three required/recommended environment variables. POCKETBASE_URL is required; admin credentials unlock collection management tools.
POCKETBASE_URL=http://127.0.0.1:8090
[email protected]
POCKETBASE_ADMIN_PASSWORD=your_admin_passwordAdd the server to your MCP client configuration
Edit claude_desktop_config.json to register the server. Pass environment variables in the env block.
{
"mcpServers": {
"pocketbase": {
"command": "node",
"args": ["/path/to/pocketbase-mcp/build/index.js"],
"env": {
"POCKETBASE_URL": "http://127.0.0.1:8090",
"POCKETBASE_ADMIN_EMAIL": "[email protected]",
"POCKETBASE_ADMIN_PASSWORD": "your_admin_password"
}
}
}
}Restart Claude Desktop and test
Restart Claude Desktop. Ask Claude to list your PocketBase collections to verify the connection is working.
PocketBase Examples
Client configuration
Claude Desktop configuration for the PocketBase MCP server with admin credentials.
{
"mcpServers": {
"pocketbase": {
"command": "node",
"args": ["/path/to/pocketbase-mcp/build/index.js"],
"env": {
"POCKETBASE_URL": "http://127.0.0.1:8090",
"POCKETBASE_ADMIN_EMAIL": "[email protected]",
"POCKETBASE_ADMIN_PASSWORD": "your_admin_password"
}
}
}
}Prompts to try
Natural language prompts that map to PocketBase MCP tools.
- "Create a PocketBase collection called 'posts' with fields: title (text, required), content (text), published (bool)"
- "List all records in the 'users' collection with a limit of 20"
- "Create a new record in the 'posts' collection: title='Hello World', content='My first post', published=true"
- "Authenticate the user [email protected] and return an auth token"
- "Back up the PocketBase database"
- "Get the schema for the 'orders' collection"Troubleshooting PocketBase
Connection refused error when trying to reach PocketBase
Confirm PocketBase is running at the URL set in POCKETBASE_URL. Run 'curl http://127.0.0.1:8090/api/health' to verify. If using Docker, ensure the container port is exposed and the URL matches the host mapping.
Authentication fails even with correct admin credentials
Double-check POCKETBASE_ADMIN_EMAIL and POCKETBASE_ADMIN_PASSWORD match the credentials you set up in the PocketBase Admin UI. PocketBase requires the admin account to be created on first launch via the web UI at http://127.0.0.1:8090/_/.
build/index.js not found after npm run build
Ensure you are in the pocketbase-mcp directory when running 'npm run build'. Check the package.json outDir setting — the compiled output should land in 'build/'. If it outputs to 'dist/', update the args path in your MCP config accordingly.
Frequently Asked Questions about PocketBase
What is PocketBase?
PocketBase is a Model Context Protocol (MCP) server that comprehensive mcp server for managing pocketbase database schemas and migrations via rest api. it enables users to generate and execute migrations for creating, modifying, and deleting collections and fields directly through mcp-compatible clients. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install PocketBase?
Follow the installation instructions on the PocketBase GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with PocketBase?
PocketBase works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is PocketBase free to use?
Yes, PocketBase is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
PocketBase Alternatives — Similar Databases Servers
Looking for alternatives to PocketBase? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up PocketBase in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use PocketBase?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.