SP

ssakone/pb_mcp_server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

65 stars 3 forks 品質 71 トレンド 0MIT

sssakone/pb mcp server は [https://github.com/ssakone/pb_mcp_server.] からインポートされた MCP サーバーの候補です

概要

sssakone/pb mcp server は [https://github.com/ssakone/pb_mcp_server.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

PocketBase機能の包括的なアクセスを提供するモデルコンテキストプロトコル(MCP)サーバー。 このサーバーでは、AIアシスタントやその他のMCPクライアントが、認証、データ管理、管理業務のPocketBaseデータベースとやり取りすることができます。

##特徴

-Authentication:セッション管理による管理者およびユーザー認証 -Session Persistence:saveSessionパラメータでツールコールを横断したセッションを保存

  • 自動認証: 環境変数を使用して起動時に自動認証
  • コレクション管理: 作成、更新、削除、およびクエリコレクション(adminのみ)
  • レコードのCRUD: 完全な作成、読み取り、更新、レコードの操作を削除
  • ユーザー管理: authコレクションでユーザーアカウントを管理する
  • 注文のヘッダ: 任意のリクエストでカスタム HTTP ヘッダを送信 -カスタムHTTPリクエスト: 任意のPocketBase APIエンドポイントに生のHTTPリクエストを送信
  • 問い合わせサポート:記録およびユーザーのためのフィルタリング、ソート、およびパジネーション
  • エラー処理:一貫性、有益なエラー応答 -Multi-Instance:複数のPocketBaseインスタンスに接続するためのサポート

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

PocketBase MCP Server

A Model Context Protocol (MCP) server that provides comprehensive access to PocketBase functionality. This server enables AI assistants and other MCP clients to interact with PocketBase databases for authentication, data management, and administrative operations.

Features

  • Authentication: Admin and user authentication with session management
  • Session Persistence: Save sessions across tool calls with saveSession parameter
  • Auto-Authentication: Automatically authenticate at startup using environment variables
  • Collection Management: Create, update, delete, and query collections (admin only)
  • Record CRUD: Full create, read, update, delete operations on records
  • User Management: Manage user accounts in auth collections
  • Custom Headers: Send custom HTTP headers with any request
  • Custom HTTP Requests: Send raw HTTP requests to any PocketBase API endpoint
  • Query Support: Filtering, sorting, and pagination for records and users
  • Error Handling: Consistent, informative error responses
  • Multi-Instance: Support for connecting to multiple PocketBase instances
  • TOON Output Format: Optional TOON format for 30-60% token reduction with LLMs

Installation

# Clone the repository
git clone https://github.com/ssakone/pocketbase-mcp-server.git
cd pocketbase-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

Configuration

Environment Variables

Create a .env file or set environment variables:

# PocketBase server URL (default: http://127.0.0.1:8090)
POCKETBASE_URL=http://127.0.0.1:8090

# Admin token for authenticated operations (optional - can be provided per-request)
POCKETBASE_ADMIN_TOKEN=your_admin_token_here

# Auto-authentication at startup (optional)
# If both are provided, the server will authenticate and obtain a token automatically
[email protected]
POCKETBASE_ADMIN_PASSWORD=your_admin_password

# Output format: json (default) or toon
# TOON format reduces token usage by 30-60% when communicating with LLMs
MCP_OUTPUT_FORMAT=json

Configuration File

Alternatively, create a pocketbase.config.json:

{
  "pocketbaseUrl": "http://127.0.0.1:8090",
  "pocketbaseAdminToken": "your_admin_token_here"
}

Running the Server

stdio Mode (for MCP clients like Cursor, Kiro)

npm start

HTTP/SSE Mode (for web clients and remote access)

# Default port 3001
npm run start:http

# Custom port
PORT=8080 npm run start:http

The HTTP server exposes an SSE endpoint at http://localhost:3001/sse.

MCP Client Configuration

Cursor/Kiro Configuration

Add to your MCP configuration:

{
  "mcpServers": {
    "pocketbase": {
      "command": "npm",
      "args": ["start"],
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "pocketbase": { "command": "npm", "args": ["start"], "cwd": "/path/to/pocketbase-mcp-server", "env": { "POCKETBASE_URL": "http://127.0.0.1:8090", "POCKETBASE_ADMIN_EMAIL": "[email protected]", "POCKETBASE_ADMIN_PASSWORD": "your_password" } } } }