npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dynamic-pocketbase-mcp

v2.0.0

Published

Dynamic PocketBase MCP server for AI clients

Readme

dynamic-pocketbase-mcp

Dynamic Model Context Protocol (MCP) server for PocketBase. Connect your AI client once, then manage collections and records in any PocketBase project using runtime tools.

Why this server is different

Many PocketBase MCP servers are static: they hardcode collection-specific behavior or require custom tool definitions per schema.

dynamic-pocketbase-mcp is dynamic:

  • Uses collection-agnostic tools (list_collections, list_records, create_record, etc.)
  • Works across existing and newly created collections without regenerating server code
  • Exposes live PocketBase collections as MCP resources

Features

  • 18 MCP tools for health, auth, collections, rules, and records
  • Collection lifecycle operations (create, update, delete, inspect)
  • Record CRUD with filters, sorting, pagination, and field selection
  • Session-based auth via tools (auth_admin, auth_user, get_auth_status, logout)
  • Built-in references for field schema and rules syntax

Installation

npm install dynamic-pocketbase-mcp
# or
bun install dynamic-pocketbase-mcp

Configure in an AI client

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "dynamic-pocketbase": {
      "command": "npx",
      "args": ["-y", "dynamic-pocketbase-mcp"]
    }
  }
}

If POCKETBASE_URL is not set, the server defaults to http://localhost:8090.

Direct usage

# Use default URL (http://localhost:8090)
npx -y dynamic-pocketbase-mcp

# Use custom PocketBase URL
POCKETBASE_URL=https://pb.example.com \
bunx dynamic-pocketbase-mcp

Simple tutorial: chat with AI using this MCP

After you configure your MCP client, open a chat and try prompts like this:

  1. "Set PocketBase URL to https://pb.example.com."
  2. "Check my PocketBase server health."
  3. "List all PocketBase collections."
  4. "Authenticate as admin with email <your-email> and password <your-password>."
  5. "Create a collection named notes with a required title text field."
  6. "Create a record in notes with title First note."
  7. "Show all records in notes, newest first."
  8. "Log out from PocketBase auth session."

If those steps succeed, your AI can now manage schema and data through this MCP server.

Authentication flow (via tools)

  1. auth_admin or auth_user
  2. get_auth_status
  3. logout

Available tools

Health and references

  • health - Check PocketBase server health status
  • set_base_url - Update PocketBase URL for current MCP session and clear auth token
  • get_field_schema_reference - Get field types documentation
  • get_rules_reference - Get API rules syntax reference

Authentication

  • auth_admin - Authenticate as admin/superuser
  • auth_user - Authenticate as auth collection user (email/username)
  • get_auth_status - Check current authentication status
  • logout - Clear authentication session

Collections

  • list_collections - List all collections
  • view_collection - View collection by name or ID
  • create_collection - Create new collection
  • update_collection - Update collection schema/settings
  • delete_collection - Delete collection
  • update_collection_rules - Update access control rules

Records

  • list_records - List/search records with filtering, sorting, pagination
  • view_record - View single record by ID
  • create_record - Create new record
  • update_record - Update existing record
  • delete_record - Delete record

Development

# Install dependencies
bun install

# Run in development mode
bun run dev

# Type check
bun run typecheck

# Run tests (builds dist first)
bun run test

# Run all checks (typecheck + tests)
bun run check

# Interactive release helper (bump, check, publish, push tag)
bun run release

# Build for production
bun run build

Environment variables

| Variable | Required | Description | |----------|----------|-------------| | POCKETBASE_URL | No | PocketBase server URL (default: http://localhost:8090) |

License

MIT