ZP

zhenruyan/postgrebase

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

101 stars 11 forks 품질 81 트렌드 8MIT

zhenruyan/postgrebase는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요

zhenruyan/postgrebase는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)

PostgreBase 是 AI 原生的无代码 API 开发平台,基于 PocketBase 重构。 内置 MCP (Model Context Protocol) 服务器,让 AI 工具(Claude、Cursor、Windsurf)直接操作你的数据. 支持 PostgreSQL、MySQL、SQLite 三种数据库,提供即时 REST API + 实时订阅 + Admin UI,5分钟上线你的后端服务。

특징

  • 세 가지 데이터베이스 엔진:
  • PostgreSQL (기본) — 운영 수준의 동시성, 클러스터링, 복잡한 쿼리.
  • MySQL — mysql:// DSN 접두사를 통해 완전 호환됨.
  • SQLite (순수 Go, CGO는 없음) — sqlite:// DSN 또는 .db 파일 경로를 통한 지역 개발 및 테스트가 0 의존성입니다.
  • 클러스터 준비 아키텍처: 로컬 데이터베이스 파일에 의존하지 않기 때문에 여러 인스턴스가 공유 PostgreSQL/MySQL 백엔드를 가진 부하 분산기 뒤에서 실행할 수 있습니다.
  • 하이브리드 캐싱:
  • Redis 캐시 (--redisDsn) — 클러스터 환경을 위한 분산 캐싱; SSE Realtime 구독은 Redis Pub/Sub를 통해 노드 간 동기화됩니다.
  • 인메모리 캐시 — Redis가 설정되지 않은 경우 고성능 로컬 메모리 캐싱으로 자동 후퇴.
  • MCP (모델 컨텍스트 프로토콜) 서버:
  • JSON-RPC 2.0 프로토콜을 통해 AI 도구(Claude Desktop, Cursor, Windsurf)가 데이터와 상호작용할 수 있습니다.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

PostgreBase — AI原生的无代码API开发工具

PostgreBase 是 AI 原生的无代码 API 开发平台,基于 PocketBase 重构。内置 MCP (Model Context Protocol) 服务器,让 AI 工具(Claude、Cursor、Windsurf)直接操作你的数据。支持 PostgreSQL、MySQL、SQLite 三种数据库,提供即时 REST API + 实时订阅 + Admin UI,5分钟上线你的后端服务。

Features

  • Three Database Engines:
    • PostgreSQL (default) — production-grade concurrency, clustering, and complex queries.
    • MySQL — fully compatible via the mysql:// DSN prefix.
    • SQLite (pure Go, no CGO) — zero-dependency local development and testing via sqlite:// DSN or .db file path.
  • Cluster-Ready Architecture: No reliance on local database files means multiple instances can run behind a load balancer with a shared PostgreSQL/MySQL backend.
  • Hybrid Caching:
    • Redis Cache (--redisDsn) — distributed caching for cluster environments; SSE Realtime subscriptions synchronize across nodes via Redis Pub/Sub.
    • In-Memory Cache — automatic fallback to high-performance local memory caching when Redis is not configured.
  • MCP (Model Context Protocol) Server:
    • JSON-RPC 2.0 protocol enabling AI tools (Claude Desktop, Cursor, Windsurf) to interact with your data.
    • 8 built-in tools: list_collections, get_collection, list_records, get_record, create_record, update_record, delete_record, search_records.
    • Resources: postgrebase://collections, postgrebase://settings.
    • Three transport modes: SSE (HTTP), Streamable HTTP, and Stdio.
    • MCP-specific API tokens with expiration support, manageable from the Admin UI.
  • Zero External Dependencies for SQLite: Uses modernc.org/sqlite (pure Go transpilation of SQLite), builds with CGO_ENABLED=0.

Quick Start

Prerequisites

  • Go 1.26.2+
  • PostgreSQL, MySQL, or nothing (SQLite works out of the box)

Build

git clone https://github.com/zhenruyan/postgrebase.git
cd postgrebase
go build -o pb ./build/

For static builds (no CGO):

CGO_ENABLED=0 go build -o pb ./build/

Run

SQLite (Local Development)

# Using sqlite:// prefix
./pb serve --dataDsn "sqlite://./pb_data/dev.db"

# Or just pass a .db file path
./pb serve --dataDsn "./pb_data/dev.db"
./pb serve --dataDsn "postgresql://user:[email protected]:5432/dbname?sslmode=disable"

MySQL

./pb serve --dataDsn "mysql://user:password@tcp(127.0.0.1:3306)/dbname"

With Redis Cache

./pb serve --dataDsn "postgres://..." --redisDsn "redis://127.0.0.1:6379/0"

Docker

# Build the image
docker build -t postgrebase .

# Run with SQLite
docker run -p 8090:8090 -v pb_data:/pb/pb_data postgrebase serve --dataDsn "sqlite:///pb/pb_data/dev.db"

# Run with PostgreSQL
docker run -p 8090:8090 postgrebase serve --dataDsn "postgres://user:pass@host:5432/db?sslmode=disable"

# Run with Redis
GitHub에서 전체 README 보기

설치

docker run -p 8090:8090 -v pb_data:/pb/pb_data postgrebase serve --dataDsn "sqlite:///pb/pb_data/dev.db"
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "postgrebase": { "command": "/path/to/pb", "args": ["mcp", "--dataDsn", "sqlite:///path/to/dev.db", "--mcp-no-auth"] } } }