PocketBase MCP Server
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-mcpAI 클라이언트에서 구성
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 클라이언트를 구성한 후, 채팅을 열고 다음과 같은 프롬프트를 시도해 보세요:
"PocketBase URL을
https://pb.example.com으로 설정해줘.""PocketBase 서버 상태를 확인해줘."
"모든 PocketBase 컬렉션을 나열해줘."
"이메일
<your-email>과 비밀번호<your-password>로 관리자 인증을 수행해줘.""필수
title텍스트 필드가 있는notes라는 컬렉션을 생성해줘.""
notes에First note라는 제목의 레코드를 생성해줘.""
notes의 모든 레코드를 최신순으로 보여줘.""PocketBase 인증 세션에서 로그아웃해줘."
이 단계들이 성공하면, 이제 AI가 이 MCP 서버를 통해 스키마와 데이터를 관리할 수 있습니다.
인증 흐름 (도구 사용)
auth_admin또는auth_userget_auth_statuslogout
사용 가능한 도구
상태 및 참조
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 (기본값: |
라이선스
MIT
Available Tools
22 toolsanalyze_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
Scored across 22 tools
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.
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.
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.
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
Related MCP Connectors
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
MCP server for interacting with the Supabase platform
Agent-native backend: Postgres, auth, storage, functions, hosting and deploy, over MCP
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Related MCP Servers
- AlicenseDqualityNot gradedmaintenanceA 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).14164 npm70MIT
- AlicenseAqualityCmaintenanceMCP server that allows interaction with PocketBase databases, enabling record operations (fetch, list, create, update), file management, and schema migrations through natural language.2243MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants and MCP clients to interact with PocketBase databases for authentication, data management, and administrative operations.65MIT
- AlicenseNot gradedqualityAmaintenanceEnables creating and managing collections, performing record CRUD operations with pagination and expansions, handling user authentication, and backing up PocketBase databases through MCP tools.18 npmISC