PocketBase Dev MCP
Provides tools to set up and manage isolated PocketBase instances per project, including generating configuration and start/stop/status scripts, creating an admin user, starting/stopping/checking status, reading logs, and querying the database.
Provides read-only SQLite query execution against a project's PocketBase database, with results formatted as a table or JSON.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PocketBase Dev MCP
An MCP (Model Context Protocol) server that generates PocketBase management scripts for development projects. Run multiple isolated PocketBase instances from a single binary—each project gets its own data directory, port, and auto-generated start/stop/status scripts.
Key Features:
🚀 Single binary, multiple isolated instances
📁 Per-project data directories and ports
🛠️ Auto-generated shell scripts (start/stop/status)
🔒 No background processes—scripts run in foreground with visible logs
⚡ Built with Bun, distributed as single file
Overview
Single Binary, Multiple Instances: Uses one PocketBase binary to run multiple isolated instances
Per-Project Isolation: Each project gets its own data directory and port
Script Generation: Generates start/stop/status scripts for each project
User-Managed: Users save scripts to their projects and run them directly
Related MCP server: PocketBase Cloud MCP Server
Prerequisites
Bun - Install from bun.sh
PocketBase binary - Download from pocketbase.io and place in your PATH, project directory, or configure via
.env
Quick Start (Clone & Run)
# Clone the repository
git clone https://github.com/YOUR_USERNAME/pocketbase-dev-mcp.git
cd pocketbase-dev-mcp
# Install dependencies
bun install
# (Optional) Configure defaults
cp .env.example .env
# Edit .env to set your PocketBase binary path, admin credentials, etc.
# Build
bun run build
# Add to Claude Desktop config (see Configuration section below)Installation
Option 1: Download Release (Recommended)
Download
index.jsfrom the latest releaseDownload PocketBase binary from pocketbase.io
Place both files in the same directory (e.g.,
~/tools/pocketbase-mcp/)
Option 2: Build from Source
# Clone the repository
git clone https://github.com/YOUR_USERNAME/pocketbase-dev-mcp.git
cd pocketbase-dev-mcp
# Install dependencies and build
bun install
bun run build
# Built file is at dist/index.jsConfiguration
Environment Variables (.env)
Create a .env file in the project root to customize defaults:
cp .env.example .envVariable | Description | Default |
| Path to pocketbase executable |
|
| Default admin email for new projects |
|
| Default admin password |
|
| Starting port for auto-assignment |
|
Claude Desktop Setup
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"pocketbase": {
"command": "bun",
"args": ["/path/to/pocketbase-dev-mcp/dist/index.js"]
}
}
}Usage
Setup a New Project
Set up PocketBase for my project at ~/projects/myappThis creates:
.pocketbase.json- Project configurationpocketbase-start.sh- Start script (foreground mode)pocketbase-stop.sh- Stop scriptpocketbase-status.sh- Status check script
Start PocketBase
cd ~/projects/myapp
./pocketbase-start.shThe start script runs in foreground mode so logs are visible in the terminal. Press Ctrl+C to stop.
Stop PocketBase
./pocketbase-stop.shCheck Status
./pocketbase-status.shGenerated Scripts
pocketbase-start.sh
Runs PocketBase in foreground mode with:
Project-specific data directory
Dedicated port
Visible logs in terminal
PID file management
pocketbase-stop.sh
Stops the PocketBase instance by:
Finding process on the configured port
Sending graceful shutdown signal
Cleaning up PID file
pocketbase-status.sh
Shows:
Project name and configuration
Data directory location
Port number
Running/stopped status
Admin UI and API URLs
Project Configuration
The .pocketbase.json file in your project root:
{
"projectName": "myapp",
"port": 8090,
"dataDir": "./pb_data",
"pocketbaseBinary": "/path/to/pocketbase",
"generatedAt": "2025-03-12T..."
}Debug Logging
PocketBase v0.20.0+ does not have a --debug flag. To enable debug logging:
Start the instance with
./pocketbase-start.shOpen Admin UI:
http://127.0.0.1:PORT/_/_Go to Settings → Logs
Set "Minimum log level" to
DEBUGLogs will appear in the terminal in real-time
Architecture
How Multiple Instances Work
PocketBase stores data in a pb_data directory by default. To run multiple instances:
Different Data Directories: Each instance uses
--dirflagDifferent Ports: Each instance uses
--httpflagSame Binary: All instances run from the same
./pocketbaseexecutable
Example:
# Instance for project "myapp"
./pocketbase serve --dir=./pb_data --http=127.0.0.1:8090
# Instance for project "blog"
./pocketbase serve --dir=./pb_data --http=127.0.0.1:8091Available MCP Tools
setup-project
Creates project configuration, generates scripts, and creates admin user.
Input: { projectPath: string, projectName?: string, port?: number }
start-pocketbase
Starts PocketBase for a project (background mode).
Input: { projectPath: string }
stop-pocketbase
Stops PocketBase for a project.
Input: { projectPath: string }
status-pocketbase
Checks if PocketBase is running.
Input: { projectPath: string }
read-logs
Reads/tails logs with optional grep search.
Input: { projectPath: string, search?: string, lines?: number, ignoreCase?: boolean }
query-sqlite
Runs read-only SQLite queries against the database.
Input: { projectPath: string, query: string, format?: "table" | "json" }
list-project-configs
Lists all configured PocketBase projects.
Input: { searchPath?: string }
File Structure
pocketbase-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── script-generator.ts # Script generation logic
│ ├── config.ts # Configuration management
│ └── types.ts # TypeScript types
├── pocketbase # PocketBase binary
├── package.json
├── tsconfig.json
└── README.mdLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Manage PocketBase Cloud projects, instances, deploys, domains, collections and records.
Manage Supabase projects end to end across database, auth, storage, realtime, and migrations. Moni…
Manage uivoid projects, tools, keys, hosted databases and teams from your agent.
Projects your agent builds and shares: Git repos, managed databases, tunnels and invites.
Related MCP Servers
- FlicenseAqualityCmaintenanceEnables managing PocketBase instances through intent-first tools for schema inspection, record CRUD, bulk operations, authentication, file handling, and server monitoring, with optional destructive operations gated behind explicit opt-in.1115-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to inspect and manage hosted PocketBase projects, instances, deployments, domains, logs, and diagnostics. It supports OAuth or CLI-token access with read-only or scoped permissions and optional database tools.Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables advanced database operations, schema management, record CRUD, user authentication, and backups through the Model Context Protocol for PocketBase instances.18 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables LLM clients to run advanced operations against a PocketBase backend, including creating and inspecting collections, CRUD on records with filtering and pagination, user authentication and account creation, and database backups. It also supports local stdio and Docker-based deployment with admin credentials configured via environment variables.18 npmISC