Faucet
Lets your AI agent query and change SQL databases through a governed REST API and MCP server with role-based access.
170 stars on GitHubby FaucetLicense MITUpdated last month
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add faucet -- npx -y @faucetdb/faucet mcp
What to fill in
| Name | What it is | Required |
|---|---|---|
FAUCET_DATA_DIR | Faucet data directory holding the databases you connected with faucet serve or faucet db add. Default: ~/.faucet. stdio mode runs with local admin rights. | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Show me the ten newest rows in the orders table.
How many customers signed up last month?
What it is
Faucet is a single program you run yourself. It connects to a SQL database, reads its schema and creates a REST API and MCP tools for it. Your AI agent then reads and writes data with the same roles and API keys as any other client, so you decide which tables it can see and change.
What it can do
- List the connected databases and their tables
- Read rows with filters, ordering and pagination
- Insert, update and delete rows, if the role allows it
- Inspect table schemas
- Call stored procedures
- Two MCP resources and eight tools, served at /mcp
When to use
- βΊWhen you want an AI agent to work with a PostgreSQL, MySQL, SQL Server, Oracle, Snowflake or SQLite database with limited permissions
- βΊWhen you need a quick REST API in front of an existing database
- βΊWhen you want one endpoint that covers several databases
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
cloud-sql-basicsTeaches your agent to create and manage Cloud SQL databases on Google Cloud for MySQL, PostgreSQL and SQL Server, with backups and secure connections.supabase-automationHelps your agent automate tasks in the Supabase database. It can query data, manage tables, and execute SQL. Useful for developers using Supabase.cli-anything-obsidianLets your agent read, create, update, search, and append to notes in your Obsidian vault through the Local REST API plugin.Frequently asked questions
Is it free and open source?
Yes. The readme says Faucet is open source under the MIT license.
Which databases are supported?
PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Snowflake and SQLite.
How is access controlled?
With roles that set per-table permissions and API keys bound to a role. AI agents follow the same rules as API clients.
Is row-level security enforced?
The readme says row-level filters are stored but not enforced yet, so do not rely on them.
Where does the MCP server run?
At http://localhost:8080/mcp on the same port as the REST API, with the API key in the X-API-Key header.
Does it work with Claude and Cursor?
Yes. The admin UI generates ready configs for Claude Code, Claude Desktop, Cursor, VS Code and Windsurf.
If it does not work
- βΊIf the agent sees no tables, check that the role attached to your API key allows access to those tables.
- βΊDatabases added with the faucet db add command are loaded the next time the server starts, so restart it.
- βΊCheck that the X-API-Key header holds a valid key and that the server is reachable at the /mcp address.
5 new skills a week. 1 minute to read.