pREST Key Features
Key features of pREST β instant REST and MCP APIs for SQL databases, PostgreSQL-first native adapter, auth, ACL, multi-database, and plugins.
pREST is a open-source software that generates HTTP APIs from your schema so teams ship data products without writing boilerplate CRUD services β instant REST and MCP APIs for SQL databases. PostgreSQL is the first native adapter; Postgres-compatible engines are documented under Databases.
Last updated: August 11, 2026
Feature summary
Automatic REST from schema
Tables become endpoints without hand-written controllers
Full CRUD over HTTP
Familiar verbs map to SQL operations on the active dialect
MCP over HTTP
AI agents discover and read data via /_mcp (v2.1.0+)
pREST Studio
Embedded UI at /_studio/ β catalog, REST, and MCP explorers (v2.2.0+)
Auth & permissions
JWT/auth stack and table-level ACL; HMAC key minimums enforced (v2.4.2, #1017)
Multi-database
Route by alias across clusters; Timescale adapter auto-detect (v2.3.0, #999)
Vector search
pgvector KNN ordering / distance filtering (v2.4.0, #1011)
Observability
Opt-in OpenTelemetry traces/metrics/logs (v2.4.0, #1003)
Custom SQL routes
Templated /_QUERIES for curated operations, with bound values via sqlVal (v2.4.2, #1023)
Plugins
Extend with middleware and custom endpoints
Postgres-family reach
Native PG plus certified/compatible wire engines
Automatic API generation
REST (Representational State Transfer) is an architectural style for building APIs over HTTP. pREST exposes your SQL tables as REST resources at /{database}/{schema}/{table}, mapping standard verbs to CRUD on the same server as MCP.
pREST introspects the connected database catalog and exposes those resources automatically. You model data in SQL; pREST serves the API. See API Reference.
CRUD over HTTP
Standard HTTP methods map to insert/select/update/delete on the current native dialect (PostgreSQL). Filtering, ordering, and pagination use query parameters β Parameters.
MCP for AI agents
Artificial intelligence (AI) here means applications and agents that use models to reason and act on tools and data. MCP (Model Context Protocol) is an open standard for connecting AI apps and agents to tools and data. pREST exposes a read-only MCP endpoint at /_mcp so clients can discover schemas and query tables through the same server as the REST API.
From v2.1.0, the same process exposes read-only MCP tools β list schemas/tables, describe columns, select rows (max 100). Guide: MCP over HTTP.
pREST Studio
From v2.2.0, open /_studio/ for an embedded catalog / REST / MCP explorer UI (read-only). Guide: pREST Studio.
Observability and vector search
From v2.4.0, opt-in OpenTelemetry instrumentation (traces, metrics, and a slogβOTel log bridge) ships behind otel.enabled β see Configuring pREST β Observability. The same release adds pgvector-backed nearest-neighbor ordering (_korder) and distance filtering (:vecdist) β Parameters.
Authentication and authorization
Protect routes with JWT/auth configuration and restrict tables via access.tables / per-user rules β Auth, Permissions.
From v2.4.2, HMAC jwt.key must meet the RFC 7518 minimum for its algorithm (32 bytes for HS256, 48 for HS384, 64 for HS512), and jwt.algo is enforced as the sole permitted signature algorithm β Auth β HMAC key requirements. From v2.4.1, the [expose] listing settings also apply to the MCP endpoint, so /_mcp can no longer enumerate a catalog the REST routes hide β Configuring pREST β Expose Data.
Multi-database and SQL platform direction
Today: PostgreSQL native adapter; Timescale wire + E2E; hosted PG and PG-wire engines per Databases. Multi-adapter routing (Postgres + Timescale) shipped in v2.3.0 (#999) β see Multi-database.
Next: MySQL family, SQLite, SQL Server β roadmap.
pREST is positioned as a multi-database API platform; adapters beyond PostgreSQL are explicit roadmap work, not silent claims.
Custom queries and plugins
FAQ
Is pREST only a PostgreSQL tool?
It started with PostgreSQL and that remains the native adapter. The product direction is instant REST and MCP APIs for SQL databases β see the roadmap.
Can I use pREST with YugabyteDB or CockroachDB?
Yes, via the PostgreSQL wire path with documented labels and matrices β YugabyteDB, CockroachDB.
Related
Last updated