13 releases (5 breaking)
Uses new Rust 2024
| new 0.12.1 | May 22, 2026 |
|---|---|
| 0.12.0 | May 21, 2026 |
| 0.11.1 | May 17, 2026 |
| 0.10.4 | May 11, 2026 |
| 0.7.0 | Apr 23, 2026 |
#2783 in Database interfaces
Used in 4 crates
68KB
1K
SLoC
dbmcp-sql
SQL validation, identifier quoting, pagination, and timeout helpers powering dbmcp — the single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite.
What you get
- Read-only enforcement: only
SELECT,SHOW,DESC,DESCRIBE,USEallowed - 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/OFFSETrewriting for paginatedSELECTs - Query-level timeout wrapper shared across backends
Dependencies
~45–61MB
~1M SLoC