Skip to main content
Glama

PocketBase MCP Server

by fadlee
MIT License
12

PocketBase MCP Server

Seamless integration between PocketBase and MCP clients through the Model Context Protocol (MCP). This server enables MCP-compatible applications to directly interact with PocketBase databases for collection management, record operations, schema generation, and data analysis.

✨ Key Features

  • 🗄️ Collection Management: Create, migrate, and manage collections with custom schemas
  • 📝 Record Operations: Full CRUD operations with advanced querying and filtering
  • 🔄 Schema Generation: Bidirectional conversion between TypeScript interfaces and PocketBase schemas
  • 📊 Data Analysis: Intelligent insights and analytics for your collections
  • 🔐 Authentication: User management and authentication workflows
  • ⚡ Performance: Optimized for speed with built-in caching and connection pooling

🚀 Quick Start

Installation

npm install -g pocketbase-cursor-mcp

MCP Client Setup

For Cursor AI
  1. Open Cursor AI Settings (Cmd+, / Ctrl+,)
  2. Navigate to AIModel Context Protocol Servers
  3. Add new server:
    • Name: pocketbase
    • Command: npx
    • Args: pocketbase-cursor-mcp --url=http://127.0.0.1:8090
For Other MCP Clients

Refer to your MCP client's documentation for server configuration. Use:

  • Server Command: npx pocketbase-cursor-mcp
  • Arguments: --url=http://127.0.0.1:8090

Basic Configuration

# Using command line pocketbase-cursor-mcp --url=http://127.0.0.1:8090 # Using environment variables export POCKETBASE_URL=http://127.0.0.1:8090 pocketbase-cursor-mcp

💡 Usage Examples

Create Collections from TypeScript

// Describe your interface to your MCP client interface User { username: string; email: string; isActive: boolean; profile: UserProfile; }

Generate TypeScript from PocketBase

Generate TypeScript interfaces from my PocketBase collections

Data Analysis

Analyze the "products" collection and provide insights

🛠️ Available Tools

Collection Management: create_collection, list_collections, delete_collection, get_collection_schema, update_collection, truncate_collection, migrate_collection

Record Operations: create_record, list_records, update_record, delete_record, query_collection

Authentication: authenticate_user, create_user

Code Generation: generate_pb_schema, generate_typescript_interfaces

Analysis: analyze_collection_data, backup_database, import_data

File Management: upload_file, download_file, upload_file_from_url

Advanced: manage_indexes

📖 Complete API Reference →

📚 Documentation

🏗️ Architecture

Built with a modular, extensible architecture:

src/ ├── tools/ # Modular tool system │ ├── schemas/ # Input validation │ └── handlers/ # Business logic ├── utils/ # Shared utilities ├── types/ # TypeScript definitions └── config/ # Configuration management

Key Benefits:

  • 🔧 Extensible: Easy to add new tools
  • 🛡️ Type-Safe: Full TypeScript coverage
  • Performance: Optimized for speed
  • 🧪 Testable: Comprehensive test coverage

Contributing

Contributions are always welcome! Please create an issue or pull request.

License

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

Enables MCP-compatible applications to directly interact with PocketBase databases for collection management, record operations, schema generation, and data analysis.

  1. ✨ Key Features
    1. 🚀 Quick Start
      1. Installation
      2. MCP Client Setup
      3. Basic Configuration
    2. 💡 Usage Examples
      1. Create Collections from TypeScript
      2. Generate TypeScript from PocketBase
      3. Data Analysis
    3. 🛠️ Available Tools
      1. 📚 Documentation
        1. 🏗️ Architecture
          1. Contributing
            1. License

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A comprehensive MCP server that provides sophisticated tools for interacting with PocketBase databases. This server enables advanced database operations, schema management, and data manipulation through the Model Context Protocol (MCP).
                Last updated -
                13
                68
                44
                JavaScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                A comprehensive server that enables advanced database operations with PocketBase, providing tools for collection management, record operations, user management, and database administration through the Model Context Protocol.
                Last updated -
                68
                JavaScript
                MIT License
              • A
                security
                A
                license
                A
                quality
                Provides sophisticated tools for interacting with PocketBase databases, enabling advanced database operations, schema management, and data manipulation through the Model Context Protocol (MCP).
                Last updated -
                24
                60
                JavaScript
                MIT License
              • A
                security
                A
                license
                A
                quality
                A comprehensive server that enables sophisticated interactions with PocketBase databases through Model Context Protocol, offering collection management, record operations, user management, and advanced database operations.
                Last updated -
                31
                68
                44
                JavaScript
                MIT License

              View all related MCP servers

              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/fadlee/pocketbase-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server