Skip to main content
Glama
PocketBase MCP Server

PocketBase MCP Server

by fadlee

dynamic-pocketbase-mcp

PocketBase를 위한 동적 모델 컨텍스트 프로토콜(MCP) 서버입니다. AI 클라이언트를 한 번만 연결하면 런타임 도구를 사용하여 모든 PocketBase 프로젝트의 컬렉션과 레코드를 관리할 수 있습니다.

이 서버가 다른 이유

많은 PocketBase MCP 서버는 정적입니다. 즉, 컬렉션별 동작을 하드코딩하거나 스키마마다 사용자 정의 도구 정의가 필요합니다.

dynamic-pocketbase-mcp는 동적입니다:

  • 컬렉션에 구애받지 않는 도구(list_collections, list_records, create_record 등)를 사용합니다.

  • 서버 코드를 다시 생성하지 않고도 기존 및 새로 생성된 컬렉션에서 작동합니다.

  • 라이브 PocketBase 컬렉션을 MCP 리소스로 노출합니다.

Related MCP server: PocketBase MCP Server

기능

  • 상태, 인증, 컬렉션, 규칙 및 레코드를 위한 18개의 MCP 도구

  • 컬렉션 수명 주기 작업(생성, 업데이트, 삭제, 검사)

  • 필터, 정렬, 페이지 매김 및 필드 선택을 포함한 레코드 CRUD

  • 도구를 통한 세션 기반 인증(auth_admin, auth_user, get_auth_status, logout)

  • 필드 스키마 및 규칙 구문을 위한 내장 참조

설치

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

AI 클라이언트에서 구성

Claude Desktop

Claude Desktop 설정(~/Library/Application Support/Claude/claude_desktop_config.json, macOS 기준)에 추가하세요:

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

POCKETBASE_URL이 설정되지 않은 경우, 서버는 기본적으로 http://localhost:8090을 사용합니다.

직접 사용

# 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

간단한 튜토리얼: 이 MCP를 사용하여 AI와 대화하기

MCP 클라이언트를 구성한 후, 채팅을 열고 다음과 같은 프롬프트를 시도해 보세요:

  1. "PocketBase URL을 https://pb.example.com으로 설정해줘."

  2. "PocketBase 서버 상태를 확인해줘."

  3. "모든 PocketBase 컬렉션을 나열해줘."

  4. "이메일 <your-email>과 비밀번호 <your-password>로 관리자 인증을 수행해줘."

  5. "필수 title 텍스트 필드가 있는 notes라는 컬렉션을 생성해줘."

  6. "notes에 First note라는 제목의 레코드를 생성해줘."

  7. "notes의 모든 레코드를 최신순으로 보여줘."

  8. "PocketBase 인증 세션에서 로그아웃해줘."

이 단계들이 성공하면, 이제 AI가 이 MCP 서버를 통해 스키마와 데이터를 관리할 수 있습니다.

인증 흐름 (도구 사용)

  1. auth_admin 또는 auth_user

  2. get_auth_status

  3. logout

사용 가능한 도구

상태 및 참조

  • health - PocketBase 서버 상태 확인

  • set_base_url - 현재 MCP 세션의 PocketBase URL을 업데이트하고 인증 토큰을 지움

  • get_field_schema_reference - 필드 유형 문서 가져오기

  • get_rules_reference - API 규칙 구문 참조 가져오기

인증

  • auth_admin - 관리자/슈퍼유저로 인증

  • auth_user - 인증 컬렉션 사용자(이메일/사용자 이름)로 인증

  • get_auth_status - 현재 인증 상태 확인

  • logout - 인증 세션 지우기

컬렉션

  • list_collections - 모든 컬렉션 나열

  • view_collection - 이름 또는 ID로 컬렉션 보기

  • create_collection - 새 컬렉션 생성(제공되지 않는 한 기본/인증 컬렉션에 created 및 updated 자동 날짜 필드 자동 추가)

  • update_collection - 컬렉션 스키마/설정 업데이트

  • delete_collection - 컬렉션 삭제

  • update_collection_rules - 액세스 제어 규칙 업데이트

레코드

  • list_records - 필터링, 정렬, 페이지 매김을 사용하여 레코드 나열/검색

  • view_record - ID로 단일 레코드 보기

  • create_record - 새 레코드 생성

  • update_record - 기존 레코드 업데이트

  • delete_record - 레코드 삭제

개발

# 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

환경 변수

변수

필수

설명

POCKETBASE_URL

아니요

PocketBase 서버 URL (기본값: http://localhost:8090)

라이선스

MIT

Available Tools

22 tools
analyze_collection_dataC

Analyze data patterns and provide insights about a collection

Inputs: collection (required), options.

authenticate_userC

Authenticate a user and get auth token

Inputs: email (required), password (required), autoRefreshThreshold, collection.

backup_databaseC

Create a backup of the PocketBase database

Inputs: format.

create_collectionC

Create a new collection in PocketBase

Inputs: fields (required), name (required), createRule, deleteRule, +7 more.

create_recordC

Create a new record in a collection

Inputs: collection (required), data (required), expand, fields.

create_userC

Create a new user account

Inputs: email (required), password (required), passwordConfirm (required), additionalData, +3 more.

delete_collectionB

Delete a collection from PocketBase

Inputs: collection (required).

delete_recordC

Delete a record

Inputs: collection (required), id (required).

download_fileC

Download a file from a record in PocketBase

Inputs: collection (required), fileField (required), recordId (required).

generate_pb_schemaB

Generate a PocketBase schema based on TypeScript interfaces or database diagram

Inputs: sourceCode (required), options.

generate_typescript_interfacesB

Generate TypeScript interfaces from PocketBase collections

Inputs: collections, options.

get_collection_schemaC

Get schema details for a collection

Inputs: collection (required).

import_dataC

Import data into a collection

Inputs: collection (required), data (required), mode.

list_collectionsC

List all collections with optional sorting

Inputs: sort.

list_recordsC

List records from a collection with optional filters

Inputs: collection (required), expand, fields, filter, +4 more.

manage_indexesC

Manage collection indexes

Inputs: action (required), collection (required), index.

migrate_collectionC

Add, remove, or modify fields from a collection

Inputs: collection (required), fields (required), createRule, dataTransforms, +5 more.

query_collectionC

Advanced query with filtering, sorting, and aggregation

Inputs: collection (required), aggregate, expand, filter, +1 more.

truncate_collectionB

Delete all records associated with the specified collection

Inputs: collection (required).

update_recordC

Update an existing record

Inputs: collection (required), data (required), id (required), expand, +1 more.

upload_fileB

Upload a file to a record in PocketBase

Inputs: collection (required), fileContent (required), fileField (required), fileName (required), +1 more.

upload_file_from_urlC

Upload a file from URL to a record in PocketBase

Inputs: collection (required), fileField (required), recordId (required), url (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 22 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific resources and actions, but some potential confusion exists: 'list_records' and 'query_collection' both retrieve records, though 'query_collection' offers advanced features; 'upload_file' and 'upload_file_from_url' are closely related but differentiated by source. Overall, descriptions help clarify boundaries, but minor overlaps could cause occasional misselection.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, such as 'create_collection', 'delete_record', and 'list_records'. All tools use snake_case with clear, descriptive verbs aligned with their actions, making the set predictable and easy to navigate without any deviations in style.

    Tool Count4/5

    With 22 tools, the count is slightly high for a typical MCP server scope, but it is reasonable given the comprehensive coverage of PocketBase operations. It includes CRUD, schema management, data handling, and utilities, which justifies the number, though it might feel heavy compared to more focused servers.

    Completeness5/5

    The tool set provides complete coverage for PocketBase operations, including full CRUD for collections and records, user authentication, schema management, data import/export, file handling, and utilities like backup and analysis. There are no obvious gaps, ensuring agents can handle all core workflows without dead ends.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      D
      quality
      Not graded
      maintenance
      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).
      14
      164 npm
      70
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      MCP server that allows interaction with PocketBase databases, enabling record operations (fetch, list, create, update), file management, and schema migrations through natural language.
      22
      43
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants and MCP clients to interact with PocketBase databases for authentication, data management, and administrative operations.
      65
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables creating and managing collections, performing record CRUD operations with pagination and expansions, handling user authentication, and backing up PocketBase databases through MCP tools.
      18 npm
      ISC