Faucet is an open-source, single-binary server that turns any SQL database into a secure, governed REST API with role-based access control and native MCP support for applications and AI agents.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Healthy fork ratio
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add faucet -- npx -y @faucetdb/faucet{
"mcpServers": {
"faucet": {
"command": "npx",
"args": ["-y", "@faucetdb/faucet"]
}
}
}MCP Servers overview
<p align="center">
<img src="ui/public/faucet-logo.svg" alt="Faucet logo" height="60">
</p>
<h1 align="center">Faucet: REST API and MCP server for any SQL database</h1>
<h3 align="center">Turn any SQL database into a secure REST API and MCP server.<br>One binary. One command.</h3>
<p align="center">
<strong>Faucet is an open-source (MIT) single Go binary that turns PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Snowflake or SQLite into a REST API and an MCP server for AI agents, with role-based access control (RBAC), OpenAPI 3.1 and a built-in admin UI.</strong>
</p>
<p align="center">
Endpoints, OpenAPI specs and MCP tools are generated from your database schema at runtime. No code generation, no ORM, no boilerplate.
</p>
<p align="center">
<a href="https://github.com/faucetdb/faucet/releases"><img src="https://img.shields.io/github/v/release/faucetdb/faucet?style=flat-square&color=blue" alt="GitHub Release"></a>
<a href="https://github.com/faucetdb/faucet/blob/main/LICENSE"><img src="https://img.shields.io/github/license/faucetdb/faucet?style=flat-square" alt="License: MIT"></a>
<a href="https://hub.docker.com/r/faucetdb/faucet"><img src="https://img.shields.io/docker/pulls/faucetdb/faucet?style=flat-square" alt="Docker Pulls"></a>
<a href="https://github.com/faucetdb/faucet/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/faucetdb/faucet/ci.yml?branch=main&style=flat-square&label=CI" alt="CI Status"></a>
<a href="https://goreportcard.com/report/github.com/faucetdb/faucet"><img src="https://goreportcard.com/badge/github.com/faucetdb/faucet?style=flat-square" alt="Go Report Card"></a>
</p>
<p align="center">
<a href="https://faucetdb.ai">Website</a> ·
<a href="https://wiki.faucetdb.ai">Docs</a> ·
<a href="#60-second-quickstart">Getting Started</a> ·
<a href="https://hub.docker.com/r/faucetdb/faucet">Docker</a> ·
<a href="#mcp-server-for-ai-agents">MCP Server</a> ·
<a href="https://github.com/faucetdb/faucet/issues">Issues</a>
</p>
---
## What is Faucet?
Faucet is a **database-to-REST-API gateway** — a lightweight, self-hosted server that connects to your SQL databases, introspects the schema, and generates a full CRUD REST API with authentication, role-based access control (RBAC), and OpenAPI documentation. It also exposes an **MCP server** at `/mcp` so AI agents and AI app builders (Claude, ChatGPT, Cursor, VS Code, Windsurf, Base44, Replit) can query your data through the same roles and API keys.
Think of it as an open-source alternative to [DreamFactory](https://www.dreamfactory.com/), [PostgREST](https://postgrest.org/), or [Hasura](https://hasura.io/), with multi-database support, a built-in admin UI, and native AI agent integration, all in a single binary. See [how it compares](#faucet-vs-postgrest-vs-hasura-vs-dreamfactory-vs-supabase).
<p align="center"><img src="screenshots/admin-databases.webp" alt="Faucet admin UI listing connected PostgreSQL and SQLite databases" width="800"></p>
### Use Cases
- **Instant backend for apps** — Skip writing CRUD APIs by hand. Point Faucet at your database and start building your frontend.
- **AI agent data access** — Give Claude, GPT, or any MCP-compatible agent governed, read/write access to your databases.
- **Internal tools & dashboards** — Generate APIs for internal databases without modifying existing infrastructure.
- **Legacy database modernization** — Put a REST API in front of SQL Server 2012, MySQL 5.7, or PostgreSQL 9.6 without code changes.
- **Multi-database aggregation** — Connect PostgreSQL, MySQL, SQL Server, Oracle, and more to a single Faucet instance and query them all through one API.
- **Rapid prototyping** — Go from empty database to working API in under 60 seconds.
---
## How It Works
```
┌──────────────┐ ┌───────────────────────────────────────┐ ┌──────────────┐
│ PostgreSQL │ │ F A U C E T │ │ REST API │
│ MySQL │──────▶│ │──────▶│ /api/v1/* │
│ MariaDB │ SQL │ ┌─────────┐ ┌──────┐ ┌───────────┐ │ ├──────────────┤
│ SQL Server │◀──────│ │ Schema │ │ RBAC │ │ OpenAPI │ │──────▶│ OpenAPI 3.1 │
│ Oracle │ │ │ Intro- │ │ Auth │ │ Generator │ │ │ /openapi.json│
│ Snowflake │ │ │ spection│ │ │ │ │ │ ├──────────────┤
│ SQLite │ │ └─────────┘ └──────┘ └───────────┘ │──────▶│ MCP Server │
└──────────────┘ │ │ │ (AI Agents) │
│ ┌──────────────────────────────────┐ │ ├──────────────┤
│ │ Embedded Admin UI (Preact) │ │──────▶│ Admin UI │
│ └──────────────────────────────────┘ │ │ :8080/ │
└───────────────────────────────────────┘ └──────────────┘
```
**Connect** any SQL database → Faucet **introspects** the schema → Instantly generates **REST endpoints**, **OpenAPI docs**, **MCP tools**, and an **Admin UI** — all secured with API keys, JWT auth, and role-based permissions.
---
## Screenshots
<p align="center">
<img src="screenshots/admin-add-database.webp" alt="Adding a PostgreSQL database in the Faucet admin UI with host, port, user and password fields" width="800">
<br><em>Connect a database with host, port, user and password. Faucet tests it before saving and tells you what to fix.</em>
</p>
<p align="center">
<img src="screenshots/admin-schema.webp" alt="Faucet schema page showing columns, keys and schema drift on a locked table" width="800">
<br><em>Browse tables, columns, keys and data, and lock your API contract against breaking schema changes.</em>
</p>
<p align="center">
<img src="screenshots/admin-api-explorer.webp" alt="Faucet API explorer with a filtered query, JSON response and copy-as-curl" width="800">
<br><em>Build requests with filters and pagination, then copy them as curl, JavaScript or Python.</em>
</p>
<p align="center">
<img src="screenshots/admin-ai-agents.webp" alt="Faucet AI agents page with ready-made MCP configs for Claude Code, Cursor, VS Code and more" width="800">
<br><em>Copy-ready MCP setup for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and ChatGPT.</em>
</p>
See the [Admin UI guide](https://wiki.faucetdb.ai/admin-ui) for a tour of every page.
---
## Key Features
### API Generation
- **Full CRUD REST API** — GET, POST, PUT, PATCH, DELETE with filtering, ordering, and pagination
- **Schema introspection** — Discovers tables, columns, types, and constraints at runtime
- **Schema DDL** — Create, alter, and drop tables via API
- **Stored procedure calls** — Execute stored procedures with typed parameters
- **Human-readable query filters** — `(age > 21) AND (status = 'active')`
- **OpenAPI 3.1 spec** — Auto-generated from live database schema at `/openapi.json`
### Security & Access Control
- **API key authentication** — SHA-256 hashed keys with per-key role assignment
- **JWT authentication** — HMAC-SHA256 signed tokens for admin sessions
- **Role-based access control (RBAC)** — Per-table verb permissions (GET, POST, PUT, PATCH, DELETE)
- **Row-level security filters** — Filter expressions are stored per access rule and returned by the API; applying them to queries is planned and not enforced yet
- **Schema contract locking** — Lock your API contract against silent breaking schema changes with three modes (none, auto, strict), drift detection, and CLI management
### AI Agent Integration (MCP)
- **Built-in MCP server** — 8 tools + 2 resources for Model Context Protocol, served at `/mcp` on the same port as the REST API
- **Works with your AI tools** — Copy-ready configs for Claude Code, Claude Desktop, Cursor, VS Code and Windsurf; ChatGPT via a Custom GPT Action on `/openapi.json`
- **Streamable HTTP + stdio transport** — API-key authenticated over the network, or stdio on your own machine
- **Governed AI queries** — AI agents respect the same RBAC rules as API clients
### Developer Experience
- **Single binary** — Zero external dependencies, cross-platform (Linux, macOS, Windows)
- **Embedded admin UI** — connect databases with host, port, user and password (no connection strings), test before saving, browse schemas and data, build roles and keys, and copy ready-made MCP configs for Claude, Cursor, VS Code and more. Works offline; light and dark themes
- **SQLite config store** — All configuration stored locally, no external database required
- **npm + Homebrew + Docker** — Install in seconds on any platform (`npx @faucetdb/faucet`)
- **Health endpoints** — `/healthz` and `/readyz` for Kubernetes-style probes
---
## Supported Databases
| Database | Versions | Cloud Variants | Tutorial |
|----------|----------|----------------|----------|
| **PostgreSQL** | 9.6 – 17 | Amazon RDS, Aurora, Supabase, Neon, Azure Database | [Guide](https://wiki.faucetdb.ai/tutorial-postgres) |
| **MySQL** | 5.7 – 9.x | Amazon RDS, Aurora MySQL, PlanetScale, Azure MySQL | [Guide](https://wiki.faucetdb.ai/tutorial-mysql) |
| **MariaDB** | 10.2 – 11.x | Via MySQL driver | [MySQL guide](https://wiki.faucetdb.ai/tutorial-mysql) |
| **SQL Server** | 2012 – 2022 | Azure SQL Database, Amazon RDS | [Guide](https://wiki.faucetdb.ai/tutorial-sqlserver) |
| **Oracle** | 12c – 26ai | Oracle Cloud (OCI), Amazon RDS, Azure | [Guide](https://wiki.faucetdb.ai/tutorial-oracle) |
| **Snowflake** | Current | AWS, Azure, GCP | [Guide](https://wiki.faucetdb.ai/tutorial-snowflake) |
| **SQLite** | 3.35+ | Local file, in-memory | [Guide](https://wiki.faucetdb.ai/tutorial-sqlite) |
Connector details, SSL options and driver notes: [Database connectors](https://wiki.faucetdb.ai/database-connectors).
---
## 60-Second Quickstart
### Install
**npm (Node.js 18+):**
```bash
npx @faucetdb/faucet serve
```
**Homebrew (macOS / Linux):**
What people ask about faucet
What is faucetdb/faucet?
+
faucetdb/faucet is mcp servers for the Claude AI ecosystem. Faucet is an open-source, single-binary server that turns any SQL database into a secure, governed REST API with role-based access control and native MCP support for applications and AI agents. It has 115 GitHub stars and its last recorded update is dated 2026-10-09.
How do I install faucet?
+
You can install faucet by cloning the repository (https://github.com/faucetdb/faucet) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is faucetdb/faucet safe to use?
+
Our security agent has analyzed faucetdb/faucet and assigned a Trust Score of 100/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains faucetdb/faucet?
+
faucetdb/faucet is maintained by faucetdb. The last recorded GitHub activity is dated 2026-10-09, with 1 open issues.
Are there alternatives to faucet?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy faucet to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/faucetdb-faucet)<a href="https://claudewave.com/repo/faucetdb-faucet"><img src="https://claudewave.com/api/badge/faucetdb-faucet" alt="Featured on ClaudeWave: faucetdb/faucet" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
The fastest path to AI-powered full stack observability, even for lean teams.