# Faucet: complete reference for LLMs > 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. Latest release v0.1.14 (released 2026-10-09; notes: https://github.com/faucetdb/faucet/releases/tag/v0.1.14). Website: https://faucetdb.ai/ . Docs: https://wiki.faucetdb.ai . Source: https://github.com/faucetdb/faucet . Short index: https://faucetdb.ai/llms.txt ## Who it's for - Solo developers and small teams who want an API for a database they already have, without writing a backend. - AI app builders who want Claude, ChatGPT, Cursor, Base44, Replit or a custom agent to read (and, if allowed, write) real data. - Anyone with a database on-prem, self-hosted or in the cloud. Faucet runs next to the database; only Faucet needs to be reachable. In short: one binary, one command, your database becomes a REST API (with OpenAPI 3.1) and an MCP server. Free and MIT-licensed, no account needed. ## Supported databases (7) | Database | Versions | `--driver` | DSN example | Hosting | |---|---|---|---|---| | PostgreSQL | 9.6 – 17 | `postgres` | `postgres://user:pass@localhost:5432/db?sslmode=disable` | Amazon RDS, Aurora, Supabase, Neon, Azure Database | | MySQL | 5.7 – 9.x | `mysql` | `user:pass@tcp(localhost:3306)/db?parseTime=true` | Amazon RDS, Aurora MySQL, PlanetScale, Azure MySQL | | MariaDB | 10.2 – 11.x | `mysql` | `user:pass@tcp(localhost:3306)/db?parseTime=true` | Self-hosted, Amazon RDS, SkySQL | | SQL Server | 2012 – 2022 | `mssql` | `sqlserver://user:pass@localhost:1433?database=db` | Azure SQL Database, Amazon RDS | | Oracle | 12c – 26ai | `oracle` | `oracle://user:pass@localhost:1521/XEPDB1` | Oracle Cloud (OCI), Amazon RDS, Azure | | SQLite | 3.35+ | `sqlite` | `/path/to/file.db` | Local file, Litestream, Fly.io | | Snowflake | Current (cloud service) | `snowflake` | `user:pass@account/db/schema?warehouse=wh` | AWS, Azure, GCP | Notes: - MariaDB is served by the MySQL driver (`--driver mysql`) and is a fully supported database. - SQL Server pagination uses OFFSET/FETCH, so SQL Server 2008 and 2008 R2 are not supported. - Oracle uses a pure-Go driver: no Oracle Instant Client required. - SQLite is embedded and pure Go (zero CGO); no separate server. - Snowflake also supports key-pair auth: `faucet db add ... --private-key-path /path/to/key.p8`. - One Faucet instance can serve many databases at once, each as its own named service. - URL-encode special characters in passwords inside DSNs (`@` becomes `%40`). Per-database guides: https://wiki.faucetdb.ai/database-connectors ## Install ```bash # npm (no global install needed) npx @faucetdb/faucet serve # Homebrew (macOS / Linux) brew install faucetdb/tap/faucet # Docker (data persisted in a named volume), then open http://localhost:8080 docker run -p 8080:8080 -v faucet-data:/data faucetdb/faucet # Go go install github.com/faucetdb/faucet/cmd/faucet@latest # Install script (Linux / macOS) curl -fsSL https://raw.githubusercontent.com/faucetdb/faucet/main/install.sh | sh ``` Prebuilt binaries for Linux, macOS and Windows: https://github.com/faucetdb/faucet/releases . Faucet is a single ~57 MB static binary (~16 MB download), written in Go with zero CGO. ## Quick start ```bash # 1. Install brew install faucetdb/tap/faucet # or: npx @faucetdb/faucet serve # 2. Create an admin (or use the setup wizard at http://localhost:8080 once Faucet is running) faucet admin create --email you@example.com --password ... # 3. Connect a database. Faucet builds and escapes the connection string from the fields # (--password-prompt keeps the password out of shell history). --dsn also works. faucet db add --name mydb --driver postgres --host localhost --user app --password-prompt --database mydb # 4. Create a read-only role and an API key faucet role create --name reader --verbs GET faucet key create --role reader # 5. Start Faucet (runs in the background by default; --foreground keeps it attached). # Databases are connected at startup, so run serve after db add (or restart it). faucet serve # 6. Query it curl -H "X-API-Key: faucet_YOUR_KEY" "http://localhost:8080/api/v1/mydb/_table/users?limit=10" ``` If you installed with npx, prefix each command with `npx @faucetdb/faucet` (for example `npx @faucetdb/faucet db add ...`). ## Admin UI The admin UI is built into the binary and served at http://localhost:8080/ (turn it off with `faucet serve --no-ui`). Guide with screenshots: https://wiki.faucetdb.ai/admin-ui - First-run setup: create an admin account, connect a database, then jump to tables, an API key or an AI agent. - Connect a database: pick one of the 7 types and fill in host, port (blank uses the standard port), database, username, password and SSL/TLS (SQL Server adds Trust server certificate; Oracle uses a service name; Snowflake takes account, warehouse and role, with a password or a key-pair file; SQLite takes a file path). Faucet builds and escapes the connection string, so special characters in passwords need no encoding. Or switch to "Connection string" and paste a DSN. - Test connection connects without saving and reports how many tables it found. Failures show the database error with a plain-language hint (connection refused, unknown host, timeout, wrong credentials, missing database or Oracle service name, TLS mismatch, unreadable SQLite file). "Save anyway" stores a database that isn't reachable yet. - The same check is available to scripts as `POST /api/v1/system/connection/test` (admin auth; body takes `driver` plus `connection` or `dsn`; saves nothing). - Schema browser with column types, keys, foreign-key links and a data preview; schema lock with drift detection. - API explorer: build and send REST requests, send as your admin session or as an API key, and copy the request as curl, JavaScript or Python. - Roles with one-click "Read-only on everything" and "Full access" presets; API keys with expiry, shown once with ready-to-run snippets. - AI agents page: the MCP endpoint and copy-ready configs for Claude Code, Cursor, VS Code, Windsurf, Claude Desktop (mcp-remote), same-machine stdio and ChatGPT. Other useful CLI commands: `faucet db list|test|schema`, `faucet role grant`, `faucet mcp`, `faucet openapi`, `faucet benchmark`, `faucet status`, `faucet stop`, `faucet version`. Full list: https://wiki.faucetdb.ai/cli-reference ## REST API cheat sheet Routes (each database is a "service", e.g. `mydb`): ``` GET|POST|PUT|PATCH|DELETE /api/v1/{service}/_table/{table} # read, insert, replace, update, delete records GET|POST|... /api/v1/{service}/_schema # list schemas; create, alter, drop tables (DDL) GET /api/v1/{service}/_proc # list stored procedures POST /api/v1/{service}/_proc/{proc} # call a stored procedure GET /api/v1/{service}/_doc # OpenAPI spec for one service GET /openapi.json # combined OpenAPI 3.1 spec (public) /mcp # MCP server (Streamable HTTP) ``` Authentication: every `/api/v1/{service}` request needs an `X-API-Key: faucet_...` header (or an admin `Authorization: Bearer `). Unauthenticated requests return 401; requests the role does not allow return 403. Query parameters: | Parameter | Example | Meaning | |---|---|---| | `filter` | `status = 'active'` | DreamFactory-compatible filter expression, always parameterized | | `order` | `created_at DESC, name ASC` | Sort order | | `limit` | `25` | Max records | | `offset` | `50` | Skip N records | | `fields` | `id,name,email` | Return only these columns | | `ids` | `1,2,3` | Filter by primary key values | | `include_count` | `true` | Add the total record count to the response metadata | Filter examples: ``` filter=status = 'active' filter=age > 21 AND status = 'active' filter=name LIKE 'J%' OR name LIKE 'K%' filter=status IN ('active', 'pending', 'trial') filter=created_at BETWEEN '2025-01-01' AND '2025-12-31' filter=email IS NOT NULL filter=name CONTAINS 'smith' ``` URL-encode filters in curl, e.g. `?filter=status%20%3D%20'active'`. Full grammar: https://wiki.faucetdb.ai/filter-syntax Responses wrap records in a `resource` array: `{"resource": [ ... ], "meta": { ... }}`. Batch writes: send `{"resource": [ ... ]}` to POST/PUT/PATCH. Add `?rollback=true` for all-or-nothing (one transaction) or `?continue=true` to process each record independently and collect errors. Streaming: send `Accept: application/x-ndjson` on a GET to stream rows as newline-delimited JSON. Updates and deletes require a filter (or ids), so a request cannot wipe a whole table by accident. Full reference: https://wiki.faucetdb.ai/api-reference ## MCP server Faucet speaks the Model Context Protocol (https://modelcontextprotocol.io/specification). It exposes a fixed set of 8 tools (not generated per table), so the tool list stays small no matter how many tables you have. Transports: 1. Streamable HTTP at `http://localhost:8080/mcp` on the main server (recommended). Agents send an `X-API-Key` header and the key's role is enforced on every tool call. An admin Bearer JWT also works but skips roles, so give agents a key. 2. stdio with `faucet mcp`. The client launches the binary on the same machine. Runs with full admin rights and ignores roles, so use it only on your own machine. 3. Standalone HTTP with `faucet mcp --transport http --port 3001`. Also authenticated. Tools and the RBAC verb each one needs: | Tool | What it does | Verb | |---|---|---| | `faucet_list_services` | List connected databases the role can reach | (filtered by role) | | `faucet_list_tables` | List tables and views in a service, with column summaries | GET on `_table` | | `faucet_describe_table` | Columns, types, keys and foreign keys for one table | GET on `_schema` | | `faucet_query` | Read records with filter, fields, order, limit, offset | GET | | `faucet_insert` | Insert one or more records | POST | | `faucet_update` | Update records matching a required filter | PATCH | | `faucet_delete` | Delete records matching a required filter | DELETE | | `faucet_raw_sql` | Run raw SQL | Service must allow raw SQL, and the role must grant all five verbs on component `_sql` | Read tools carry the MCP annotation `readOnlyHint: true` and write tools `readOnlyHint: false`, so clients can ask before running writes. Resources: `faucet://services` (the services the key's role can reach) and `faucet://schema/{service}` (full schema of one service). Client setup (the admin UI's AI agents page generates each of these with your key filled in; replace `faucet_YOUR_KEY` with a key from `faucet key create`): Claude Code: ```bash claude mcp add --transport http faucet http://localhost:8080/mcp --header "X-API-Key: faucet_YOUR_KEY" ``` Add `--scope user` to use it in every project, or `--scope project` to share it through `.mcp.json`. Claude Desktop: its config only launches local commands, so use the `mcp-remote` bridge (needs Node.js). Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows), then restart Claude Desktop. For a Faucet server on another machine over plain `http://`, add `"--allow-http"` to the args. ```json {"mcpServers":{"faucet":{"command":"npx","args":["-y","mcp-remote","http://localhost:8080/mcp","--header","X-API-Key:faucet_YOUR_KEY"]}}} ``` Cursor (`~/.cursor/mcp.json` or `.cursor/mcp.json`): ```json {"mcpServers":{"faucet":{"url":"http://localhost:8080/mcp","headers":{"X-API-Key":"faucet_YOUR_KEY"}}}} ``` VS Code (`.vscode/mcp.json`, then GitHub Copilot Chat in agent mode): ```json {"servers":{"faucet":{"type":"http","url":"http://localhost:8080/mcp","headers":{"X-API-Key":"faucet_YOUR_KEY"}}}} ``` Windsurf (`~/.codeium/windsurf/mcp_config.json`, then refresh the MCP servers list in Cascade): ```json {"mcpServers":{"faucet":{"serverUrl":"http://localhost:8080/mcp","headers":{"X-API-Key":"faucet_YOUR_KEY"}}}} ``` OpenAI Responses API (pass in the `tools` array; Faucet must be reachable from the internet): ```json {"type":"mcp","server_label":"faucet","server_url":"https://your-host/mcp","headers":{"X-API-Key":"faucet_YOUR_KEY"},"require_approval":"never"} ``` Same machine (stdio; full admin rights, ignores roles). For Claude Code: `claude mcp add faucet -- faucet mcp`. ```json {"mcpServers":{"faucet":{"command":"faucet","args":["mcp"]}}} ``` Test the endpoint (a reply containing `serverInfo` means the URL and key work): ```bash curl -sS -X POST http://localhost:8080/mcp -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' -H 'X-API-Key: faucet_YOUR_KEY' -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}' ``` Docs: https://wiki.faucetdb.ai/mcp-server and https://wiki.faucetdb.ai/llm-guide ## Connecting AI tools and app builders - Claude Code: HTTP MCP at `/mcp` with an `X-API-Key` header (command above). - Claude Desktop: `mcp-remote` bridge to `/mcp` with an `X-API-Key` header (config above). `faucet mcp` over stdio also works on the same machine, with admin rights. - Cursor, VS Code (GitHub Copilot agent mode) and Windsurf: HTTP MCP at `/mcp` with an `X-API-Key` header; each uses its own JSON shape (configs above). - ChatGPT: create a Custom GPT, add an Action, import `https://your-host/openapi.json`, and set API-key auth with the header `X-API-Key`. Developers can use the OpenAI Responses API's MCP tool instead (config above). Use a read-only key. - Base44 and Replit: add `https://your-host/mcp` with an `X-API-Key` header as a custom MCP server, or call the REST API (or import `/openapi.json`) from the app you are building. - Custom apps and Lovable-style app builders: call the REST API; generate clients from the OpenAPI 3.1 spec at `/openapi.json`. Database on-prem? Run Faucet next to it and expose only Faucet over HTTPS (reverse proxy, Cloudflare Tunnel, ngrok). Give agents a read-only role. The database itself never needs a public port. Limitation: claude.ai web connectors and ChatGPT connectors require no-auth or OAuth. Faucet's `/mcp` uses API keys and does not offer OAuth today, so use Claude Code, Claude Desktop, Cursor, VS Code or Windsurf for MCP, and a Custom GPT Action or the Responses API for ChatGPT. "Works with" means it connects through MCP or REST/OpenAPI. Faucet is independent and not affiliated with or endorsed by these companies. ## Security model for agents Safe defaults, so you can hand an agent a key without losing sleep: - API keys are stored SHA-256 hashed and each key is bound to a role. - RBAC is per-service, per-table verb masks (GET, POST, PUT, PATCH, DELETE). It is fail-closed: a role with no matching rule is denied. - Services can be flagged `read_only`; they reject every non-GET request regardless of role. - `update` and `delete` require a filter. - Raw SQL runs only when the service allows raw SQL and is not read-only, and the key's role grants all five verbs on `_sql`. - MCP read tools are annotated `readOnlyHint: true` and write tools `readOnlyHint: false`. - Schema contract locking (`faucet db lock`, `faucet db diff`) detects schema drift so agents and apps don't silently break. - Every value in a filter is sent as a bound parameter; column names are validated, never interpolated. - Faucet sends anonymous usage telemetry by default (no DSNs, credentials or data). Opt out with `FAUCET_TELEMETRY=0`. Details: https://github.com/faucetdb/faucet/blob/main/TELEMETRY.md Example: a read-only role for one table. ```bash faucet role create --name agent --description "read-only for agents" faucet role grant --role agent --service mydb --component "_table/orders" --verbs GET faucet key create --role agent --label claude ``` Row-level filters are stored but not yet enforced; there are no column-level permissions, SSO, OAuth or audit log today. Docs: https://wiki.faucetdb.ai/rbac and https://wiki.faucetdb.ai/schema-locking ## Comparisons PostgREST: PostgreSQL only. A focused REST server for one PostgreSQL database, MIT-licensed. Choose Faucet if you need MySQL, MariaDB, SQL Server, Oracle, SQLite or Snowflake, a built-in MCP server, API keys, or an admin UI. Hasura: PostgreSQL-first; other databases via Hasura data connectors; GraphQL-first. The v2 engine is Apache 2.0. Choose Faucet if you want REST + MCP instead of GraphQL, in a single binary. Supabase: Postgres platform (database, auth, storage, realtime), Apache 2.0 for most components. Choose Faucet if you already have a database (any of the seven) and only need an API and MCP layer on top of it. DreamFactory: PHP/Laravel API platform. Faucet's filter syntax is DreamFactory-compatible, and Faucet ships as a single Go binary with a built-in MCP server. | Page | URL | |---|---| | All alternatives | https://faucetdb.ai/alternatives/ | | Faucet vs Hasura | https://faucetdb.ai/alternatives/faucet-vs-hasura/ | | Faucet vs PostgREST | https://faucetdb.ai/alternatives/faucet-vs-postgrest/ | | Faucet vs Supabase | https://faucetdb.ai/alternatives/faucet-vs-supabase/ | ## Comparisons and guides Full articles: see each URL (or its Markdown twin). ### 10 Best Database to REST API Tools in 2026 (Compared) URL: https://faucetdb.ai/blog/best-database-to-rest-api-tools/ (Markdown: https://faucetdb.ai/blog/best-database-to-rest-api-tools/index.md) Ten tools that auto-generate a REST API from an existing SQL database, compared on databases, OpenAPI, MCP for AI agents, access control, license and pricing model. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **Postgres only?** PostgREST is the free, MIT-licensed default; Supabase runs it for you inside a full backend platform. - **SQL Server or Azure?** Microsoft Data API builder is MIT-licensed, has no paid tier, and serves REST, GraphQL and MCP from one config file. **Oracle?** ORDS comes with your Oracle Database license. - **Several SQL engines, self-hosted, with AI agents in the picture?** Faucet serves REST, OpenAPI 3.1 and an MCP server for seven engines from one MIT binary. DreamFactory and CData API Server cover more sources in paid editions. - **Check the edition, not just the license:** Hasura's Snowflake, MySQL and Oracle support, NocoDB's record-level security and CData's rate limiting all sit in paid editions. Directus and NocoDB are source-available, not OSI open source. - **MCP is now common:** Data API builder, Faucet, DreamFactory, Directus, NocoDB and ORDS ship MCP servers tied to their own permissions. PostgREST has none built in. Tools covered (in list order): 1. PostgREST (https://github.com/PostgREST/postgrest): best for A free REST API on PostgreSQL that uses database roles and row-level security 2. Microsoft Data API builder (https://learn.microsoft.com/en-us/azure/data-api-builder/overview): best for SQL Server and Azure teams wanting REST, GraphQL and MCP from one config file 3. Supabase (https://supabase.com/docs/guides/api): best for A managed Postgres backend with an auto-generated API, auth and storage 4. Hasura (https://hasura.io/): best for GraphQL across many data sources, with REST endpoints on top 5. Faucet (https://faucetdb.ai/): best for Self-hosted REST, MCP and RBAC across seven SQL engines in one binary 6. DreamFactory (https://www.dreamfactory.com/): best for Enterprises needing many SQL, NoSQL and file connectors with commercial support 7. Directus (https://directus.com/): best for A data studio and admin app with REST and GraphQL APIs 8. Oracle REST Data Services (ORDS) (https://www.oracle.com/database/technologies/appdev/rest.html): best for Oracle Database shops 9. NocoDB (https://nocodb.com/): best for A spreadsheet-style interface over Postgres or MySQL with APIs included 10. CData API Server (https://www.cdata.com/apiserver/): best for OData and REST across many databases from a commercial vendor FAQ: Q: Is it safe to expose a database through an auto-generated REST API? A: It can be, if access is enforced on the server, not the client. PostgREST and Supabase rely on Postgres roles and row-level security; Data API builder, Hasura, Directus, DreamFactory and Faucet enforce roles in the API layer. Use a least-privilege database user, put the API behind TLS, require auth on every endpoint, and check whether the OpenAPI spec is public. Q: Which database API generators are OSI open source? A: As of 2026-10-16: PostgREST, Microsoft Data API builder and Faucet (MIT), Supabase (Apache-2.0), Hasura's v2 Community Edition (Apache-2.0; Snowflake, MySQL and Oracle are Enterprise Edition features) and DreamFactory's core (Apache-2.0; SQL Server, Oracle and Snowflake are commercial). Directus (MSCL) and NocoDB (Sustainable Use License) are source-available. Oracle ORDS and CData API Server are proprietary. Q: Can I generate a REST API for SQL Server or Oracle for free? A: Yes. For SQL Server, Microsoft Data API builder and Faucet are both MIT-licensed and free. For Oracle, ORDS is included with any Oracle Database license at no additional cost, and Faucet connects to Oracle with a pure-Go driver. DreamFactory and CData API Server cover both engines in paid editions; NocoDB offers them as Enterprise add-ons. Q: Do API generators support AI agents via MCP? A: Many do now. Data API builder (v1.7+), Faucet, DreamFactory, Directus (v11.12+), NocoDB and ORDS (26.2+) ship MCP servers that go through their own permission systems. Supabase has a platform MCP server that runs SQL and manages projects. PostgREST has no built-in MCP server. See our [MCP servers for databases comparison](https://faucetdb.ai/blog/best-mcp-servers-for-databases/). Q: Is Supabase an API generator for an existing database? A: Not quite. Supabase generates a REST API with PostgREST, but for the Postgres database inside your Supabase project. To use it with an existing database you migrate the data into Supabase or self-host its Docker stack. If you only want an API over a database you already run, PostgREST, Faucet or Data API builder point at it directly. Q: Should an auto-generated API be REST or GraphQL? A: Choose REST when clients are scripts, other services, AI agents or tools that expect OpenAPI, because every HTTP client speaks it. Choose GraphQL when front ends need nested data from related tables in one request. Data API builder, Directus and Supabase serve both; Hasura is GraphQL-first with RESTified endpoints; PostgREST and Faucet are REST only. Sources: - PostgREST repository (README, MIT license, v16.4 release): https://github.com/PostgREST/postgrest (checked 2026-10-16) - PostgREST OpenAPI generator source (Data.Swagger): https://github.com/PostgREST/postgrest/blob/main/src/library/PostgREST/Response/OpenAPI.hs (checked 2026-10-16) - Microsoft Learn: What is Data API builder?: https://learn.microsoft.com/en-us/azure/data-api-builder/overview (checked 2026-10-16) - Microsoft Learn: Data API builder database policies: https://learn.microsoft.com/en-us/azure/data-api-builder/concept/security/database-policies (checked 2026-10-16) - Microsoft Learn: SQL MCP Server overview: https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - Data API builder repository (MIT, v2.1.5, supported databases incl. SQLDW): https://github.com/Azure/data-api-builder (checked 2026-10-16) - Supabase docs: REST API: https://supabase.com/docs/guides/api (checked 2026-10-16) - Supabase changelog: tables not exposed to the Data and GraphQL API automatically: https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically (checked 2026-10-16) - Supabase changelog: pg_graphql no longer enabled automatically: https://supabase.com/changelog/42180-breaking-change-pg-graphql-no-longer-enabled-automatically-within-approx-3-weeks-from-today (checked 2026-10-16) - Supabase docs: GraphQL (pg_graphql): https://supabase.com/docs/guides/graphql (checked 2026-10-16) - Supabase docs: Auth: https://supabase.com/docs/guides/auth (checked 2026-10-16) - Supabase docs: MCP server: https://supabase.com/docs/guides/ai-tools/mcp (checked 2026-10-16) - Supabase pricing: https://supabase.com/pricing (checked 2026-10-16) - Hasura graphql-engine repository (v2 Apache-2.0, v2.50.3): https://github.com/hasura/graphql-engine (checked 2026-10-16) - Hasura v2 docs: supported databases: https://hasura.io/docs/2.0/databases/overview/ (checked 2026-10-16) - Hasura v2 docs: Enterprise Edition features (Snowflake, Athena, MySQL, Oracle, MariaDB, MongoDB): https://hasura.io/docs/2.0/enterprise/overview/ (checked 2026-10-16) - Hasura v2 docs: authentication and authorization: https://hasura.io/docs/2.0/auth/overview/ (checked 2026-10-16) - Hasura v2 docs: RESTified endpoints: https://hasura.io/docs/2.0/restified/overview/ (checked 2026-10-16) - Hasura v2 docs: server flags (metadata database URL): https://hasura.io/docs/2.0/deployment/graphql-engine-flags/reference/ (checked 2026-10-16) - Hasura pricing (DDN): https://hasura.io/pricing (checked 2026-10-16) - Hasura pricing (v2 Cloud): https://hasura.io/pricing/v2 (checked 2026-10-16) - Hasura PromptQL MCP server repository: https://github.com/hasura/promptql-mcp (checked 2026-10-16) - DreamFactory pricing: https://www.dreamfactory.com/pricing (checked 2026-10-16) - DreamFactory repository (Apache-2.0, release 7.7.1, README connector table and FAQ, composer.json): https://github.com/dreamfactorysoftware/dreamfactory (checked 2026-10-16) - DreamFactory docs: querying and filtering (role-level filters): https://docs.dreamfactory.com/api-generation-and-connections/api-types/database/querying-and-filtering (checked 2026-10-16) - DreamFactory docs: MCP server: https://docs.dreamfactory.com/AI/mcp-server (checked 2026-10-16) - Directus v12 license change (BSL to MSCL): https://directus.com/resources/directus-v12-license-change (checked 2026-10-16) - Directus pricing: https://directus.com/pricing (checked 2026-10-16) - Directus docs: database configuration: https://directus.com/docs/configuration/database (checked 2026-10-16) - Directus API reference: server (GET /server/specs/oas): https://directus.com/docs/api/server (checked 2026-10-16) - Directus docs: access control: https://directus.com/docs/guides/auth/access-control (checked 2026-10-16) - Directus docs: Auth & SSO: https://directus.com/docs/configuration/auth-sso (checked 2026-10-16) - Directus docs: MCP: https://directus.com/docs/guides/ai/mcp (checked 2026-10-16) - Oracle ORDS changelog (26.2 MCP support, 26.3): https://www.oracle.com/tools/ords/ords-changelog.html (checked 2026-10-16) - Oracle ORDS 26.2 Installation and Configuration Guide: Configuring MCP (standalone only): https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/26.2/ordig/configuring-model-context-protocol-mcp.html (checked 2026-10-16) - Oracle ORDS FAQ (included with Oracle Database license): https://www.oracle.com/tools/technologies/faq-rest-data-services.html (checked 2026-10-16) - Oracle docs: About the AutoREST page (OpenAPI export): https://docs.oracle.com/en/database/oracle/sql-developer-web/25.2/sdweb/autorest-page.html (checked 2026-10-16) - Oracle docs: AutoREST limitations (Enabling REST objects): https://docs.oracle.com/en/database/oracle/application-express/19.1/aeutl/how-to-enable-REST-objects-from-object-browser.html (checked 2026-10-16) - NocoDB repository (Sustainable Use License): https://github.com/nocodb/nocodb (checked 2026-10-16) - NocoDB docs: connect to a data source: https://nocodb.com/docs/product/integrations/data-sources/connect-to-data-source (checked 2026-10-16) - NocoDB docs: accessing REST APIs (Swagger UI per base): https://nocodb.com/docs/apis-and-mcp/rest-apis/accessing-apis (checked 2026-10-16) - NocoDB docs: MCP server: https://nocodb.com/docs/apis-and-mcp/mcp (checked 2026-10-16) - NocoDB docs: record-level security (Scale plan and above): https://nocodb.com/docs/product/collaboration/record-level-security (checked 2026-10-16) - NocoDB docs: authentication and SSO: https://nocodb.com/docs/product/account-settings/authentication (checked 2026-10-16) - CData API Server product page: https://www.cdata.com/apiserver/ (checked 2026-10-16) - CData API Server pricing (editions): https://www.cdata.com/apiserver/pricing/ (checked 2026-10-16) - MySQL REST Service reference manual: https://dev.mysql.com/doc/dev/mysql-rest-service/latest/ (checked 2026-10-16) - Neon docs: Data API overview: https://neon.com/docs/data-api/overview (checked 2026-10-16) - SlashDB pricing (editions and databases): https://www.slashdb.com/pricing/ (checked 2026-10-16) - Faucet repository (MIT, v0.1.15): https://github.com/faucetdb/faucet (checked 2026-10-16) - Chinook sample database v1.4.5 (test fixture): https://github.com/lerocha/chinook-database/releases/tag/v1.4.5 (checked 2026-10-16) ### Best MCP Servers for Databases in 2026: 12 Compared URL: https://faucetdb.ai/blog/best-mcp-servers-for-databases/ (Markdown: https://faucetdb.ai/blog/best-mcp-servers-for-databases/index.md) Twelve database MCP servers compared on databases, auth, read-only enforcement, audit, maturity, hosting and pricing model, with hands-on results for MCP Toolbox, DBHub and Faucet on the same SQLite fixture. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **No single server wins.** Vendor servers go deepest on one platform; multi-database servers trade depth for one setup across engines. - **Check the read-only default.** DBHub and MCP Toolbox let every test write through until configured. Snowflake's SQL tool and ClickHouse's server start read-only. - **Remote auth varies.** Supabase, Neon, PlanetScale and Snowflake host OAuth servers. DBHub and Toolbox ship with auth off but can enable it. Faucet, the open-source database-to-REST-API and MCP server we make, requires an API key on every request. - **Tool definitions cost context:** from 207 tokens (Toolbox SQLite) to 1,400 (Faucet), counted with the o200k tokenizer. - **Skip the archived Anthropic Postgres and SQLite servers.** See [our Postgres MCP server comparison](https://faucetdb.ai/blog/postgres-mcp-servers/) for maintained options. Tools covered (in list order): 1. MCP Toolbox for Databases (https://github.com/googleapis/mcp-toolbox): best for Broadest open-source source coverage, especially on Google Cloud 2. DBHub (https://github.com/bytebase/dbhub): best for A lightweight local MCP server for several SQL engines 3. SQL MCP Server (Data API builder) (https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview): best for Microsoft SQL and Azure teams that want entity-level permissions and no raw SQL 4. Postgres MCP Pro (https://github.com/crystaldba/postgres-mcp): best for Postgres performance tuning and health checks 5. Supabase MCP (https://github.com/supabase-community/supabase-mcp): best for Building on Supabase projects 6. Neon MCP Server (https://github.com/neondatabase/mcp-server-neon): best for Branch-based schema changes on Neon during development 7. PlanetScale MCP (https://planetscale.com/docs/mcp-server): best for Query insights and replica reads on PlanetScale 8. Snowflake-managed MCP server (https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp): best for Snowflake accounts using Cortex, governed by Snowflake RBAC 9. Oracle SQLcl MCP Server (https://www.oracle.com/mcp/): best for Oracle developers working locally with a built-in audit table 10. Faucet (https://github.com/faucetdb/faucet): best for Self-hosting one REST API and MCP server with one role model across seven SQL engines 11. DreamFactory (https://docs.dreamfactory.com/AI/mcp-server): best for Enterprises that need OAuth for AI clients, many connectors and commercial support 12. CData Connect AI (https://www.cdata.com/ai/connect/): best for Hosted access to databases and SaaS sources from one remote MCP server FAQ: Q: What is a database MCP server? A: A database MCP server is a process that exposes a database to AI clients through the Model Context Protocol. It publishes tools such as list tables, describe table and run query, and clients like Claude Code, Cursor or VS Code call those tools instead of connecting to the database directly. The server decides what the agent can see and change, so its auth and read-only controls matter as much as its features. Q: Which MCP server supports the most databases? A: Among the servers in this comparison, CData Connect AI lists 350+ sources, including SaaS applications, as a hosted commercial service. Google's MCP Toolbox for Databases is the broadest open-source option, covering Google Cloud databases plus PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, Redis, Snowflake and more. DBHub and Faucet each cover six or seven SQL engines. Q: Are database MCP servers safe to use in production? A: Some vendors say not yet: Neon's README states it does not recommend its MCP server in production. For any server, use a database user with minimal privileges, turn on the server's read-only mode, require authentication on HTTP endpoints, and cap result sizes. Our [database MCP server security checklist](https://faucetdb.ai/blog/database-mcp-server-security-checklist/) covers each step. Q: How many tokens do MCP tool definitions use? A: In our harness, the full tools/list response cost 207 tokens for MCP Toolbox's SQLite prebuilt, 347 for DBHub, 404 for ExecuteAutomation's server and 1,400 for Faucet (OpenAI's o200k tokenizer; Claude's tokenizer gives different counts). None of them grew with table count. Servers with dozens of tools cost more; see [the MCP context window tax](https://faucetdb.ai/blog/2026-03-30-mcp-context-window-tax-lean-database-tooling/). Q: Can one MCP server connect to multiple databases? A: Yes. MCP Toolbox, DBHub, SQL MCP Server (Data API builder), Faucet, DreamFactory and CData Connect AI can all expose several databases through one server. They differ in how access is scoped: per tool, per entity, per role or per user. Our [open-source multi-database MCP server comparison](https://faucetdb.ai/blog/open-source-multi-database-mcp-servers/) goes deeper on the self-hosted ones. Q: Which database MCP servers work with Claude Code, Cursor and ChatGPT? A: Servers using stdio, SSE or Streamable HTTP work with Claude Code, Cursor and VS Code. ChatGPT connectors sign in with OAuth, so hosted OAuth servers such as Supabase, Neon and PlanetScale fit there. Faucet authenticates with API keys; use it from ChatGPT through a Custom GPT Action that imports its OpenAPI document, or from the OpenAI Responses API's MCP tool with an API-key header. Both need HTTPS, so put Faucet behind a TLS reverse proxy. See [connect ChatGPT to your database](https://faucetdb.ai/connect-chatgpt-to-database/). Sources: - googleapis/mcp-toolbox README: https://github.com/googleapis/mcp-toolbox (checked 2026-10-16) - MCP Toolbox documentation: https://mcp-toolbox.dev/ (checked 2026-10-16) - MCP Toolbox docs: Toolbox with MCP Authorization: https://mcp-toolbox.dev/documentation/configuration/toolbox_mcp_auth/ (checked 2026-10-16) - Google Cloud: supported products for remote MCP servers: https://docs.cloud.google.com/mcp/supported-products (checked 2026-10-16) - bytebase/dbhub README: https://github.com/bytebase/dbhub (checked 2026-10-16) - DBHub docs: TOML configuration: https://dbhub.ai/config/toml (checked 2026-10-16) - DBHub docs: command-line options: https://dbhub.ai/config/command-line (checked 2026-10-16) - Microsoft Learn: SQL MCP Server overview: https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - Microsoft Learn: What is Data API builder?: https://learn.microsoft.com/en-us/azure/data-api-builder/overview (checked 2026-10-16) - crystaldba/postgres-mcp README: https://github.com/crystaldba/postgres-mcp (checked 2026-10-16) - Supabase MCP README: https://github.com/supabase-community/supabase-mcp (checked 2026-10-16) - neondatabase/mcp-server-neon README: https://github.com/neondatabase/mcp-server-neon (checked 2026-10-16) - PlanetScale MCP server docs: https://planetscale.com/docs/mcp-server (checked 2026-10-16) - Snowflake-managed MCP server docs: https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp (checked 2026-10-16) - Snowflake release note: managed MCP server GA (Nov 4, 2025): https://docs.snowflake.com/release-notes/2025/other/2025-11-04-cortex-agents-mcp (checked 2026-10-16) - Oracle MCP Servers: https://www.oracle.com/mcp/ (checked 2026-10-16) - Oracle SQLcl changelog: https://www.oracle.com/tools/sqlcl/sqlcl-changelog.html (checked 2026-10-16) - Oracle docs (SQLcl 26.3): configuring restrict levels for the SQLcl MCP Server: https://docs.oracle.com/en/database/oracle/sql-developer-command-line/26.3/sqcug/configuring-restrict-levels-sqlcl-mcp-server.html (checked 2026-10-16) - Oracle docs (SQLcl 26.3): monitoring the SQLcl MCP Server: https://docs.oracle.com/en/database/oracle/sql-developer-command-line/26.3/sqcug/monitoring-sqlcl-mcp-server.html (checked 2026-10-16) - DreamFactory MCP server docs: https://docs.dreamfactory.com/AI/mcp-server (checked 2026-10-16) - DreamFactory GitHub repository: https://github.com/dreamfactorysoftware/dreamfactory (checked 2026-10-16) - DreamFactory pricing: https://www.dreamfactory.com/pricing (checked 2026-10-16) - CData Connect AI in the Claude connector directory: https://claude.com/connectors/cdata-connect-ai (checked 2026-10-16) - CData Connect AI product page: https://www.cdata.com/ai/connect/ (checked 2026-10-16) - executeautomation/mcp-database-server README: https://github.com/executeautomation/mcp-database-server (checked 2026-10-16) - mongodb-js/mongodb-mcp-server README: https://github.com/mongodb-js/mongodb-mcp-server (checked 2026-10-16) - awslabs/mcp README: https://github.com/awslabs/mcp (checked 2026-10-16) - AWS Security Bulletin 2026-104 (CVE-2026-87911): https://aws.amazon.com/security/security-bulletins/2026-104-aws/ (checked 2026-10-16) - ClickHouse/mcp-clickhouse README: https://github.com/ClickHouse/mcp-clickhouse (checked 2026-10-16) - modelcontextprotocol/servers-archived: https://github.com/modelcontextprotocol/servers-archived (checked 2026-10-16) - Faucet source code (v0.1.15-4-g2327d63): https://github.com/faucetdb/faucet (checked 2026-10-16) ### MCP Server Security Checklist for Databases: 14 Controls URL: https://faucetdb.ai/blog/database-mcp-server-security-checklist/ (Markdown: https://faucetdb.ai/blog/database-mcp-server-security-checklist/index.md) 14 security controls a database MCP server needs before an AI agent touches production data, scored on four servers we tested, ours included. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **Test what the server does, not what it says.** We checked every write by reading the SQLite file back over a separate read-only connection. Annotations and tool names don't prove anything. - **Defaults differ a lot.** With out-of-the-box settings, write attempts landed on DBHub, MCP Toolbox and ExecuteAutomation. Only Faucet rejected an unauthenticated MCP request (401). DBHub and MCP Toolbox answered with 200. - **Read-only can be enforced, but differently on each server.** Faucet blocked 0/9 writes with a GET-only role, DBHub 0/4 with `readonly = true`, and Toolbox 0/4 only through a SQLite `mode=ro` URI. ExecuteAutomation has no read-only mode. - **Row caps are rare by default.** Faucet returned 25 rows (1,000 max) for `SELECT * FROM InvoiceLine`; DBHub, MCP Toolbox and ExecuteAutomation returned all 2,240. - **Put a least-privilege database account under every server.** Server-side read-only checks have been bypassed before: DBHub fixed two read-only bypasses in June 2026, and AWS fixed one in its Postgres MCP server in September 2026. Tools covered (in list order): 1. DBHub (https://github.com/bytebase/dbhub): best for Read-only enforced with one TOML setting (tested); auth and Host allowlist must be configured for HTTP 2. ExecuteAutomation database-server (https://github.com/executeautomation/mcp-database-server): best for No network surface (stdio only), but no read-only mode (tested) 3. Faucet (https://faucetdb.ai/): best for Role-scoped API keys enforced on REST and HTTP MCP (tested) 4. Google MCP Toolbox for Databases (https://github.com/googleapis/mcp-toolbox): best for Safest network default we tested (127.0.0.1); OIDC MCP auth documented, not tested FAQ: Q: Is the MCP readOnlyHint annotation a security control? A: No. The MCP specification says clients must treat tool annotations as untrusted unless they come from trusted servers. Annotations help a client decide when to ask a human for confirmation. They do not stop a write. Enforcement belongs in the server (roles, read-only mode) and the database (a user without write privileges). More in [MCP tool annotations and database safety](https://faucetdb.ai/blog/2026-03-28-mcp-tool-annotations-database-safety/). Q: Can an AI agent bypass a read-only database MCP server? A: Yes, it has happened several times. DBHub fixed two read-only bypasses in 0.22.6 (CVE-2026-61788 and CVE-2026-61789), AWS fixed a COPY TO PROGRAM bypass in postgres-mcp-server 1.1.7 (CVE-2026-87911), and the archived reference Postgres server fell to stacked COMMIT statements. A database account that cannot write is the reliable defense. See [Read-only that wasn't](https://faucetdb.ai/blog/2026-04-30-postgres-mcp-sql-injection-read-only-bypass/). Q: Should a database MCP server allow raw SQL? A: Only when you need it, and not by default for production data. Raw SQL makes every statement the database accepts reachable by the agent, so read-only enforcement depends on parsing. Typed tools such as query, insert and update with a required filter are easier to restrict per table. If you enable raw SQL, pair it with a read-only database user, row limits and a timeout. Q: Do I still need a read-only database user if my MCP server has a read-only mode? A: Yes. The server's read-only mode is a second layer that can have bugs; the database's own privilege check applies to whatever SQL reaches it, including statements a parser misreads. In our runs, a SQLite mode=ro connection blocked every write regardless of which server sent it. Per-engine setup is in [how to give an AI agent read-only database access](https://faucetdb.ai/blog/give-ai-agent-read-only-database-access/). Q: Which database MCP servers support OAuth? A: Of the four we scored, only MCP Toolbox documents MCP authorization, using a generic OIDC provider; we did not test it. DBHub supports static bearer tokens, Faucet uses role-scoped API keys, and ExecuteAutomation runs over stdio only. Supabase's hosted MCP server uses OAuth 2.1. Q: How do I audit what an AI agent did in my database? A: Combine two sources. Turn on database-side auditing or statement logging for the account the MCP server uses, and keep the server's own logs with a request ID. Give each agent its own credential so the two can be matched. Toolbox exports OpenTelemetry traces. Sources: - MCP specification 2026-07-28: Tools (annotations, security considerations): https://modelcontextprotocol.io/specification/2026-07-28/server/tools (checked 2026-10-16) - MCP specification 2026-07-28: Authorization: https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization (checked 2026-10-16) - MCP specification 2026-07-28: Streamable HTTP (security and endpoint): https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http (checked 2026-10-16) - DBHub repository and README (bytebase/dbhub): https://github.com/bytebase/dbhub (checked 2026-10-16) - DBHub docs: command-line options (--auth-token, --host, --allowed-hosts): https://dbhub.ai/config/command-line (checked 2026-10-16) - DBHub docs: TOML configuration (readonly, max_rows, query_timeout): https://dbhub.ai/config/toml (checked 2026-10-16) - GHSA-fm8p-53ww-hf6w / CVE-2026-61742: DBHub HTTP transport DNS rebinding (fixed in 0.22.5): https://github.com/bytebase/dbhub/security/advisories/GHSA-fm8p-53ww-hf6w (checked 2026-10-16) - GHSA-mwwr-p57h-56pf / CVE-2026-61788: DBHub read-only mode does not prevent writes (fixed in 0.22.6): https://github.com/bytebase/dbhub/security/advisories/GHSA-mwwr-p57h-56pf (checked 2026-10-16) - GHSA-j656-3hf2-fvjc / CVE-2026-61789: DBHub read-only bypass on MySQL and MariaDB (fixed in 0.22.6): https://github.com/bytebase/dbhub/security/advisories/GHSA-j656-3hf2-fvjc (checked 2026-10-16) - MCP Toolbox for Databases repository and README (googleapis/mcp-toolbox): https://github.com/googleapis/mcp-toolbox (checked 2026-10-16) - MCP Toolbox docs: authentication (MCP authorization, authorized invocations, authenticated parameters): https://mcp-toolbox.dev/documentation/configuration/authentication/ (checked 2026-10-16) - MCP Toolbox docs: read-only tools (readOnly sources and *_READONLY variables): https://github.com/googleapis/mcp-toolbox/blob/main/docs/en/documentation/configuration/security/read-only.md (checked 2026-10-16) - ExecuteAutomation mcp-database-server README: https://github.com/executeautomation/mcp-database-server (checked 2026-10-16) - @executeautomation/database-server on npm (latest release 1.1.0, 2025-05-30): https://www.npmjs.com/package/@executeautomation/database-server (checked 2026-10-16) - Microsoft Learn: SQL MCP Server overview (Data API builder): https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - Supabase MCP server README: https://github.com/supabase-community/supabase-mcp (checked 2026-10-16) - Postgres MCP Pro README (crystaldba/postgres-mcp): https://github.com/crystaldba/postgres-mcp (checked 2026-10-16) - AWS Security Bulletin 2026-104: CVE-2026-87911 in awslabs.postgres-mcp-server (fixed in 1.1.7): https://aws.amazon.com/security/security-bulletins/2026-104-aws/ (checked 2026-10-16) - Datadog Security Labs: SQL injection in the reference PostgreSQL MCP server: https://securitylabs.datadoghq.com/articles/mcp-vulnerability-case-study-SQL-injection-in-the-postgresql-mcp-server/ (checked 2026-10-16) - PostgreSQL docs: row security policies: https://www.postgresql.org/docs/current/ddl-rowsecurity.html (checked 2026-10-16) - Faucet source code (faucetdb/faucet): https://github.com/faucetdb/faucet (checked 2026-10-16) - Faucet docs: MCP server: https://wiki.faucetdb.ai/mcp-server (checked 2026-10-16) ### How to Give an AI Agent Read-Only Database Access (Postgres, MySQL, SQL Server, Oracle, Snowflake, SQLite) URL: https://faucetdb.ai/blog/give-ai-agent-read-only-database-access/ (Markdown: https://faucetdb.ai/blog/give-ai-agent-read-only-database-access/index.md) Step-by-step SQL to create a read-only database user for an AI agent on PostgreSQL, MySQL/MariaDB, SQL Server, Oracle, Snowflake and SQLite, how to add read-only enforcement in the MCP or REST layer, and how to prove it by attempting a write. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **Start in the database.** A dedicated login with SELECT-only grants is the control that holds no matter which MCP server, REST layer or client the agent uses. Session settings such as Postgres `default_transaction_read_only` or SQLite `PRAGMA query_only` are defaults the session can switch off, not controls. - **Add read-only enforcement in the MCP or REST layer too.** It refuses writes before they reach the database, gives each agent its own key, and covers SQLite, which has no users. In our SQLite harness, Faucet (GET-only key or `read_only` flag), DBHub (`readonly = true`) and Datasette let 0 writes land, MCP Toolbox relied on a `mode=ro` URI, and the ExecuteAutomation server has no read-only mode. - **Watch for writes that don't look like writes:** stacked `COMMIT;` statements, `COPY ... TO PROGRAM`, `SECURITY DEFINER` functions and stored procedures that run as their owner. A SELECT-only user with no EXECUTE or file privileges blocks all of these. - **Prove it.** Attempt an INSERT, UPDATE, DELETE and a CTE-prefixed DELETE as the agent, then check the data over a separate connection instead of trusting the reply. - **Tool annotations are hints.** The MCP spec says clients must treat `readOnlyHint` and `destructiveHint` as untrusted unless the server is trusted, so use them for approval prompts, not as the security boundary. See the [database MCP server security checklist](https://faucetdb.ai/blog/database-mcp-server-security-checklist/). FAQ: Q: Is a read-only database user enough for an AI agent? A: It is the most important layer, because the database enforces it whatever tool the agent uses. It does not cap rows, time out slow queries, hide write tools from the model, or give each agent its own revocable key. Add read-only enforcement in the MCP or REST server, set statement timeouts, and keep EXECUTE, file and superuser-style privileges off the account. Q: Can a read-only Postgres transaction be bypassed? A: Yes. A read-only transaction or default_transaction_read_only is a session setting, so a stacked COMMIT; or SET TRANSACTION READ WRITE can get past it when a tool sends raw SQL, while a role with only SELECT grants cannot write in any transaction mode. Our analysis of the [Postgres MCP read-only bypass](https://faucetdb.ai/blog/2026-04-30-postgres-mcp-sql-injection-read-only-bypass/) has the details. Q: How do I make a SQL Server login read-only? A: Create a login, map a database user to it with CREATE USER ... FOR LOGIN, then grant SELECT on the schemas the agent needs (GRANT SELECT ON SCHEMA::reporting) or add it to db_datareader. Adding it to db_denydatawriter denies INSERT, UPDATE and DELETE on the whole database. Don't grant EXECUTE unless you have reviewed the procedure. Q: Does SQLite support read-only users? A: No. SQLite has no users or grants, so read-only is a property of how the file is opened. Open it with a file:...?mode=ro URI or give the process read-only file permissions. PRAGMA query_only also blocks writes, but the same connection can turn it off, so it is a guard rather than a control. Put any network API in front of it behind read-only keys. Q: Does Oracle have a read-only user? A: Yes, since Oracle Database 23ai, and in Oracle AI Database 26ai, which replaced it. CREATE USER or ALTER USER with the READ ONLY clause makes a local PDB user's session behave as if the database were open read-only, and write attempts fail with ORA-28194. On 19c, create a user with CREATE SESSION and grant READ on specific tables, which also blocks SELECT ... FOR UPDATE row locks. Q: Should I point the AI agent at a read replica instead? A: A replica protects the primary's performance, but it does not replace a read-only login. The agent can still read every table its login can read, and a promoted replica, or a MySQL replica without read_only set, accepts writes. Use a replica for heavy analytical agents, connect with the same SELECT-only user, and keep statement timeouts on. Sources: - PostgreSQL 18 docs: predefined roles (pg_read_all_data, pg_execute_server_program): https://www.postgresql.org/docs/current/predefined-roles.html (checked 2026-10-16) - PostgreSQL 18 docs: ALTER DEFAULT PRIVILEGES: https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html (checked 2026-10-16) - PostgreSQL 18 docs: client connection defaults (default_transaction_read_only): https://www.postgresql.org/docs/current/runtime-config-client.html (checked 2026-10-16) - PostgreSQL 18 docs: privileges granted to PUBLIC by default: https://www.postgresql.org/docs/current/ddl-priv.html (checked 2026-10-16) - PostgreSQL 18 docs: schemas and privileges (public schema CREATE, PostgreSQL 15 change): https://www.postgresql.org/docs/current/ddl-schemas.html (checked 2026-10-16) - PostgreSQL 18 docs: CREATE FUNCTION (SECURITY DEFINER): https://www.postgresql.org/docs/current/sql-createfunction.html (checked 2026-10-16) - MySQL 8.4 Reference Manual: GRANT: https://dev.mysql.com/doc/refman/8.4/en/grant.html (checked 2026-10-16) - MySQL 8.4 Reference Manual: CREATE USER (resource limits): https://dev.mysql.com/doc/refman/8.4/en/create-user.html (checked 2026-10-16) - MySQL 8.4 Reference Manual: privileges provided (FILE, EXECUTE): https://dev.mysql.com/doc/refman/8.4/en/privileges-provided.html (checked 2026-10-16) - MariaDB docs: GRANT: https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/grant (checked 2026-10-16) - Microsoft Learn: database-level roles (db_datareader, db_denydatawriter): https://learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles (checked 2026-10-16) - Microsoft Learn: CREATE USER (Transact-SQL): https://learn.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql (checked 2026-10-16) - Oracle AI Database 26ai SQL Language Reference: CREATE USER (READ ONLY clause): https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/CREATE-USER.html (checked 2026-10-16) - Oracle AI Database 26ai SQL Language Reference: GRANT (READ vs SELECT, CREATE SESSION, schema privileges): https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/GRANT.html (checked 2026-10-16) - Oracle: Oracle AI Database 26ai announcement (successor to 23ai): https://blogs.oracle.com/database/oracle-announces-oracle-ai-database-26ai (checked 2026-10-16) - Oracle-Base: read-only PDB users in 23ai (syntax and ORA-28194): https://oracle-base.com/articles/23/read-only-pdb-users-23 (checked 2026-10-16) - Snowflake docs: GRANT (ALL and FUTURE grants): https://docs.snowflake.com/en/sql-reference/sql/grant-privilege (checked 2026-10-16) - Snowflake docs: CREATE USER (TYPE = SERVICE, RSA_PUBLIC_KEY): https://docs.snowflake.com/en/sql-reference/sql/create-user (checked 2026-10-16) - Snowflake docs: parameters (STATEMENT_TIMEOUT_IN_SECONDS): https://docs.snowflake.com/en/sql-reference/parameters (checked 2026-10-16) - SQLite docs: URI filenames (mode=ro, immutable): https://www.sqlite.org/uri.html (checked 2026-10-16) - SQLite docs: PRAGMA query_only: https://www.sqlite.org/pragma.html (checked 2026-10-16) - MCP specification 2025-11-25: tools (annotations are untrusted): https://modelcontextprotocol.io/specification/2025-11-25/server/tools (checked 2026-10-16) - Datadog Security Labs: SQL injection in the PostgreSQL MCP server (COMMIT bypass): https://securitylabs.datadoghq.com/articles/mcp-vulnerability-case-study-SQL-injection-in-the-postgresql-mcp-server/ (checked 2026-10-16) - AWS security bulletin 2026-104-AWS: awslabs postgres-mcp-server before 1.1.7 (CVE-2026-87911): https://aws.amazon.com/security/security-bulletins/2026-104-aws/ (checked 2026-10-16) - NVD: CVE-2026-87911: https://nvd.nist.gov/vuln/detail/CVE-2026-87911 (checked 2026-10-16) - OSV: CVE-2026-61788, DBHub read-only mode does not prevent writes (fixed in 0.22.6): https://osv.dev/vulnerability/CVE-2026-61788 (checked 2026-10-16) - DBHub docs: execute_sql (readonly, engine-level enforcement per database, read-only database user advice): https://dbhub.ai/tools/execute-sql (checked 2026-10-16) - GitHub: bytebase/dbhub (MIT, release v1.5.0): https://github.com/bytebase/dbhub (checked 2026-10-16) - MCP Toolbox docs: read-only tools: https://mcp-toolbox.dev/documentation/configuration/security/read-only/ (checked 2026-10-16) - GitHub: googleapis/mcp-toolbox (Apache-2.0, release v1.14.0): https://github.com/googleapis/mcp-toolbox (checked 2026-10-16) - GitHub: executeautomation/mcp-database-server (MIT; read_query, write_query, create/alter/drop_table tools): https://github.com/executeautomation/mcp-database-server (checked 2026-10-16) - npm: @executeautomation/database-server (latest 1.1.0, published 2025-05-30): https://www.npmjs.com/package/@executeautomation/database-server (checked 2026-10-16) - Datasette docs: running SQL queries (read-only, writable canned queries): https://docs.datasette.io/en/stable/sql_queries.html (checked 2026-10-16) - GitHub: b4fun/sqlite-rest (v0.4.1): https://github.com/b4fun/sqlite-rest (checked 2026-10-16) - GitHub: crystaldba/postgres-mcp (Postgres MCP Pro, MIT; restricted access mode): https://github.com/crystaldba/postgres-mcp (checked 2026-10-16) - GitHub: supabase-community/supabase-mcp (Apache-2.0; read_only option): https://github.com/supabase-community/supabase-mcp (checked 2026-10-16) - Microsoft Learn: SQL MCP Server (Data API builder) overview, RBAC on MCP tools: https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - GitHub: faucetdb/faucet (MIT): https://github.com/faucetdb/faucet (checked 2026-10-16) - Faucet docs: read-only and raw SQL modes: https://wiki.faucetdb.ai/database-connectors#read-only-and-raw-sql-modes (checked 2026-10-16) ### Open-Source MCP Servers for Multiple Databases: 6 Compared URL: https://faucetdb.ai/blog/open-source-multi-database-mcp-servers/ (Markdown: https://faucetdb.ai/blog/open-source-multi-database-mcp-servers/index.md) Six open-source MCP servers for several databases, four of them run on the same SQLite file: writes, read-only, auth, tool tokens and cold start. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **With default settings, DBHub, MCP Toolbox and ExecuteAutomation all let writes through on their write paths.** DBHub and Toolbox ran 4 of 4 write statements, including a CTE-prefixed `DELETE`; each one's read-only setup then blocked all of them. - **Of the three HTTP servers we ran, only Faucet rejected an MCP request with no credentials (401).** DBHub answered 200 and listened on `0.0.0.0`; Toolbox answered 200 but binds to `127.0.0.1` by default. FreePeak (not tested) documents that its HTTP mode won't start without an API key. - **Adding a second database grows some tool lists and not others.** DBHub went from 2 tools to 4 (347 to 726 tokens); Faucet stayed at 8 tools. Table count changed nothing for any server at 5, 11 or 50 tables. - **MCP Toolbox had the smallest default tool list** (207 tokens, o200k). **Faucet's was the largest by size** (8 tools, 1,400 tokens): structured CRUD and schema tools rather than a single `execute_sql`. - **Row caps differ by default:** Faucet returned 25 rows (1,000 max) for `SELECT * FROM InvoiceLine`; DBHub, Toolbox and ExecuteAutomation returned all 2,240. - **ExecuteAutomation's** last npm release is 1.1.0 from May 2025, and the advisory for CVE-2025-59333 lists versions through 1.1.0 as affected. It isn't a good pick for new setups. Tools covered (in list order): 1. Google MCP Toolbox for Databases (https://github.com/googleapis/mcp-toolbox): best for The widest database coverage, including NoSQL and Google Cloud 2. DBHub (https://github.com/bytebase/dbhub): best for A lightweight local server for coding agents across SQL engines 3. SQL MCP Server (Data API builder) (https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview): best for Governed CRUD without raw SQL, especially with Entra ID 4. Faucet (https://faucetdb.ai/): best for Shared HTTP access with per-key roles, plus a REST API 5. FreePeak db-mcp-server (https://github.com/FreePeak/db-mcp-server): best for Per-database tools with engine-level read-only 6. ExecuteAutomation database-server (https://github.com/executeautomation/mcp-database-server): best for Existing local stdio setups only FAQ: Q: What is Google MCP Toolbox for Databases? A: MCP Toolbox for Databases is Google's open-source (Apache-2.0) MCP server for databases. It runs as a single binary or through npx. Prebuilt configs such as --prebuilt=postgres or --prebuilt=sqlite give agents ready-made tools, and tools.yaml lets you define fixed, parameterized SQL tools. Its sources include PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake, MongoDB, Redis and Google Cloud databases. Q: Is MCP Toolbox the same as genai-toolbox? A: Yes. Google renamed the GitHub repository from googleapis/genai-toolbox to googleapis/mcp-toolbox, and the README says so. Docs now live at mcp-toolbox.dev and the npm launcher is @toolbox-sdk/server. Older tutorials and configs that mention genai-toolbox describe the same project, so check that the version they use is still current (1.14.0 on 2026-10-16). Q: DBHub vs MCP Toolbox: which is better? A: It depends on the job. DBHub is lighter to configure for local coding agents: two default tools, per-tool read-only in dbhub.toml, and six SQL engines. MCP Toolbox covers far more sources, including NoSQL and Google Cloud, starts faster in our test (0.114 s against 1.512 s), and supports opt-in OAuth 2.1 on its MCP endpoint. Both allowed writes with default settings. Q: Which open-source MCP server supports the most databases? A: Of the servers in this comparison, Google MCP Toolbox lists the most sources: relational databases, NoSQL stores such as MongoDB, Redis and Elasticsearch, and Google Cloud services such as BigQuery and Spanner. Faucet covers seven SQL engines (MariaDB through its MySQL driver), DBHub six, Microsoft's SQL MCP Server five including Cosmos DB, and FreePeak and ExecuteAutomation four each. Q: Can one open-source MCP server connect to Postgres and MySQL at the same time? A: Yes. DBHub takes several [[sources]] in dbhub.toml, Toolbox takes several sources in tools.yaml, Faucet adds one service per database, FreePeak connects several databases concurrently, and Data API builder supports multiple data sources. ExecuteAutomation takes one database per process. We tested two databases at once with SQLite files only; mixed engines are documented by each project but weren't part of our run. Q: Does DBHub support authentication? A: Only as an option. DBHub's docs say auth is off unless you pass --auth-token, which checks a shared static bearer token on the HTTP transport and is described as "not OAuth." In our test, an unauthenticated tools/list call to DBHub 1.5.0 returned 200, and the server listened on 0.0.0.0. Use --host 127.0.0.1 or a proxy. Q: Which database MCP server uses the fewest tokens? A: Counting the tools/list JSON with the o200k tokenizer, MCP Toolbox's prebuilt SQLite config was smallest at 207 tokens, then DBHub at 347, ExecuteAutomation at 404 and Faucet at 1,400. Claude's tokenizer gives different counts. Why it matters for agents: [the MCP context-window tax](https://faucetdb.ai/blog/2026-03-30-mcp-context-window-tax-lean-database-tooling/). Sources: - Chinook database v1.4.5 release (test fixture): https://github.com/lerocha/chinook-database/releases/tag/v1.4.5 (checked 2026-10-16) - Google MCP Toolbox for Databases repository: https://github.com/googleapis/mcp-toolbox (checked 2026-10-16) - MCP Toolbox releases: https://github.com/googleapis/mcp-toolbox/releases (checked 2026-10-16) - MCP Toolbox docs: Read-only mode: https://mcp-toolbox.dev/documentation/configuration/security/read-only/ (checked 2026-10-16) - MCP Toolbox docs: Toolbox with MCP Authorization: https://mcp-toolbox.dev/documentation/configuration/toolbox_mcp_auth/ (checked 2026-10-16) - Google Cloud blog: managed MCP servers for Google Cloud databases: https://cloud.google.com/blog/products/databases/managed-mcp-servers-for-google-cloud-databases (checked 2026-10-16) - DBHub repository and README: https://github.com/bytebase/dbhub (checked 2026-10-16) - DBHub releases: https://github.com/bytebase/dbhub/releases (checked 2026-10-16) - DBHub docs: command-line options (--host, --auth-token): https://dbhub.ai/config/command-line (checked 2026-10-16) - DBHub docs: execute_sql (read-only and max_rows): https://dbhub.ai/tools/execute-sql (checked 2026-10-16) - Microsoft Learn: SQL MCP Server overview: https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - Microsoft Learn: What is Data API builder?: https://learn.microsoft.com/en-us/azure/data-api-builder/overview (checked 2026-10-16) - Microsoft Learn: Data API builder feature availability: https://learn.microsoft.com/en-us/azure/data-api-builder/feature-availability (checked 2026-10-16) - Microsoft Learn: Data API builder autoentities configuration: https://learn.microsoft.com/en-us/azure/data-api-builder/configuration/autoentities (checked 2026-10-16) - Data API builder releases: https://github.com/Azure/data-api-builder/releases (checked 2026-10-16) - FreePeak db-mcp-server repository and README: https://github.com/FreePeak/db-mcp-server (checked 2026-10-16) - FreePeak db-mcp-server releases: https://github.com/FreePeak/db-mcp-server/releases (checked 2026-10-16) - ExecuteAutomation mcp-database-server repository: https://github.com/executeautomation/mcp-database-server (checked 2026-10-16) - ExecuteAutomation mcp-database-server commit history: https://github.com/executeautomation/mcp-database-server/commits/main (checked 2026-10-16) - @executeautomation/database-server on npm (registry metadata): https://registry.npmjs.org/@executeautomation/database-server (checked 2026-10-16) - OSV: CVE-2025-59333 (GHSA-65hm-pwj5-73pw): https://osv.dev/vulnerability/CVE-2025-59333 (checked 2026-10-16) - Bytebase docs: Model Context Protocol (MCP): https://docs.bytebase.com/integrations/mcp (checked 2026-10-16) - mcp-alchemy repository: https://github.com/runekaagaard/mcp-alchemy (checked 2026-10-16) - CentralMind Gateway repository: https://github.com/centralmind/gateway (checked 2026-10-16) - Faucet source code (faucetdb/faucet): https://github.com/faucetdb/faucet (checked 2026-10-16) - Faucet telemetry policy (TELEMETRY.md): https://github.com/faucetdb/faucet/blob/main/TELEMETRY.md (checked 2026-10-16) ### PostgreSQL MCP Servers Compared: 8 Options (and the Archived One to Retire) URL: https://faucetdb.ai/blog/postgres-mcp-servers/ (Markdown: https://faucetdb.ai/blog/postgres-mcp-servers/index.md) Eight Postgres MCP servers compared on hosting, auth, read-only enforcement and DBA tooling, plus why to retire the archived reference server. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **Postgres MCP Pro** is the only server here that documents hypothetical-index EXPLAIN and workload-based index advice. It describes no auth on its network transports, so keep it local. - **Supabase MCP** and **Neon MCP** are hosted, use OAuth, scope to a project and have a read-only switch. Neon's own README advises against production use. - **AWS Labs postgres-mcp-server** targets Aurora and RDS. Run 1.1.7 or later: CVE-2026-87911 let a planted `COPY ... TO PROGRAM` through read-only mode in earlier versions. - The archived `@modelcontextprotocol/server-postgres` is deprecated on npm and its read-only mode falls to a stacked `COMMIT`. [Replace it](https://faucetdb.ai/blog/2026-04-30-postgres-mcp-sql-injection-read-only-bypass/). - Every server's read-only mode is a guardrail, not a boundary. Connect with a Postgres role that only has `SELECT`, whatever server you pick. - **Faucet** (ours, listed last) applies one RBAC policy to a REST API and an MCP server across seven SQL engines; it is an access layer, not a DBA tool. Tools covered (in list order): 1. Postgres MCP Pro (https://github.com/crystaldba/postgres-mcp): best for DBA work on any Postgres: EXPLAIN, index tuning, health checks 2. Supabase MCP (https://supabase.com/docs/guides/getting-started/mcp): best for Supabase projects 3. Neon MCP Server (https://github.com/neondatabase/mcp-server-neon): best for Neon projects and branch-based migrations 4. AWS Labs postgres-mcp-server (https://github.com/awslabs/mcp/tree/main/src/postgres-mcp-server): best for Aurora PostgreSQL and RDS for PostgreSQL 5. Google MCP Toolbox for Databases (https://github.com/googleapis/mcp-toolbox): best for Live diagnostics and Google Cloud Postgres 6. DBHub (https://github.com/bytebase/dbhub): best for A lightweight developer server across several databases 7. SQL MCP Server (Data API builder) (https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview): best for Governed CRUD without raw SQL, especially on Azure 8. Faucet (https://faucetdb.ai/): best for One RBAC policy over a REST API and an MCP server, self-hosted FAQ: Q: Is it safe to connect an MCP server to a production Postgres database? A: It can be, with limits. Use a dedicated role with SELECT only on the tables the agent needs, and never superuser or pg_execute_server_program. Turn on the server's read-only mode as a second layer, prefer a replica, and keep network transports off the public internet unless they authenticate. Neon's README advises against production use, and Supabase recommends scoped, read-only connections. Q: Is the official Postgres MCP server deprecated? A: Yes. The reference server @modelcontextprotocol/server-postgres now lives in the modelcontextprotocol/servers-archived repository, which states that no security guarantees are provided. Its last npm version, 0.6.2, is marked as no longer supported, and Datadog Security Labs showed in August 2025 that its read-only mode can be bypassed with a stacked COMMIT. Q: How do I make a Postgres MCP server read-only? A: Use two layers. Turn on the server's read-only setting (restricted mode, read_only=true, readonly=true, or a read-only service), then connect it with a Postgres role that has only SELECT on the tables the agent needs. Server-side checks have been bypassed before; a role without write privileges is enforced by Postgres itself. Q: What are the alternatives to Supabase MCP? A: If you are on Neon, the Neon MCP Server offers a similar hosted, OAuth-based setup with branching, and PlanetScale's MCP server covers PlanetScale Postgres. For self-hosted Postgres, Postgres MCP Pro, DBHub and Google MCP Toolbox run against any Postgres connection. For a governed API layer instead of raw SQL, Microsoft's SQL MCP Server and Faucet expose typed tools behind role rules. Q: Can a Postgres MCP server run EXPLAIN and suggest indexes? A: Yes. Postgres MCP Pro runs EXPLAIN, simulates hypothetical indexes and recommends indexes from workload statistics. Neon MCP has EXPLAIN, slow-query listing and query tuning on a temporary branch. Google MCP Toolbox's prebuilt Postgres tools include get_query_plan and invalid-index checks. DBHub has an opt-in explain_sql tool, and Supabase offers performance advisors. Faucet has none of these. Q: Do Postgres MCP servers support OAuth? A: The hosted platform servers do: Supabase MCP, Neon MCP and PlanetScale MCP all sign you in with OAuth. Most self-hosted servers do not. Postgres MCP Pro describes no auth, DBHub has optional static bearer tokens, AWS Labs runs locally on the client's host, and Faucet uses API keys. Microsoft's SQL MCP Server supports Entra ID and custom JWT providers. Sources: - Postgres MCP Pro (crystaldba/postgres-mcp) README: https://github.com/crystaldba/postgres-mcp (checked 2026-10-16) - Postgres MCP Pro server.py (transport options on main): https://github.com/crystaldba/postgres-mcp/blob/main/src/postgres_mcp/server.py (checked 2026-10-16) - Postgres MCP Pro commit history: https://github.com/crystaldba/postgres-mcp/commits/main (checked 2026-10-16) - postgres-mcp on PyPI (release history): https://pypi.org/project/postgres-mcp/ (checked 2026-10-16) - crystaldba/postgres-mcp on Docker Hub (tags): https://hub.docker.com/r/crystaldba/postgres-mcp/tags (checked 2026-10-16) - Supabase MCP server repository (supabase/mcp): https://github.com/supabase/mcp (checked 2026-10-16) - Supabase docs: Model context protocol (MCP): https://supabase.com/docs/guides/getting-started/mcp (checked 2026-10-16) - Supabase pricing: https://supabase.com/pricing (checked 2026-10-16) - Neon MCP Server README: https://github.com/neondatabase/mcp-server-neon (checked 2026-10-16) - Neon pricing: https://neon.com/pricing (checked 2026-10-16) - AWS Labs postgres-mcp-server README: https://github.com/awslabs/mcp/tree/main/src/postgres-mcp-server (checked 2026-10-16) - awslabs.postgres-mcp-server on PyPI: https://pypi.org/project/awslabs.postgres-mcp-server/ (checked 2026-10-16) - AWS Security Bulletin 2026-104-AWS (CVE-2026-87911): https://aws.amazon.com/security/security-bulletins/2026-104-aws/ (checked 2026-10-16) - NVD: CVE-2026-87911: https://nvd.nist.gov/vuln/detail/CVE-2026-87911 (checked 2026-10-16) - Google MCP Toolbox for Databases repository: https://github.com/googleapis/mcp-toolbox (checked 2026-10-16) - MCP Toolbox prebuilt PostgreSQL tool config: https://github.com/googleapis/mcp-toolbox/blob/main/internal/prebuiltconfigs/tools/postgres.yaml (checked 2026-10-16) - DBHub repository: https://github.com/bytebase/dbhub (checked 2026-10-16) - DBHub docs: execute_sql (read-only and max_rows): https://dbhub.ai/tools/execute-sql (checked 2026-10-16) - DBHub docs: command-line options (--host, --auth-token): https://dbhub.ai/config/command-line (checked 2026-10-16) - @bytebase/dbhub on npm: https://www.npmjs.com/package/@bytebase/dbhub (checked 2026-10-16) - Microsoft Learn: SQL MCP Server overview: https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - Microsoft Learn: Data API builder feature availability: https://learn.microsoft.com/en-us/azure/data-api-builder/feature-availability (checked 2026-10-16) - Microsoft Learn: What is Data API builder?: https://learn.microsoft.com/en-us/azure/data-api-builder/overview (checked 2026-10-16) - PlanetScale docs: MCP server: https://planetscale.com/docs/mcp-server (checked 2026-10-16) - pgEdge MCP Server repository (pgEdge/pgedge-postgres-mcp): https://github.com/pgEdge/pgedge-postgres-mcp (checked 2026-10-16) - pgEdge press release: MCP Server for Postgres generally available: https://www.pgedge.com/press-releases/pgedge-mcp-server-for-postgres-now-generally-available-including-in-pgedge-cloud-advancing-enterprise-ai-infrastructure (checked 2026-10-16) - Microsoft Learn: Azure MCP Server tools for Azure Database for PostgreSQL: https://learn.microsoft.com/en-us/azure/developer/azure-mcp-server/tools/azure-database-postgresql (checked 2026-10-16) - modelcontextprotocol/servers-archived: https://github.com/modelcontextprotocol/servers-archived (checked 2026-10-16) - @modelcontextprotocol/server-postgres on npm: https://www.npmjs.com/package/@modelcontextprotocol/server-postgres (checked 2026-10-16) - Datadog Security Labs: SQL injection in the PostgreSQL MCP server: https://securitylabs.datadoghq.com/articles/mcp-vulnerability-case-study-SQL-injection-in-the-postgresql-mcp-server/ (checked 2026-10-16) - @zeddotdev/postgres-context-server on npm: https://www.npmjs.com/package/@zeddotdev/postgres-context-server (checked 2026-10-16) - OSV: CVE-2025-59333: https://osv.dev/vulnerability/CVE-2025-59333 (checked 2026-10-16) - Faucet source code (faucetdb/faucet): https://github.com/faucetdb/faucet (checked 2026-10-16) ### PostgREST Alternatives in 2026: 9 REST and GraphQL Tools Compared URL: https://faucetdb.ai/blog/postgrest-alternatives/ (Markdown: https://faucetdb.ai/blog/postgrest-alternatives/index.md) Nine PostgREST alternatives compared on databases, REST vs GraphQL, where access control lives, MCP for AI agents and license, from each project's own docs. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **Keep PostgREST** if you are Postgres-only and already model access with database roles and row-level security. Most alternatives exist because a team needs something PostgREST deliberately doesn't do. - **Closest swaps on Postgres:** pREST (self-hosted Go binary, now also MySQL 8) and the managed, PostgREST-compatible Data APIs from Supabase and Neon. - **Want GraphQL instead?** PostGraphile keeps the Postgres-roles model; Hasura adds more data sources and a commercial cloud (DDN). - **Need MySQL, SQL Server or Oracle?** pREST (MySQL 8), Data API builder (SQL Server, MySQL), Directus and Hasura cover several engines; Faucet adds Snowflake and SQLite in one MIT binary; DreamFactory covers them in paid editions. - **AI agents:** pREST (read-only), Faucet, Data API builder, Directus and DreamFactory ship MCP servers that use their API's access rules. Supabase and Neon offer separate platform MCP servers, and Hasura has one for PromptQL. PostgREST has none. Read our [analysis of a Postgres MCP read-only bypass](https://faucetdb.ai/blog/2026-04-30-postgres-mcp-sql-injection-read-only-bypass/) before connecting one. - **Licenses:** Directus has been source-available since v10 (BSL 1.1); v12 (2026) moved it to the Monospace Sustainable Core License, and each version converts to GPLv3 after four years. Tools covered (in list order): 1. pREST (https://github.com/prest/prest): best for A self-hosted, single-binary REST server on Postgres (and now MySQL 8) 2. Supabase Data API (https://supabase.com/docs/guides/api): best for Managed PostgREST inside a full Postgres backend platform 3. Neon Data API (https://neon.com/docs/data-api/overview): best for PostgREST-compatible REST on serverless, branchable Postgres 4. PostGraphile (https://github.com/graphile/crystal): best for GraphQL on Postgres that keeps database roles and RLS in charge 5. Hasura (https://hasura.io/): best for GraphQL across many data sources, with a commercial cloud 6. Faucet (https://faucetdb.ai/): best for One REST API and MCP server across several SQL engines 7. Microsoft Data API builder (https://learn.microsoft.com/en-us/azure/data-api-builder/overview): best for SQL Server and Azure shops wanting REST, GraphQL and MCP from one config 8. Directus (https://directus.com/): best for A data studio and admin app with REST and GraphQL on top 9. DreamFactory (https://www.dreamfactory.com/): best for Enterprises needing many connectors and commercial support FAQ: Q: Is there a PostgREST alternative for MySQL or SQL Server? A: Yes. pREST added a native MySQL 8.0.19+ engine in v2.5.0. For SQL Server, Microsoft Data API builder, Faucet, Directus, Hasura and DreamFactory's paid editions all connect to it. Faucet also covers MariaDB, Oracle, Snowflake and SQLite from the same MIT-licensed binary. PostgREST, PostGraphile, Supabase and Neon remain PostgreSQL-only. Q: Is Supabase just PostgREST? A: Supabase's REST Data API is PostgREST, run for you behind an API gateway with key auth. Supabase adds Auth, Storage, Realtime, a dashboard and an official MCP server, and a GraphQL API through pg_graphql, which new projects must enable since May 2026. If you only need the REST layer on your own Postgres, plain PostgREST or pREST is lighter. Q: Which PostgREST alternative works with AI agents over MCP? A: Microsoft Data API builder (SQL MCP Server, v1.7+), Faucet (built-in MCP at /mcp), pREST (read-only /_mcp endpoint), Directus (v11.12+) and DreamFactory ship MCP servers tied to their API permissions. Supabase and Neon offer platform MCP servers that run SQL and manage projects, each with a read-only mode. Hasura publishes an MCP server for PromptQL. Q: Is Hasura a PostgREST alternative? A: Partly. Hasura generates a GraphQL API, not a PostgREST-style REST API, though Hasura v2 can turn any GraphQL query or mutation into a RESTified endpoint. It suits teams that want GraphQL across several data sources. The v2 engine is Apache-2.0; Hasura DDN is priced per active model, and its free tier lists self-hosting with the v3 engine. Q: Which PostgREST alternatives are OSI open source today? A: As of 2026-10-16: pREST (MIT), PostGraphile (MIT), Faucet (MIT), Microsoft Data API builder (MIT), Hasura's v2 engine (Apache-2.0), Supabase (Apache-2.0) and DreamFactory's core (Apache-2.0; its pricing page lists PostgreSQL as the free edition's connector). Directus is source-available (BSL since v10, MSCL since v12). Neon's Data API is a managed service. Q: Can I migrate from PostgREST without changing my schema? A: Mostly. pREST, PostGraphile, Faucet and Data API builder read your existing schema and add nothing to it. Directus adds its own directus_* system tables, Hasura v2 needs a Postgres metadata database, and Supabase or Neon mean moving the database onto their platform. What changes for everyone is the client side (URL and query syntax) and, outside Supabase and Neon, where access rules live. Sources: - PostgREST repository (README, MIT license, v16.4 release): https://github.com/PostgREST/postgrest (checked 2026-10-16) - PostgREST OpenAPI generator source (Data.Swagger): https://github.com/PostgREST/postgrest/blob/main/src/library/PostgREST/Response/OpenAPI.hs (checked 2026-10-16) - pREST repository README and v2.5.0/v2.5.1 release notes: https://github.com/prest/prest (checked 2026-10-16) - pREST docs: MCP over HTTP: https://docs.prestd.com/get-started/mcp-over-http (checked 2026-10-16) - pREST docs: Configuring pREST (JWT, auth): https://docs.prestd.com/get-started/configuring-prest (checked 2026-10-16) - Supabase docs: REST API: https://supabase.com/docs/guides/api (checked 2026-10-16) - Supabase docs: GraphQL (pg_graphql): https://supabase.com/docs/guides/graphql (checked 2026-10-16) - Supabase changelog: tables not exposed to the Data and GraphQL API automatically: https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically (checked 2026-10-16) - Supabase changelog: pg_graphql 1.6.0 introspection disabled by default: https://supabase.com/changelog/46320-breaking-change-in-pg-graphql-1-6-0-graphql-introspection-disabled-by-default (checked 2026-10-16) - Supabase docs: MCP server: https://supabase.com/docs/guides/getting-started/mcp (checked 2026-10-16) - Supabase pricing: https://supabase.com/pricing (checked 2026-10-16) - Neon docs: Data API overview: https://neon.com/docs/data-api/overview (checked 2026-10-16) - Neon docs: Data API get started (limitations): https://neon.com/docs/data-api/get-started (checked 2026-10-16) - Neon blog: A PostgREST-compatible Data API, now on Neon: https://neon.com/blog/a-postgrest-compatible-data-api-now-on-neon (checked 2026-10-16) - Neon changelog 2026-09-18 (backend GA): https://neon.com/docs/changelog/2026-09-18 (checked 2026-10-16) - Neon docs: Neon MCP server (SQL tools, read-only mode): https://neon.com/docs/ai/neon-mcp-server (checked 2026-10-16) - Neon pricing: https://neon.com/pricing (checked 2026-10-16) - PostGraphile (graphile/crystal) repository and package.json (v5.1.5, MIT): https://github.com/graphile/crystal (checked 2026-10-16) - PostGraphile README (schema description quote): https://github.com/graphile/crystal/blob/main/postgraphile/postgraphile/README.md (checked 2026-10-16) - PostGraphile V5 documentation: https://postgraphile.org/postgraphile/next/ (checked 2026-10-16) - Hasura graphql-engine repository (v2 Apache-2.0, v3 engine): https://github.com/hasura/graphql-engine (checked 2026-10-16) - Hasura pricing (DDN): https://hasura.io/pricing (checked 2026-10-16) - Hasura v2 docs: supported databases: https://hasura.io/docs/2.0/databases/overview/ (checked 2026-10-16) - Hasura v2 docs: Oracle availability: https://hasura.io/docs/2.0/databases/oracle/index/ (checked 2026-10-16) - Hasura v2 docs: RESTified endpoints: https://hasura.io/docs/2.0/restified/overview/ (checked 2026-10-16) - Hasura v2 docs: server flags (metadata database URL): https://hasura.io/docs/2.0/deployment/graphql-engine-flags/reference/ (checked 2026-10-16) - Hasura PromptQL MCP server repository: https://github.com/hasura/promptql-mcp (checked 2026-10-16) - Microsoft Learn: What is Data API builder?: https://learn.microsoft.com/en-us/azure/data-api-builder/overview (checked 2026-10-16) - Microsoft Learn: SQL MCP Server overview: https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - Directus v12 license change (BSL to MSCL): https://directus.com/resources/directus-v12-license-change (checked 2026-10-16) - Directus pricing (Core tier, Directus Cloud add-on): https://directus.com/pricing (checked 2026-10-16) - Directus docs: database configuration (DB_CLIENT): https://directus.com/docs/configuration/database (checked 2026-10-16) - Directus docs: collections (directus_ system collections): https://directus.com/docs/guides/data-model/collections (checked 2026-10-16) - Directus docs: MCP: https://directus.com/docs/guides/ai/mcp (checked 2026-10-16) - DreamFactory pricing: https://www.dreamfactory.com/pricing (checked 2026-10-16) - DreamFactory repository README and composer.json: https://github.com/dreamfactorysoftware/dreamfactory (checked 2026-10-16) - DreamFactory df-sqldb services (PostgreSQL, SQLite, AlloyDB): https://github.com/dreamfactorysoftware/df-sqldb/tree/develop/src/Services (checked 2026-10-16) - DreamFactory docs: MCP server: https://docs.dreamfactory.com/AI/mcp-server (checked 2026-10-16) - NocoDB repository (Sustainable Use License): https://github.com/nocodb/nocodb (checked 2026-10-16) - NocoDB docs: MCP server: https://nocodb.com/docs/product-docs/mcp (checked 2026-10-16) - NpgsqlRest repository (MIT): https://github.com/NpgsqlRest/NpgsqlRest (checked 2026-10-16) - Nhost repository (MIT): https://github.com/nhost/nhost (checked 2026-10-16) - Faucet repository (MIT, v0.1.15): https://github.com/faucetdb/faucet (checked 2026-10-16) ### SQL Server MCP Servers in 2026: 7 Options Compared URL: https://faucetdb.ai/blog/sql-server-mcp-servers/ (Markdown: https://faucetdb.ai/blog/sql-server-mcp-servers/index.md) Seven ways to give AI agents MCP access to Microsoft SQL Server, compared on auth, read-only control, permission granularity, raw T-SQL, stored procedures, maturity, licensing and hosting. Checked against each project's docs, repository and pricing page on October 16, 2026. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **Azure and Entra ID shops:** Microsoft's SQL MCP Server, part of Data API builder (DAB), is the default choice. It is MIT-licensed, has no NL2SQL by design, and supports per-entity, per-field and row-level policies. It needs SQL Server 2016 or later, and HTTP roles only activate once you configure an identity provider. - **Microsoft's MSSQL MCP Server sample is gone.** Microsoft removed it from Azure-Samples on June 3, 2026, in a pull request titled "Removed unsafe MCP sample". Tutorials that still link to it point to a dead folder. - **DBHub** is the lightest way to explore SQL Server from Claude Code or Cursor. HTTP auth is off unless you set `--auth-token`. SQL Server has no native read-only transaction, so DBHub's read-only mode uses a keyword check plus a transaction it always rolls back. - **On-prem SQL Server that needs REST and MCP with per-table roles:** Faucet fits, with a built-in TDS driver and no ODBC install. Access uses API keys and table-level roles rather than Entra ID and row-level policies. See the [SQL Server REST API guide](https://faucetdb.ai/sql-server-rest-api/). - **Hosted or commercial options:** CData Connect AI (hosted subscription, free Developer Edition with limits, on-prem reach through its Connect Gateway) and DreamFactory (self-hosted, SQL Server on paid plans). Tools covered (in list order): 1. SQL MCP Server (Microsoft Data API builder) (https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview): best for Azure and Entra ID shops on SQL Server 2016+ or Azure SQL 2. DBHub (Bytebase) (https://github.com/bytebase/dbhub): best for Developers exploring SQL Server from Claude Code, Cursor or VS Code 3. MCP Toolbox for Databases (Google) (https://github.com/googleapis/mcp-toolbox): best for Teams that want curated, parameterized T-SQL tools, especially on Google Cloud SQL 4. Faucet (https://github.com/faucetdb/faucet): best for On-prem SQL Server that needs REST, OpenAPI and MCP with per-table roles 5. mssql_mcp_server (community, RichardHan) (https://github.com/RichardHan/mssql_mcp_server): best for A quick local stdio connection with Windows authentication 6. DreamFactory (https://docs.dreamfactory.com/AI/mcp-server): best for Enterprises that want a commercially supported API platform with MCP and OAuth 7. CData Connect AI (https://www.cdata.com/ai/connect/sql/): best for Teams that want a hosted MCP endpoint across SQL Server and SaaS sources FAQ: Q: Does Microsoft have an official SQL Server MCP server? A: Yes. SQL MCP Server is part of Data API builder 1.7 and later. It is open source (MIT), self-hosted, and exposes tables, views and stored procedures you configure as seven DML tools over Streamable HTTP or stdio. Microsoft's earlier MSSQL MCP Server sample was removed from the Azure-Samples repository in June 2026. The Azure MCP Server has Azure SQL management tools, not data queries. Q: What is the difference between SQL MCP Server and the MSSQL MCP Server? A: SQL MCP Server is a supported feature of Data API builder. Agents work through configured entities, roles and policies, and it never generates free-form T-SQL. The MSSQL MCP Server was a 2025 preview sample in Azure-Samples, with Entra ID sign-in and table-level tools. Microsoft removed it on June 3, 2026, calling it unsafe. For new projects, use SQL MCP Server. Q: Can I connect an AI agent to an on-premises SQL Server without exposing port 1433? A: Yes. Run the MCP server on a host inside your network next to SQL Server, and expose only its HTTPS endpoint through a reverse proxy or tunnel. Data API builder, Faucet, DBHub and MCP Toolbox all run self-hosted this way. CData Connect AI uses its Connect Gateway, a reverse tunnel you install on-prem. The agent never gets a connection string. Q: How do I give an AI agent read-only access to SQL Server? A: Use two layers. In SQL Server, create a login and user with SELECT only on the schemas the agent needs. In the MCP server, use its own read-only control: read-only entity permissions in Data API builder, a GET-only role or read-only database in Faucet, or readonly = true on a DBHub tool. Avoid servers that run any T-SQL under a privileged login. Q: Do SQL Server MCP servers support stored procedures? A: Some do. Data API builder can register a stored procedure as a named MCP tool (DAB 2.0 and later). DreamFactory's MCP server lists and calls procedures, and CData Connect AI has an executeProcedure tool. Faucet calls procedures over REST with POST /_proc/{name} rather than through an MCP tool. Raw-SQL servers can run EXEC with no per-procedure restriction. Q: Is it safe to let an AI agent run raw T-SQL? A: Only with a least-privilege login. A raw-SQL tool lets the model write any statement the login is allowed to run. Keyword filters and rollback-only transactions help, but DBHub's own docs still tell you to connect with a read-only database user. Structured tools such as DAB's DML tools or Faucet's query tool narrow what an agent can ask for. Sources: - Microsoft Learn: SQL MCP Server overview (page dated 2026-05-14): https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - Microsoft Learn: Data API builder feature availability (minimum versions, auth, policies): https://learn.microsoft.com/en-us/azure/data-api-builder/feature-availability (checked 2026-10-16) - Microsoft Learn: Data API builder authorization overview (database policy actions): https://learn.microsoft.com/en-us/azure/data-api-builder/concept/security/authorization-overview (checked 2026-10-16) - Microsoft Learn: Data API builder Unauthenticated provider (default in DAB 2.0): https://learn.microsoft.com/en-us/azure/data-api-builder/concept/security/authenticate-unauthenticated (checked 2026-10-16) - GitHub: Azure/data-api-builder release v2.1.5 (2026-10-01; MIT): https://github.com/Azure/data-api-builder/releases/tag/v2.1.5 (checked 2026-10-16) - GitHub: Azure-Samples/SQL-AI-samples PR #96, "Removed unsafe MCP sample" (merged 2026-06-03): https://github.com/Azure-Samples/SQL-AI-samples/pull/96 (checked 2026-10-16) - Azure SQL devblog: original MSSQL MCP Server post (returned 404): https://devblogs.microsoft.com/azure-sql/introducing-mssql-mcp-server/ (checked 2026-10-16) - DevClass: Microsoft SQL Server MCP tool review (2025-07-02, preview-era tool list and Entra-only auth): https://devclass.com/2025/07/02/microsoft-sql-server-mcp-tool-leap-in-data-interaction-or-limited-and-frustrating/ (checked 2026-10-16) - GitHub: microsoft/mcp, Azure MCP Server command reference (Azure SQL operations): https://github.com/microsoft/mcp/blob/main/servers/Azure.Mcp.Server/docs/azmcp-commands.md (checked 2026-10-16) - GitHub: microsoft/mcp release Azure.Mcp.Server-3.0.0 (2026-10-12): https://github.com/microsoft/mcp/releases/tag/Azure.Mcp.Server-3.0.0 (checked 2026-10-16) - Azure SQL devblog: MSSQL extension for VS Code, Agent Mode tools: https://devblogs.microsoft.com/azure-sql/vscode-mssql-agent-mode-updates/ (checked 2026-10-16) - GitHub: bytebase/dbhub (MIT, release v1.5.0, 2026-10-09): https://github.com/bytebase/dbhub (checked 2026-10-16) - GitHub: bytebase/dbhub v1.5.0 SQL Server connector (read-only rollback transaction): https://github.com/bytebase/dbhub/blob/v1.5.0/src/connectors/sqlserver/index.ts (checked 2026-10-16) - DBHub docs: execute_sql (read-only mode, max_rows): https://dbhub.ai/tools/execute-sql (checked 2026-10-16) - DBHub docs: command-line options (--host, --auth-token): https://dbhub.ai/config/command-line (checked 2026-10-16) - DBHub docs: TOML configuration (SQL Server named instance, NTLM, Azure AD, tool and source settings): https://dbhub.ai/config/toml (checked 2026-10-16) - GitHub: googleapis/mcp-toolbox (Apache-2.0, release v1.14.0, 2026-10-08): https://github.com/googleapis/mcp-toolbox (checked 2026-10-16) - MCP Toolbox docs: SQL Server source: https://mcp-toolbox.dev/integrations/mssql/source/ (checked 2026-10-16) - MCP Toolbox docs: SQL Server prebuilt config: https://mcp-toolbox.dev/integrations/mssql/prebuilt-configs/microsoft-sql-server/ (checked 2026-10-16) - MCP Toolbox docs: generic OIDC auth (MCP Authorization mode): https://mcp-toolbox.dev/documentation/configuration/authentication/generic/ (checked 2026-10-16) - MCP Toolbox docs: read-only tools: https://mcp-toolbox.dev/documentation/configuration/security/read-only/ (checked 2026-10-16) - MCP Toolbox docs: telemetry: https://mcp-toolbox.dev/documentation/monitoring/telemetry/ (checked 2026-10-16) - GitHub: RichardHan/mssql_mcp_server (MIT; PyPI microsoft_sql_server_mcp 0.1.0; last commit 2025-11-02): https://github.com/RichardHan/mssql_mcp_server (checked 2026-10-16) - GitHub: Aaronontheweb/mssql-mcp (Apache-2.0): https://github.com/Aaronontheweb/mssql-mcp (checked 2026-10-16) - GitHub: aadversteeg/mssqlclient-mcp-server (MIT): https://github.com/aadversteeg/mssqlclient-mcp-server (checked 2026-10-16) - GitHub: JexinSam/mssql_mcp_server (MIT): https://github.com/JexinSam/mssql_mcp_server (checked 2026-10-16) - DreamFactory docs: MCP server: https://docs.dreamfactory.com/AI/mcp-server (checked 2026-10-16) - DreamFactory pricing: https://www.dreamfactory.com/pricing (checked 2026-10-16) - CData Connect AI for SQL Server: https://www.cdata.com/ai/connect/sql/ (checked 2026-10-16) - CData Connect AI docs: MCP tools and authentication: https://docs.cloud.cdata.com/en/API/MCP (checked 2026-10-16) - CData Connect AI docs: Connect Gateway (Private Cloud Connector): https://docs.cloud.cdata.com/en/Connect-Gateway (checked 2026-10-16) - CData Connect AI pricing: https://www.cdata.com/ai/pricing/ (checked 2026-10-16) - CData Connect AI Developer Edition: https://www.cdata.com/developers/ai/developer-edition/ (checked 2026-10-16) - GitHub: faucetdb/faucet (MIT, release v0.1.15, 2026-10-09): https://github.com/faucetdb/faucet (checked 2026-10-16) ### SQLite REST API: 8 Ways to Serve a SQLite Database over HTTP URL: https://faucetdb.ai/blog/sqlite-rest-api/ (Markdown: https://faucetdb.ai/blog/sqlite-rest-api/index.md) Eight ways to put a REST API on a SQLite database: Datasette, PocketBase, Turso, Cloudflare D1, Faucet, sqlite-rest, ws4sqlite and Directus. We ran five of them against the same Chinook.db file and checked whether each one serves an existing file, what writes get through with default settings, and how you lock it down. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - **For an existing .db file, use a tool that wraps the file.** Datasette, Faucet, sqlite-rest and ws4sqlite all served Chinook unchanged in our test. Directus introspects existing tables (from its docs) but adds its own `directus_*` tables. PocketBase did not serve Chinook's tables and added its own tables to the file. - **Defaults differ a lot.** With default settings, sqlite-rest (3/3) and ws4sqlite (7/7) accepted every write we sent and Datasette 0.65.5 accepted none (0/6). Faucet has no anonymous access, and a key with a GET-only role accepted 0 of 9. - **OpenAPI is rare.** Of the four file-serving tools we ran (Datasette, Faucet, sqlite-rest, ws4sqlite), only Faucet served an OpenAPI document (3.1, 11 paths for Chinook). Directus and Soul (not tested) also publish API specs or docs. - **Managed SQLite has HTTP built in.** Turso Cloud and Cloudflare D1 accept SQL over HTTP with a token, but you import your data first. Turso's libSQL server (`sqld`) can be self-hosted with the same kind of HTTP access. - **For AI agents:** Faucet and Directus have MCP built in (Directus's is off by default), Datasette has the read-only `datasette-mcp` plugin, Turso runs a hosted MCP server with OAuth 2.1, and Cloudflare's API MCP server covers D1. See [how to connect Claude to your database](https://faucetdb.ai/connect-claude-to-database/). Tools covered (in list order): 1. Datasette (https://datasette.io/): best for Publishing and exploring an existing SQLite file as a read-only website and JSON API 2. PocketBase (https://pocketbase.io/): best for Building a new app backend with users, files and realtime on embedded SQLite 3. Turso (https://turso.tech/): best for Managed SQLite-compatible databases reachable over HTTP from serverless and edge code 4. Cloudflare D1 (https://developers.cloudflare.com/d1/): best for Apps already running on Cloudflare Workers, with a REST endpoint for scripts and admin tasks 5. Faucet (https://faucetdb.ai/): best for A read/write REST API plus MCP server on an existing .db file, with role-scoped API keys and OpenAPI 6. sqlite-rest (https://github.com/b4fun/sqlite-rest): best for A minimal PostgREST-style API with JWT auth on allow-listed tables 7. ws4sqlite (https://github.com/proofrock/ws4sqlite): best for Sending SQL and transactions over HTTP, with stored statements 8. Directus (https://directus.com/): best for An admin app plus REST and GraphQL APIs with end-user auth on top of an existing SQLite database FAQ: Q: How do I expose an existing SQLite file as a REST API without writing code? A: Point a file-wrapping server at it. `datasette chinook.db` gives a read-only JSON API. With Faucet, run `faucet admin create`, then `faucet db add --name chinook --driver sqlite --path /abs/path/chinook.db` and `faucet serve` for CRUD with API keys, OpenAPI 3.1 and MCP. Use an absolute path, because a wrong path creates an empty database. sqlite-rest and ws4sqlite are smaller binaries that also accept writes. Q: What is the difference between Datasette and PocketBase? A: Datasette wraps a SQLite file you already have and publishes it as a browsable website and read-only JSON API. It suits data publishing and exploration. PocketBase is an application backend: it creates and manages its own SQLite schema through collections and adds users, file storage, an admin dashboard and realtime subscriptions. Pick Datasette for existing data and PocketBase for a new app. Q: Is there a PostgREST equivalent for SQLite? A: Yes. sqlite-rest implements a subset of PostgREST's API for SQLite, including `?column=eq.value` filters, column selection, ordering, pagination and writes, with JWT auth and a table allow-list. Its README lists which PostgREST features are supported. For PostgREST-style tools on other databases, see our [PostgREST alternatives](https://faucetdb.ai/blog/postgrest-alternatives/) comparison. Q: How does SQLite handle concurrent writes behind an API? A: SQLite allows one writer at a time. In WAL mode, readers and the writer run concurrently, but a second writer waits on the lock and fails with SQLITE_BUSY if its busy timeout runs out. An API server in front of the file does not change this. We did not load-test concurrent writes for this post, so check how each tool sets WAL and busy timeouts for write-heavy use. Q: Can SQLite be used behind a REST API in production? A: Yes, for workloads that fit one machine and a single writer at a time. Write-heavy APIs with many concurrent clients need care. Keep the API server on the same host as the file, put TLS, rate limiting and CORS rules in a reverse proxy, and back up the file. If you need many servers or edge locations, look at Turso or Cloudflare D1. Q: Does Turso provide a SQLite HTTP API? A: Yes. Every Turso Cloud database accepts SQL over HTTP at `https://-.turso.io/v2/pipeline` with a database auth token as a Bearer header. You send JSON `execute` requests with SQL and arguments. It is a SQL endpoint, not a resource-style REST API. Tokens can be read-only or scoped per table and action, and existing files import with `turso db create --from-file`. Q: Can I query Cloudflare D1 over REST from outside a Worker? A: Yes. Cloudflare's API has `POST /accounts/{account_id}/d1/database/{database_id}/query`, authenticated with an API token that has D1 Read or D1 Write permission. Requests count against Cloudflare's global API rate limit (1,200 requests per 5 minutes per user), so the endpoint suits scripts and admin tasks. Applications usually query D1 through a Workers binding. Q: Which SQLite REST API tools are read-only by default? A: Only Datasette 0.65.5 was read-only out of the box in our test (0 of 6 writes). sqlite-rest and ws4sqlite accepted every write; ws4sqlite has a one-line `readOnly: true` and sqlite-rest needs a `mode=ro` connection string. Faucet requires credentials for every data request, and a GET-only role or a `read_only` service blocked every write. Turso offers `--read-only` tokens. Sources: - Datasette README and releases (GitHub, Apache-2.0, 0.65.5 stable, 1.0a41 pre-release): https://github.com/simonw/datasette (checked 2026-10-16) - Datasette JSON API documentation (write API, tokens, max_returned_rows): https://docs.datasette.io/en/latest/json_api.html (checked 2026-10-16) - datasette-mcp plugin (Apache-2.0, v0.2): https://github.com/datasette/datasette-mcp (checked 2026-10-16) - PocketBase README and releases (GitHub, MIT, v0.40.5): https://github.com/pocketbase/pocketbase (checked 2026-10-16) - PocketBase docs: collections: https://pocketbase.io/docs/collections/ (checked 2026-10-16) - Turso docs: HTTP API quickstart: https://docs.turso.tech/sdk/http/quickstart (checked 2026-10-16) - Turso docs: fine-grained permissions (per-table and per-action tokens, JWKS): https://docs.turso.tech/sdk/authorization/fine-grained-permissions (checked 2026-10-16) - Turso docs: turso db tokens create (--read-only): https://docs.turso.tech/cli/db/tokens/create (checked 2026-10-16) - Turso docs: hosted MCP server (OAuth 2.1): https://docs.turso.tech/integrations/mcp (checked 2026-10-16) - Turso docs: turso db create (--from-file, --from-dump): https://docs.turso.tech/cli/db/create (checked 2026-10-16) - Turso pricing: https://turso.tech/pricing (checked 2026-10-16) - Turso Database README (MIT, MCP server mode): https://github.com/tursodatabase/turso (checked 2026-10-16) - libSQL server (sqld) README: https://github.com/tursodatabase/libsql/tree/main/libsql-server (checked 2026-10-16) - Cloudflare API: D1 query database: https://developers.cloudflare.com/api/resources/d1/subresources/database/methods/query/ (checked 2026-10-16) - Cloudflare D1 pricing: https://developers.cloudflare.com/d1/platform/pricing/ (checked 2026-10-16) - Cloudflare Workers pricing (Workers Paid minimum): https://developers.cloudflare.com/workers/platform/pricing/ (checked 2026-10-16) - Cloudflare D1: import and export data: https://developers.cloudflare.com/d1/best-practices/import-export-data/ (checked 2026-10-16) - Cloudflare API rate limits: https://developers.cloudflare.com/fundamentals/api/reference/limits/ (checked 2026-10-16) - Cloudflare API MCP server (cloudflare/mcp): https://github.com/cloudflare/mcp (checked 2026-10-16) - Cloudflare MCP servers repo (Workers Bindings server deprecated): https://github.com/cloudflare/mcp-server-cloudflare (checked 2026-10-16) - Faucet source code and releases (GitHub, MIT, v0.1.15): https://github.com/faucetdb/faucet (checked 2026-10-16) - sqlite-rest README and releases (GitHub, MIT, v0.4.1): https://github.com/b4fun/sqlite-rest (checked 2026-10-16) - ws4sqlite README and releases (GitHub, ISC, v0.16.6): https://github.com/proofrock/ws4sqlite (checked 2026-10-16) - Directus README and license (MSCL 1.0, v12.5.0): https://github.com/directus/directus (checked 2026-10-16) - Directus docs: collections, existing tables and system collections: https://directus.com/docs/guides/data-model/collections (checked 2026-10-16) - Directus docs: MCP server installation: https://directus.com/docs/guides/ai/mcp/installation (checked 2026-10-16) - Directus docs: server API (OpenAPI spec endpoint): https://directus.com/docs/api/server (checked 2026-10-16) - Directus docs: realtime configuration (WEBSOCKETS_ENABLED): https://directus.io/docs/configuration/realtime (checked 2026-10-16) - Soul README (MIT, v0.9.2): https://github.com/thevahidal/soul (checked 2026-10-16) - rqlite HTTP API docs (MIT, v10.6.0): https://rqlite.io/docs/api/api/ (checked 2026-10-16) - SQLite: write-ahead logging (concurrency): https://www.sqlite.org/wal.html (checked 2026-10-16) - Chinook sample database v1.4.5: https://github.com/lerocha/chinook-database/releases/tag/v1.4.5 (checked 2026-10-16) ### How to Turn a SQL Database into a REST API and an MCP Server URL: https://faucetdb.ai/blog/turn-database-into-rest-api-and-mcp-server/ (Markdown: https://faucetdb.ai/blog/turn-database-into-rest-api-and-mcp-server/index.md) Three ways to put a REST API and an MCP server in front of an existing SQL database: hand-written code, a config-driven generator (PostgREST, Data API builder), or Faucet. Includes a captured end-to-end transcript. Last reviewed: 2026-10-16 Disclosure: Faucet publishes this comparison. Every tool, including Faucet, was assessed against the same criteria. Key takeaways: - There are three ways to do it: **write the API and MCP tools yourself**, **run a config-driven generator** (PostgREST plus an MCP wrapper, or Microsoft Data API builder), or **run Faucet**, which serves REST, MCP and OpenAPI from one binary. - Whichever you pick, start with a least-privilege database user. The API layer is your second line of defense, not your first. - In our captured run on SQLite, Faucet needed four CLI commands to reach an authenticated REST call. A GET-only API key blocked **0/9** write attempts over REST and MCP. - Whatever you run, put it behind TLS, scope every client to the tables it needs, and work through [the database MCP server security checklist](https://faucetdb.ai/blog/database-mcp-server-security-checklist/) before production. - Pick Data API builder for Microsoft-stack APIs with GraphQL and row-level database policies. Pick PostgREST for Postgres-native authorization. Hand-write it when every endpoint carries business logic. Tools covered (in list order): 1. Hand-written API (FastAPI or Express + an MCP SDK) (https://github.com/modelcontextprotocol/python-sdk): best for Teams that need custom business logic in every endpoint and tool 2. PostgREST + @supabase/mcp-server-postgrest (https://github.com/PostgREST/postgrest): best for PostgreSQL teams that want authorization to live in database roles 3. Microsoft Data API builder (https://github.com/Azure/data-api-builder): best for Microsoft-stack teams that want REST, GraphQL and MCP from one curated config 4. Faucet (https://faucetdb.ai/): best for Exposing any of seven SQL engines as REST, OpenAPI and MCP without per-table configuration FAQ: Q: Can I get a REST API and an MCP server from one tool? A: Yes. Faucet serves REST, an OpenAPI 3.1 document and an MCP endpoint at /mcp from one binary, with one set of API keys and roles. Microsoft Data API builder serves REST, GraphQL and MCP from one dab-config.json for SQL Server, Azure SQL, PostgreSQL and MySQL; Cosmos DB gets GraphQL and MCP but no REST. PostgREST serves REST only, so you add an MCP wrapper such as @supabase/mcp-server-postgrest. Q: Can I generate an MCP server from my database schema automatically? A: Yes. Faucet and Data API builder build MCP tools from the schema rather than from code you write. Faucet introspects the live schema and exposes eight generic tools: list services, list tables, describe, query, insert, update, delete and an opt-in raw SQL tool. Data API builder exposes seven tools over the entities in its config. PostgREST needs a separate MCP wrapper. Q: Do I need to change my database schema? A: No, not for any of the three approaches. Faucet and PostgREST introspect the existing schema at runtime. Data API builder reads the tables, views and procedures you list as entities in its config. What you should change is access: create a dedicated database user with only the grants the API needs, instead of reusing an application or admin login. Q: How do I keep an AI agent read-only? A: Use two layers. In the database, give the API's login SELECT-only grants. In the API layer, give the agent a key that cannot write: in Faucet, a role created with --verbs GET, plus the service read_only flag if admins also connect. In our harness a GET-only key blocked 0/9 writes. See [how to give an AI agent read-only database access](https://faucetdb.ai/blog/give-ai-agent-read-only-database-access/). Q: Does this work with an on-prem database? A: Yes. All three approaches are self-hosted, so the API runs next to the database on your own network. Faucet serves plain HTTP, so put it behind a reverse proxy for TLS. Faucet release builds send anonymous usage telemetry (counts, driver types, OS; no data or names). For air-gapped setups, turn it off with FAUCET_TELEMETRY=0 or faucet config set telemetry.enabled false. Q: Is the OpenAPI document safe to publish? A: Treat it as internal. A generated OpenAPI document lists table and column names, so keep it on a private network or behind auth. From version 2.0, Data API builder's OpenAPI document is permission-aware. By default, PostgREST's output depends on the requesting role. Faucet serves a per-service document at /api/v1/{service}/_doc that requires an API key. Q: Should I use stdio or HTTP for the MCP server? A: Use Streamable HTTP with an API key for anything shared, because the key's role then applies to every tool call. Keep stdio for a single developer's own machine. Data API builder's stdio mode (dab start --mcp-stdio) takes an optional role: argument, defaults to anonymous and uses its simulator auth provider. Sources: - PostgREST repository (MIT license, PostgreSQL): https://github.com/PostgREST/postgrest (checked 2026-10-16) - PostgREST releases (v16.4, 2026-09-24): https://github.com/PostgREST/postgrest/releases (checked 2026-10-16) - PostgREST docs: OpenAPI (root path, role-dependent output): https://docs.postgrest.org/en/stable/references/api/openapi.html (checked 2026-10-16) - PostgREST build manifest (swagger2 library: OpenAPI 2.0 output): https://github.com/PostgREST/postgrest/blob/main/postgrest.cabal (checked 2026-10-16) - PostgREST docs: authentication and roles: https://docs.postgrest.org/en/stable/references/auth.html (checked 2026-10-16) - @supabase/mcp-server-postgrest README: https://github.com/supabase-community/supabase-mcp/tree/main/packages/mcp-server-postgrest (checked 2026-10-16) - @supabase/mcp-server-postgrest on npm (Apache-2.0, 0.2.0): https://www.npmjs.com/package/@supabase/mcp-server-postgrest (checked 2026-10-16) - Data API builder repository (MIT license, .NET 8 requirement): https://github.com/Azure/data-api-builder (checked 2026-10-16) - Data API builder releases (2.1.5, 2026-10-01): https://github.com/Azure/data-api-builder/releases (checked 2026-10-16) - Microsoft Learn: Data API builder feature availability (per-database matrix): https://learn.microsoft.com/en-us/azure/data-api-builder/feature-availability (checked 2026-10-16) - Microsoft Learn: What's new in Data API builder 2.0: https://learn.microsoft.com/en-us/azure/data-api-builder/whats-new/version-2-0 (checked 2026-10-16) - Microsoft Learn: dab init (auth providers, default Unauthenticated): https://learn.microsoft.com/en-us/azure/data-api-builder/command-line/dab-init (checked 2026-10-16) - Microsoft Learn: SQL MCP Server overview: https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/overview (checked 2026-10-16) - Microsoft Learn: Data API builder OpenAPI: https://learn.microsoft.com/en-us/azure/data-api-builder/concept/rest/openapi (checked 2026-10-16) - Microsoft Learn: Data API builder Simulator authentication: https://learn.microsoft.com/en-us/azure/data-api-builder/concept/security/authenticate-simulator (checked 2026-10-16) - Supabase docs: REST API (PostgREST): https://supabase.com/docs/guides/api (checked 2026-10-16) - Supabase docs: MCP server: https://supabase.com/docs/guides/getting-started/mcp (checked 2026-10-16) - Oracle REST Data Services changelog (MCP support in 26.2): https://www.oracle.com/tools/ords/ords-changelog.html (checked 2026-10-16) - MCP Python SDK (MIT): https://github.com/modelcontextprotocol/python-sdk (checked 2026-10-16) - mcp on PyPI (2.3.0): https://pypi.org/project/mcp/ (checked 2026-10-16) - MCP TypeScript SDK (v2 stable line): https://github.com/modelcontextprotocol/typescript-sdk (checked 2026-10-16) - FastAPI (MIT, automatic OpenAPI docs): https://fastapi.tiangolo.com/ (checked 2026-10-16) - Faucet repository (MIT): https://github.com/faucetdb/faucet (checked 2026-10-16) - Faucet docs: Getting started: https://wiki.faucetdb.ai/getting-started (checked 2026-10-16) - Chinook sample database v1.4.5: https://github.com/lerocha/chinook-database/releases/tag/v1.4.5 (checked 2026-10-16) ## Pricing Free and MIT-licensed; every feature in the open-source binary. A hosted Faucet Cloud is planned, not yet available. Details: https://faucetdb.ai/pricing/ ## FAQ **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. **Is Faucet free?** Yes. Faucet is MIT-licensed and every feature is in the open-source binary. A hosted Faucet Cloud is planned but not available yet. **Which databases and versions does Faucet support?** Seven: PostgreSQL 9.6–17, MySQL 5.7–9.x, MariaDB 10.2–11.x, SQL Server 2012–2022, Oracle 12c–26ai, SQLite 3.35+ and Snowflake. Connect as many as you like to one instance. **What is an MCP server for databases?** A server that exposes your database as tools an AI agent can call over the Model Context Protocol. Faucet ships 8 tools (faucet_list_tables, faucet_describe_table, faucet_query and more) that run under the role and API key you choose. **How do I connect Claude to my database?** Create a read-only API key, then add Faucet's `/mcp` endpoint as an MCP server. Claude Code: `claude mcp add --transport http faucet http://localhost:8080/mcp --header "X-API-Key: faucet_YOUR_KEY"`. Claude Desktop: the `mcp-remote` bridge (`npx -y mcp-remote http://localhost:8080/mcp --header X-API-Key:faucet_YOUR_KEY`) in `claude_desktop_config.json`. Either way the key's role limits what Claude can do. `faucet mcp` (stdio) is a same-machine shortcut that runs with admin rights and ignores roles. **How do I connect VS Code (GitHub Copilot) or Windsurf?** Both use the `/mcp` URL with an `X-API-Key` header, in their own config shape (see "Client setup" above). The admin UI's AI agents page generates them for you. **Can I add Faucet as a ChatGPT or claude.ai connector?** Not yet. Those connectors sign in with OAuth, which Faucet doesn't offer. Use a Custom GPT Action or the OpenAI Responses API's MCP tool for ChatGPT, and Claude Code or Claude Desktop for Claude. **How do I connect ChatGPT to my Postgres database?** Run Faucet next to Postgres, expose it over HTTPS, create a read-only API key, then add a Custom GPT Action that imports `https://your-host/openapi.json` with API-key auth (header `X-API-Key`). **Can I use Faucet with Base44, Replit or other AI app builders?** Yes. Expose Faucet over HTTPS, create a scoped key, then add `https://your-host/mcp` with an `X-API-Key` header as a custom MCP server, or call the REST API and OpenAPI spec from your app. **My database is on-prem. Does that work?** Yes. Faucet runs next to the database. Expose only Faucet over HTTPS (reverse proxy or a tunnel like Cloudflare Tunnel or ngrok); the database never leaves your network. **Is it safe to let an AI agent touch my database?** Give agents a read-only role. Roles are fail-closed, services can be flagged read-only, updates and deletes require a filter, and raw SQL is off unless you grant it. **How is Faucet different from PostgREST or Hasura?** PostgREST is PostgreSQL-only; Hasura is GraphQL-first and PostgreSQL-first. Faucet is REST + MCP across seven databases in one binary. **Does Faucet support GraphQL?** No. Faucet focuses on REST (with OpenAPI 3.1) and MCP. ## For agents These faucetdb.ai endpoints are for AI agents reading about Faucet. They describe this website and its docs; they are not a hosted Faucet instance (Faucet runs on your own machine or server). - Docs MCP server: https://faucetdb.ai/mcp (remote, read-only, Streamable HTTP over POST, no auth). Tools: `search_faucet_docs`, `get_faucet_page`, `get_faucet_install`, `get_faucet_mcp_config`. Server card: https://faucetdb.ai/.well-known/mcp/server-card.json . Claude Code: `claude mcp add --transport http faucet-docs https://faucetdb.ai/mcp` - Markdown pages: every faucetdb.ai page has a Markdown version at `//index.md` (home: https://faucetdb.ai/index.md, e.g. https://faucetdb.ai/pricing/index.md). Requesting a page URL with `Accept: text/markdown` returns the same Markdown. - Agent skills: https://faucetdb.ai/.well-known/agent-skills/index.json (Agent Skills Discovery index of SKILL.md files, with sha256 digests) - AI catalog: https://faucetdb.ai/.well-known/ai-catalog.json (lists the docs MCP server, the agent skills, llms.txt and Faucet's own MCP server in the official MCP Registry as `io.github.faucetdb/faucet`) - API catalog (RFC 9727): https://faucetdb.ai/.well-known/api-catalog ## Links Docs: - Getting started: https://wiki.faucetdb.ai/getting-started - Admin UI: https://wiki.faucetdb.ai/admin-ui - Database connectors: https://wiki.faucetdb.ai/database-connectors - MCP server: https://wiki.faucetdb.ai/mcp-server - LLM guide: https://wiki.faucetdb.ai/llm-guide - API reference: https://wiki.faucetdb.ai/api-reference - Filter syntax: https://wiki.faucetdb.ai/filter-syntax - RBAC: https://wiki.faucetdb.ai/rbac - Schema locking: https://wiki.faucetdb.ai/schema-locking - CLI reference: https://wiki.faucetdb.ai/cli-reference - Deployment: https://wiki.faucetdb.ai/deployment - Tutorials: https://wiki.faucetdb.ai/tutorial-postgres , https://wiki.faucetdb.ai/tutorial-mysql (MySQL and MariaDB), https://wiki.faucetdb.ai/tutorial-sqlserver , https://wiki.faucetdb.ai/tutorial-oracle , https://wiki.faucetdb.ai/tutorial-sqlite , https://wiki.faucetdb.ai/tutorial-snowflake Guides: - Connect Claude to your database: https://faucetdb.ai/connect-claude-to-database/ - Connect ChatGPT to your database: https://faucetdb.ai/connect-chatgpt-to-database/ - PostgreSQL REST API and MCP server: https://faucetdb.ai/postgresql-rest-api/ - SQL Server REST API and MCP server: https://faucetdb.ai/sql-server-rest-api/ Project: - Website: https://faucetdb.ai/ - GitHub: https://github.com/faucetdb/faucet - Issues: https://github.com/faucetdb/faucet/issues - Releases: https://github.com/faucetdb/faucet/releases - npm: https://www.npmjs.com/package/@faucetdb/faucet - Docker Hub: https://hub.docker.com/r/faucetdb/faucet - Homebrew tap: https://github.com/faucetdb/homebrew-tap (`brew install faucetdb/tap/faucet`) - License (MIT): https://github.com/faucetdb/faucet/blob/main/LICENSE - Blog: https://faucetdb.ai/blog/ (RSS: https://faucetdb.ai/rss.xml)