# PocketBase MCP Server

Manage your PocketBase collections effortlessly. Fetch, create, update, and delete records with ease, while also handling file uploads and downloads. Streamline your database operations and enhance y…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y smithery mcp add mabeldata/pocketbase-mcp

# Browse available tools
npx -y smithery tool list mabeldata/pocketbase-mcp

# Get full schema for a tool
npx -y smithery tool get mabeldata/pocketbase-mcp fetch_record

# Call a tool
npx -y smithery tool call mabeldata/pocketbase-mcp fetch_record '{}'
```

## Tools (22)

- `fetch_record` — Fetch a single record from a PocketBase collection by ID.
- `list_records` — List records from a PocketBase collection. Supports filtering, sorting, pagination, and expansion.
- `create_record` — Create a new record in a PocketBase collection.
- `update_record` — Update an existing record in a PocketBase collection by ID.
- `get_collection_schema` — Get the schema (fields, rules, etc.) of a PocketBase collection.
- `list_collections` — List all collections in the PocketBase instance.
- `upload_file` — Upload a file (provided as content string) to a PocketBase collection record field.
- `download_file` — Get the URL to download a file from a PocketBase collection record field.
- `set_migrations_directory` — Set the directory where migration files will be created and read from.
- `create_migration` — Create a new, empty PocketBase migration file with a timestamped name.
- `create_collection_migration` — Create a migration file specifically for creating a new PocketBase collection.
- `add_field_migration` — Create a migration file for adding a field to an existing collection.
- `list_migrations` — List all migration files found in the PocketBase migrations directory.
- `apply_migration` — Apply a specific migration file.
- `revert_migration` — Revert a specific migration file.
- `apply_all_migrations` — Apply all pending migrations.
- `revert_to_migration` — Revert migrations up to a specific target.
- `list_logs` — List API request logs from PocketBase with filtering, sorting, and pagination.
- `get_log` — Get a single API request log by ID.
- `get_logs_stats` — Get API request logs statistics with optional filtering.
- `list_cron_jobs` — Returns list with all registered app level cron jobs.
- `run_cron_job` — Triggers a single cron job by its id.

```bash
# Get full input/output schema for a tool
npx -y smithery tool get mabeldata/pocketbase-mcp <tool-name>
```

---

License: MIT
