pocketbase-mcp-server MCP Server

pocketbase-mcp-server MCP Server

site icon
2025.03.06 1
JavaScript数据库管理PocketBase 工具数据库
pocketbase-mcp-server 是一个基于 TypeScript 的 MCP 服务器,专为 PocketBase 设计。它提供了列出 PocketBase 集合的工具,帮助开发者更方便地管理和操作 PocketBase 数据库。
View on GitHub

Overview

基本能力

产品定位

pocketbase-mcp-server 是一个专为 PocketBase 设计的 MCP 服务器,主要用于管理和操作 PocketBase 数据库的集合。

核心功能

  • 提供 pocketbase_list_collections 工具,用于列出 PocketBase 实例中的所有集合。
  • 需要服务器启动时配置 PocketBase 的相关参数。
  • 返回所有集合的 JSON 表示。

适用场景

  • 开发者需要快速查看和管理 PocketBase 数据库中的集合。
  • 需要自动化操作 PocketBase 数据库的场景。

工具列表

  • pocketbase_list_collections:列出 PocketBase 实例中的所有集合。

常见问题解答

  • 如何配置 PocketBase 参数?
  • 可以通过命令行参数或环境变量配置 PocketBase 的 URL、管理员邮箱和密码。
  • 如何调试?
  • 推荐使用 MCP Inspector 工具进行调试。

使用教程

使用依赖

安装项目依赖:

npm install

安装教程

  1. 构建服务器:
npm run build
  1. 开发时自动重建:
npm run watch
  1. 配置 Claude Desktop:
  2. 在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
  3. 在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json
  4. 添加以下配置:
{
  "mcpServers": {
    "pocketbase-mcp-server": {
      "command": "/path/to/pocketbase-mcp-server/build/index.js --pb-url=http://localhost:8090 [email protected] --pb-admin-password=your-secure-password"
    }
  }
}

PocketBase 配置

可以通过命令行参数或环境变量配置 PocketBase: - 命令行参数:

node build/index.js --pb-url=http://localhost:8090 [email protected] --pb-admin-password=your-secure-password
  • 环境变量:
export PB_URL=http://localhost:8090
export [email protected]
export PB_ADMIN_PASSWORD=your-secure-password

调试方式

使用 MCP Inspector 进行调试:

npm run inspector

许可证

None