Exposes instant REST and read-only MCP endpoints over PostgreSQL or MySQL with CRUD, custom SQL routes, JWT auth, and access control.
Overview
pREST delivers a production-oriented HTTP API on top of existing or new SQL databases without hand-writing a traditional backend. PostgreSQL is the default engine; MySQL 8 is selectable through configuration. It provides automatic table routes, scripted custom queries, authentication, ACL rules, caching, CORS, and an MCP endpoint for AI clients.
Operators point the service at one or more database URLs, optionally via a registry of aliases for multi-database hosting. Configuration can live in TOML or environment variables, with JSON-only overlays for auth and query sections in containers. Features include timezone control on Postgres sessions, host header allow lists, request ID logging, SQL injection guards on templated queries with bind helpers, and an optional guard middleware for rate limits and IP policy.
Install paths include Docker, Homebrew, and compiling the Go binary. Heroku supports one-click deployment with managed Postgres. The service is self-hosted and realtime-oriented for low-code API exposure.
MySQL support mirrors Postgres routing patterns with schema and database naming constraints on MySQL.
Key features
- Auto CRUD REST from SQL schemas
- Custom SQL query routes
- JWT authentication and ACL
- Read-only MCP over HTTP
- Multi-database registry mode
- Postgres and MySQL engines
- Query bind and ident helpers
- Optional request guard middleware
Use cases
- Instant backend for mobile or web apps
- Expose Postgres to microservices
- Low-code internal data APIs
- Let AI tools query databases via MCP
- Serve several databases from one proxy