TL;DR: PostgREST is a mature, battle-tested tool for turning PostgreSQL into a REST API — but it only supports PostgreSQL, has no admin UI, and requires deep SQL expertise for authorization. Faucet supports seven databases (PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, and Snowflake), includes a built-in web admin UI, ships with role-based access control, generates OpenAPI 3.1 specs, and provides a native MCP server for AI agent integration — all from a single Go binary.
For the full, maintained comparison see Faucet vs PostgREST.
What Is PostgREST?
PostgREST is an open-source tool written in Haskell that automatically generates a RESTful API from an existing PostgreSQL database. It introspects the database schema at runtime and exposes tables, views, and stored functions as REST endpoints with zero code generation. PostgREST has been in active development since 2014 and is MIT licensed. Supabase uses PostgREST as its core REST API layer.
What Is Faucet?
Faucet is a free, open-source (MIT) single binary that turns your PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, or Snowflake database into a REST API and an MCP server in one command, so your apps and AI agents can use your data with API keys and role-based access built in.
Faucet is written in Go and supports PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, and Snowflake — plus cloud-hosted variants like Amazon RDS, Aurora, Azure SQL, Oracle Cloud (OCI), Supabase, Neon, and PlanetScale. Where PostgREST focuses exclusively on PostgreSQL, Faucet takes a multi-database approach: one binary, one command, seven databases.
# Connect a database and start Faucet
faucet db add --name mydb --driver postgres --dsn "postgres://user:pass@localhost:5432/mydb?sslmode=disable"
faucet serve
[VISUAL: Architecture diagram showing PostgREST connecting only to PostgreSQL on the left, versus Faucet connecting to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, and Snowflake on the right. Both generate REST APIs consumed by web apps, mobile apps, and (for Faucet only) AI agents via MCP. Use Mermaid.]
Feature-by-Feature Comparison
The following table compares Faucet and PostgREST across the dimensions that matter most when choosing a database REST API generator.
| Feature | Faucet | PostgREST |
|---|---|---|
| Supported databases | PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake | PostgreSQL only |
| Language / runtime | Go (single static binary) | Haskell (GHC compiled) |
| OpenAPI spec | OpenAPI 3.1 (auto-generated) | OpenAPI 2.0 (built-in); 3.1 in progress |
| Admin UI | Embedded Preact web dashboard | None |
| Authentication | API key + JWT | JWT only |
| Authorization | Built-in RBAC with table-level verb permissions | PostgreSQL Row Level Security (RLS) |
| MCP server | Native, built-in | Not available |
| Stored procedure support | Yes | Yes (via RPC endpoints) |
| Batch operations | Yes | Yes |
| Resource embedding | Not built in (one table per request) | Foreign key-based nested responses |
| Query filtering | DreamFactory-compatible filter expressions (AND/OR/NOT, IN, BETWEEN, LIKE, IS NULL) | Rich operator set (eq, gt, lt, like, ilike, fts, and/or/not) |
| Schema-based API versioning | — | Yes (expose different schemas as different API versions) |
| Deployment | Homebrew, Docker, GitHub releases, curl-to-install | Pre-built binaries, Docker, Homebrew, Nix |
| License | MIT | MIT |
Database Support: One Database vs Seven
PostgREST’s single most significant constraint is that it supports PostgreSQL and nothing else. The name itself makes this clear. If your organization runs MySQL, MariaDB, SQL Server, Oracle, SQLite, or Snowflake — or any combination of databases — PostgREST cannot help.
Faucet supports seven SQL databases from a single binary:
- PostgreSQL (including Amazon RDS, Aurora, Supabase, Neon)
- MySQL (including PlanetScale, Amazon RDS)
- MariaDB (self-hosted, Amazon RDS, SkySQL)
- SQL Server (including Azure SQL)
- Oracle (including OCI, Amazon RDS, Azure)
- SQLite
- Snowflake
This matters in practice. Most organizations do not run a single database engine. A company might use PostgreSQL for its primary application, MySQL for a legacy service, and Snowflake for analytics. With Faucet, one tool covers all of them. With PostgREST, you need a completely different solution for every non-PostgreSQL database.
# One Faucet server, several databases — same API format for all of them
faucet db add --name app --driver postgres --dsn "postgres://user:pass@localhost:5432/app_db?sslmode=disable"
faucet db add --name legacy --driver mysql --dsn "user:pass@tcp(localhost:3306)/legacy_db"
faucet db add --name erp --driver mssql --dsn "sqlserver://user:pass@localhost:1433?database=erp"
faucet db add --name analytics --driver sqlite --dsn "/path/to/analytics.db"
Authentication and Authorization
PostgREST and Faucet take fundamentally different approaches to security.
PostgREST: JWT + PostgreSQL RLS
PostgREST delegates authentication and authorization almost entirely to PostgreSQL. Clients authenticate by sending a JWT token in the Authorization header. PostgREST verifies the token using a configured secret or public key, then uses SET ROLE to impersonate the role specified in the JWT’s role claim. Authorization is handled through PostgreSQL’s built-in Row Level Security (RLS) policies and GRANT statements.
This approach is powerful — you get per-row, per-column access control using the full expressiveness of SQL — but it comes with a steep learning curve. You must:
- Design database roles and grants carefully
- Write RLS policies in SQL for every table
- Deploy a separate service to issue and manage JWTs (PostgREST does not handle login, user registration, or token issuance)
- Be comfortable debugging authorization logic in SQL
For teams with deep PostgreSQL expertise, this model is elegant. For everyone else, it is a significant barrier to entry.
Faucet: Built-In RBAC
Faucet ships with a built-in role-based access control (RBAC) system with per-service, per-table verb permissions (GET/POST/PUT/PATCH/DELETE) that fail closed. Faucet supports both API key and JWT authentication without requiring an external auth provider for basic use cases. Permissions are configured through the admin UI or API — no SQL expertise required.
Faucet is best suited for teams that want a working, secure API in minutes without writing authorization logic in SQL.
[VISUAL: Side-by-side comparison: on the left, PostgREST’s auth flow showing JWT issuance by external provider → PostgREST verifies → SET ROLE → PostgreSQL RLS policy evaluation. On the right, Faucet’s auth flow showing API key or JWT → Faucet RBAC engine → table/verb permission check → query execution. Use Mermaid.]
Admin UI and Developer Experience
PostgREST does not include a web interface of any kind. Configuration is done via a config file or environment variables. To explore the API, developers must use external tools like Swagger UI (pointed at PostgREST’s OpenAPI 2.0 output), curl, or Postman. There is no built-in way to manage users, view permissions, or inspect the database schema through a browser.
Faucet includes an embedded Preact web admin UI that runs inside the same binary — no separate frontend process, no additional dependencies. The admin UI provides:
- Database schema browsing
- API endpoint exploration and testing
- Role and permission management
- Configuration without editing files
This reduces the operational complexity of running Faucet in production. There is one process to manage, one port to expose, and one URL to bookmark.
OpenAPI Specification
PostgREST generates an OpenAPI 2.0 (Swagger) specification at its root path. While functional, OpenAPI 2.0 is the older standard, and many modern API tools and code generators expect OpenAPI 3.x. A community effort (postgrest-openapi) is working on OpenAPI 3.1 support, but this has not yet been merged into the core PostgREST binary.
Faucet generates OpenAPI 3.1 specifications natively. OpenAPI 3.1 is fully aligned with JSON Schema, supports webhooks, and is the current industry standard for API documentation.
MCP Server: AI Agent Integration
Faucet includes a native MCP (Model Context Protocol) server, enabling AI agents and LLMs to interact with your database directly through a standardized protocol. MCP clients like Claude Desktop, Claude Code, and Cursor can query and understand your data without custom integration code, and ChatGPT can use it through a Custom GPT Action that imports Faucet’s OpenAPI spec.
PostgREST does not have MCP support. To connect an AI agent to a PostgREST API, you would need to build a custom integration layer or wrapper.
As AI-assisted development and autonomous agents become more prevalent, native MCP support is an increasingly meaningful differentiator.
Architecture and Performance
PostgREST
PostgREST is compiled Haskell running on the Warp HTTP server, which is consistently among the fastest HTTP servers in benchmarks. PostgREST delegates JSON serialization to PostgreSQL itself (using json_agg and to_json), which avoids an extra serialization step in application code. The Hasql database driver uses PostgreSQL’s binary protocol for efficient data transfer.
PostgREST uses GHC green threads for concurrency, which are lightweight and handle high connection counts efficiently.
PostgREST’s performance is excellent for its use case. The Haskell runtime, however, means that the contributor pool is smaller, cross-compilation is harder, and Alpine Linux deployments are discouraged due to a known GHC memory leak.
Faucet
Faucet is written in Go with the Chi router, sqlx for database access, and Go’s native concurrency model (goroutines). Faucet gives you connection pooling, goroutine-based concurrency, NDJSON streaming for large result sets, and faucet benchmark to measure throughput against your own database.
Go’s compilation model produces truly static binaries that cross-compile to any OS/architecture trivially. This makes distribution simpler — Faucet is available via Homebrew, Docker Hub (faucetdb/faucet), GitHub releases, and curl-to-install.
PostgREST’s Unique Strengths
PostgREST is not without advantages. Fair comparison demands acknowledging where PostgREST excels:
- Mature and battle-tested. PostgREST has been in production at scale since 2014. Supabase routes millions of API requests through PostgREST daily. Faucet is a newer project.
- Rich query filtering. PostgREST’s URL-based query language supports operators like
eq,gt,lt,like,ilike,in,is,fts(full-text search), logical combinators (and,or,not), and range queries. This is one of the most expressive REST query syntaxes available. - Schema-based API versioning. PostgREST can expose different PostgreSQL schemas as different API versions, enabling non-breaking API evolution at the database level.
- Resource embedding. PostgREST’s foreign key-based embedding lets you retrieve nested, related data in a single request — effectively getting GraphQL-like joins over REST.
- Community and ecosystem. With Supabase’s backing, PostgREST has a large community, extensive documentation, and a proven track record.
- PostgreSQL-native authorization. For teams already fluent in PostgreSQL RLS, PostgREST’s auth model is genuinely powerful — per-row, per-column, per-user access control using the full expressiveness of SQL.
When to Choose PostgREST
PostgREST is the right choice when:
- Your organization runs PostgreSQL exclusively with no plans to support other databases
- Your team has strong PostgreSQL expertise and is comfortable writing RLS policies, functions, and grants
- You want a proven, mature tool with a decade of production usage
- You need advanced query filtering, resource embedding, or schema-based API versioning
- You are already using Supabase (which bundles PostgREST internally)
When to Choose Faucet
Faucet is the right choice when:
- You need to expose multiple database types (PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, and Snowflake) as REST APIs
- You want built-in RBAC without writing authorization logic in SQL
- You need a web admin UI for configuration, schema browsing, and API exploration
- You want OpenAPI 3.1 spec generation (not 2.0)
- You need MCP support for AI agent and LLM integration
- You want a single Go binary that is easy to build, deploy, and contribute to
- You prefer a simpler setup experience — connect a database, get an API, manage permissions in a UI
Getting Started with Faucet
Faucet takes one command to install and a few more to connect a database and mint a read-only key:
# 1. Install
brew install faucetdb/tap/faucet # or: npx @faucetdb/faucet serve
# 2. Connect a database
faucet db add --name mydb --driver postgres --dsn "postgres://user:pass@localhost:5432/mydb?sslmode=disable"
# 3. Create a read-only role and an API key
faucet role create --name reader --verbs GET
faucet key create --role reader
# 4. Start Faucet
faucet serve
# 5. Query it
curl -H "X-API-Key: faucet_YOUR_KEY" "http://localhost:8080/api/v1/mydb/_table/users?limit=10"
Prefer Docker? docker run -p 8080:8080 -v faucet-data:/data faucetdb/faucet, then open http://localhost:8080.
Faucet introspects your database schema, generates REST endpoints for every table, and serves an OpenAPI 3.1 spec — no code generation, no restart.
[VISUAL: Terminal recording (animated GIF) showing: brew install faucetdb/tap/faucet → faucet db add --name mydb --driver postgres --dsn "postgres://..." → faucet serve → curl request with JSON response. Demonstrate the zero-to-API experience in ~15 seconds.]
Frequently Asked Questions
Is PostgREST free and open source?
Yes. PostgREST is released under the MIT license and is completely free to use. Supabase is its primary sponsor but does not impose any licensing restrictions.
Can Faucet connect to the same databases PostgREST supports?
Yes. Faucet fully supports PostgreSQL, including cloud-hosted variants like Amazon RDS, Aurora, Supabase, and Neon. Faucet also supports MySQL, MariaDB, SQL Server, Oracle, SQLite, and Snowflake — databases that PostgREST cannot connect to.
Does PostgREST support AI agent integration (MCP)?
No. PostgREST does not include an MCP server or any built-in mechanism for AI/LLM integration. Faucet includes a native MCP server that allows AI agents to interact with your database through a standardized protocol.
Can I migrate from PostgREST to Faucet?
Yes. If you are currently using PostgREST with a PostgreSQL database, Faucet can connect to the same database and generate a REST API. The URL structure and query syntax differ, so API consumers will need to update their requests. Faucet’s built-in RBAC is per table and per verb, not per row, so keep your RLS policies at the database level if you rely on row-level rules.
Which tool has better performance?
Both tools are highly performant. PostgREST benefits from Haskell’s Warp server and PostgreSQL-native JSON serialization. Faucet uses Go’s Chi router and connection pooling, and faucet benchmark lets you measure it on your own data. For most workloads, the performance difference between the two is negligible compared to the database query time itself. Choose based on features and database support rather than raw throughput.