PocketBase MCP Server

Integrations

  • Provides tools for listing collections from a PocketBase instance, allowing access to the database structure and schema information.

  • Implemented as a TypeScript-based MCP server, offering type-safe interactions with the underlying PocketBase collections and data.

pocketbase-mcp-server MCP 服务器

PocketBase 的模型上下文协议服务器

这是一个基于 TypeScript 的 MCP 服务器,提供:

  • 列出 PocketBase 收藏品的工具

特征

工具

  • pocketbase_list_collections - 列出 PocketBase 实例中的所有集合
    • 需要使用 PocketBase 配置启动服务器
    • 返回所有集合的 JSON 表示形式

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于使用自动重建的开发:

npm run watch

安装

要与 Claude Desktop 一起使用,请添加服务器配置:

在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "pocketbase-mcp-server": { "command": "/path/to/pocketbase-mcp-server/build/index.js --pb-url=http://localhost:8090 --pb-admin-email=admin@example.com --pb-admin-password=your-secure-password" } } }

PocketBase 配置

要启用 PocketBase 集合工具,您必须提供以下配置作为命令行参数或环境变量:

  • --pb-url=<url>PB_URL - 您的 PocketBase 实例的 URL(例如, http://localhost:8090
  • --pb-admin-email=<email>PB_ADMIN_EMAIL - 用于身份验证的管理员电子邮件
  • --pb-admin-password=<password>PB_ADMIN_PASSWORD - 用于身份验证的管理员密码

如果使用环境变量,您可以像这样设置它们:

export PB_URL=http://localhost:8090 export PB_ADMIN_EMAIL=admin@example.com export PB_ADMIN_PASSWORD=your-secure-password

使用命令行参数的示例:

node build/index.js --pb-url=http://localhost:8090 --pb-admin-email=admin@example.com --pb-admin-password=your-secure-password

调试

由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:

npm run inspector

检查器将提供一个 URL 来访问浏览器中的调试工具。

-
security - not tested
F
license - not found
-
quality - not tested

模型上下文协议服务器使 Claude AI 能够通过自然语言列出和访问集合来与 PocketBase 数据库进行交互。

  1. Features
    1. Tools
  2. Development
    1. Installation
      1. PocketBase Configuration
      2. Debugging
    ID: wh8u4doxsl