PocketBase MCP Server logo

PocketBase MCP Server

by Mabel Data

This MCP server interacts with a PocketBase instance, allowing you to fetch, list, create, update, and manage records and files in your PocketBase collections. It provides tools for record, collection, log, and migration management.

View on GitHub

Last updated: N/A

What is PocketBase MCP Server?

The PocketBase MCP Server is a Model Context Protocol (MCP) server designed to interact with a PocketBase instance. It provides a set of tools to manage records, files, collections, logs, and migrations within your PocketBase database.

How to use PocketBase MCP Server?

To use the server, you need to install it (either via Smithery or manually by cloning the repository, installing dependencies, and building the server). Then, configure the necessary environment variables (POCKETBASE_API_URL and POCKETBASE_ADMIN_TOKEN). Finally, add the server to your Cline MCP settings file, providing the path to the server's executable and the environment variables.

Key features of PocketBase MCP Server

  • Fetch, list, create, and update records in PocketBase collections.

  • Upload and download files to/from PocketBase records.

  • Manage PocketBase collections (list and get schema).

  • Access and manage PocketBase API request logs.

  • Comprehensive migration system for managing database schema changes.

Use cases of PocketBase MCP Server

  • Integrating PocketBase with AI agents and other applications via the Model Context Protocol.

  • Automating database management tasks such as record creation, updates, and file handling.

  • Managing database schema changes through a structured migration system.

  • Monitoring and analyzing API request logs for debugging and performance optimization.

FAQ from PocketBase MCP Server

What environment variables are required?

The server requires POCKETBASE_API_URL (the URL of your PocketBase instance) and POCKETBASE_ADMIN_TOKEN (an admin authentication token for your PocketBase instance).

How do I install the server?

You can install it via Smithery using the provided command, or manually by cloning the repository, installing dependencies, and building the server.

How do I configure the server for Cline?

You need to add the server to your Cline MCP settings file (cline_mcp_settings.json), providing the path to the server's executable and the environment variables.

What is the migration system used for?

The migration system is used for managing database schema changes in a structured and repeatable way. It allows you to create, apply, and revert migrations.

Where are migration files stored?

By default, migration files are stored in the 'pb_migrations' directory in the current working directory. You can customize this location using the set_migrations_directory tool.