# dbmcp-sql
[](https://crates.io/crates/dbmcp-sql)
[](https://docs.rs/dbmcp-sql)
[](https://github.com/haymon-ai/dbmcp/actions/workflows/ci.yml)
[](https://github.com/haymon-ai/dbmcp/blob/master/LICENSE)
SQL validation, identifier quoting, pagination, and timeout helpers powering [dbmcp](https://dbmcp.haymon.ai) — the single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite.
## What you get
- Read-only enforcement: only `SELECT`, `SHOW`, `DESC`, `DESCRIBE`, `USE` allowed
- AST-based validation via `sqlparser` (comments + string contents stripped first)
- Blocks file-exfiltration patterns (`LOAD_FILE`, `SELECT INTO OUTFILE/DUMPFILE`)
- Identifier validation + per-backend quoting — no string interpolation
- Server-controlled `LIMIT` / `OFFSET` rewriting for paginated `SELECT`s
- Query-level timeout wrapper shared across backends
See the main crate: **[dbmcp](https://dbmcp.haymon.ai)** · [Website](https://dbmcp.haymon.ai) · [Docs](https://dbmcp.haymon.ai/docs/)