faucet CLAUDE.md

faucet CLAUDE.md is an instructions file for coding agents from faucetdb/faucet. It costs 562 tokens per session, scanned A, original, MIT.

A project guide for Faucet, an open-source Go application that turns SQL databases into REST APIs and includes an MCP server for AI agents. It explains the codebase structure, architecture, and important commands.

In plain words
What is it for?
Use it to understand Faucet's Go server, database connectors, command-line tool, embedded frontend, API documentation, and MCP implementation.
Why use it?
It gives coding agents the project context needed to make changes in the right files and follow the existing design. This reduces guesswork when working in an unfamiliar codebase.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/faucetdb/faucet/claude-md
Clone the repo
git clone --depth 1 https://github.com/faucetdb/faucet

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for faucet CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/faucetdb/faucet/claude-md.svg)](https://agentmods.dev/instructions/faucetdb/faucet/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/faucetdb/faucet/claude-md"><img src="https://agentmods.dev/badge/instructions/faucetdb/faucet/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 562 This file is loaded in full into every session.
When invoked 562 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00562 $0.00562
Opus 5 $0.00281 $0.00281
Sonnet 5 $0.00112 $0.00112
Haiku 4.5 $0.00056 $0.00056

Measured 4d ago against content hash 562b7e3292ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

faucet CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Faucet - CLAUDE.md

Instructions for AI assistants working on this codebase.

What Is This?

Faucet is an open-source Go application that turns any SQL database into a secure REST API. Single binary, zero configuration, built-in MCP server for AI agents.

Architecture

  • Language: Go 1.24+
  • HTTP Router: Chi (go-chi/chi/v5)
  • DB Access: jmoiron/sqlx over database/sql
  • CLI: Cobra + Viper
  • Config Storage: Embedded SQLite (modernc.org/sqlite, pure Go)
  • Frontend: Preact + Vite + Tailwind, embedded via go:embed

Project Structure

cmd/faucet/          - CLI entry point and Cobra commands
internal/
  server/            - HTTP server, Chi router, middleware
  handler/           - HTTP request handlers
  service/           - Business logic layer
  connector/         - Database connector interface + implementations
    postgres/        - PostgreSQL connector
    mysql/           - MySQL connector
    mssql/           - SQL Server connector
    snowflake/       - Snowflake connector
  query/             - Filter parser, query builder utilities
  openapi/           - OpenAPI 3.1 spec generator
  mcp/               - MCP server implementation
  config/            - SQLite config store, YAML config
  model/             - Data models (shared types)
  ui/dist/           - Embedded frontend assets
ui/                  - Frontend source (Preact)

Key Commands

make build          # Build binary (UI + Go)
make build-go       # Build Go binary only
make test           # Run all tests
make dev            # Run in dev mode
make lint           # Run linter

Conventions

  • All filter values MUST be parameterized (never string-interpolated) to prevent SQL injection
  • Every database connector implements the connector.Connector interface
  • Response format: {"resource": [...], "meta": {...}} for lists
  • Error format: {"error": {"code": N, "message": "...", "context": {...}}}
  • API keys are SHA-256 hashed, admin passwords are bcrypt hashed
  • All table/column names must pass query.ValidateIdentifier()

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 70 lines · 562 tokens per session scan A 562b7e3292ac

Subscribe to this mod's changes

faucet CLAUDE.md is an instructions file published in the GitHub repository faucetdb/faucet (109 stars, last pushed today), licensed MIT. It adds 562 tokens to every session, about $0.0028 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.