db-mcp brings read-only database access to any MCP-compatible AI client
Вячеслав Зубов built db-mcp, a lightweight Rust binary that connects PostgreSQL, MySQL/MariaDB, SQLite, and ClickHouse to any MCP-compatible AI client in a strictly read-only mode.
Score breakdown
db-mcp removes the Node.js/Python runtime requirement that existing database MCP solutions impose, delivering the same multi-database, read-only AI integration as a single downloadable binary.
- 01Written in Rust and ships as a fully static Linux binary (musl, no glibc at runtime)
- 02Supports PostgreSQL, MySQL/MariaDB, SQLite, and ClickHouse via URL scheme detection
- 03Exposes three MCP tools: `list_tables`, `describe_table`, and `query`
Вячеслав Зубов built db-mcp to fill a personal gap: a simple, private, read-only database bridge for AI tools that ships as a single binary rather than a JS or Python package. Written in Rust, it runs as a stdio MCP server and supports PostgreSQL, MySQL/MariaDB, SQLite, and ClickHouse — all backends compiled in at build time, with the engine selected at startup from the database URL scheme. Configuration is straightforward: pass the connection string via `--database-url` or `DATABASE_URL`, and the server is ready for any MCP-compatible client.
The server exposes three tools to the AI client: `list_tables` (lists user tables), `describe_table` (returns columns, types, and nullability), and `query` (runs a SELECT and returns plain JSON rows).
The server exposes three tools to the AI client: `list_tables` (lists user tables), `describe_table` (returns columns, types, and nullability), and `query` (runs a SELECT and returns plain JSON rows). Safety is enforced at the server layer, not in individual adapters — any statement that doesn't begin with `SELECT` (case-insensitive, after trimming) is rejected outright, blocking even CTE-based write attempts like `WITH ... INSERT ... RETURNING`. All queries use parameterized execution, never string concatenation. The post includes configuration examples for Claude, OpenCode, Jan, and Zed, and recommends passing the database URL through the environment variable rather than CLI args to keep credentials out of the process argument list. The binary ships as a fully static musl Linux build with no glibc dependency at runtime.
Key facts
- 01Written in Rust and ships as a fully static Linux binary (musl, no glibc at runtime)
- 02Supports PostgreSQL, MySQL/MariaDB, SQLite, and ClickHouse via URL scheme detection
- 03Exposes three MCP tools: `list_tables`, `describe_table`, and `query`
- 04SELECT-only enforcement is at the server level — non-SELECT statements, including CTE write tricks, are rejected
- 05All queries use parameterized execution, never string-concatenated SQL
- 06Compatible with Claude, OpenCode, Jan, Zed, and any MCP-compatible client
- 07Database URL is passed via `--database-url` flag or `DATABASE_URL` environment variable
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 11, 2026 · 08:34 UTC. How this works →