SuperAPIAI Directory

faucet

github.com · AI developer platforms

Faucet is an open-source (MIT) single-binary Go server that turns SQL databases such as PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Snowflake, or SQLite into secure REST APIs and MCP servers for use by applications and AI agents. It supports role-based access control (RBAC), the OpenAPI 3.1 specification, a built-in admin interface, and automatically generates endpoints, OpenAPI documentation, and MCP tools at runtime based on the database schema, with no code generation or ORM required.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

Faucet is an open-source database-to-REST-API gateway, delivered as a single Go binary and self-hostable. It connects to SQL databases, introspects schemas, and generates a complete CRUD REST API, along with authentication, role-based access control (RBAC), and OpenAPI documentation. In addition, it exposes an MCP server at the /mcp path, enabling AI agents and AI app builders (such as Claude, ChatGPT, Cursor, VS Code, Windsurf, Base44, Replit) to query data through the same roles and API keys.

Key capabilities include: full CRUD REST API (GET, POST, PUT, PATCH, DELETE, with filtering, sorting, and pagination); runtime schema introspection; schema DDL to create, modify, and delete tables via the API; execution of stored procedures; human-readable query filters; automatic generation of OpenAPI 3.1 specifications; API key authentication (SHA-256 hashed keys, with a role assigned to each key); JWT authentication (HMAC-SHA256 signed tokens for admin sessions); role-based access control (per-table verb permissions); row-level security filters (stored but not yet applied to queries); schema contract locking (to prevent breaking schema changes); built-in MCP server (8 tools + 2 resources, supporting Streamable HTTP and stdio transports); embedded admin interface (connect databases, browse schemas and data, build roles and keys, copy MCP configuration); SQLite configuration storage; health check endpoint; support for installation via npm, Homebrew, and Docker.

Usage: install via npm (npx @faucetdb/faucet), Homebrew, or by downloading the binary, run faucet serve to start the server, and visit http://localhost:8080 to use the setup wizard to create an admin account and connect the first database. Each table automatically gets REST endpoints (/api/v1/<name>/_table/<table>) and MCP tools. Then create roles and API keys to get curl commands containing the new key and MCP setup commands. It can also be operated via the CLI.

Use cases: instant backends for applications, AI agent data access, internal tools and dashboards, legacy database modernization, multi-database aggregation, rapid prototyping.

Limitations: row-level security filters are not yet enforced; the ChatGPT connector requires OAuth, which Faucet does not support, so a custom GPT Action must be used; stdio mode runs with local admin privileges, does not apply roles, and is limited to local use; anonymous usage telemetry can be disabled via TELEMETRY.md.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools