Thanks to visit codestin.com
Credit goes to lib.rs

14 releases (6 breaking)

Uses new Rust 2024

new 0.13.1 May 25, 2026
0.12.1 May 22, 2026
0.11.1 May 17, 2026
0.10.4 May 11, 2026
0.7.0 Apr 23, 2026

#7 in #dbmcp


Used in dbmcp

MIT license

560KB
11K SLoC

dbmcp-postgres

Crates.io Docs.rs CI License: MIT

PostgreSQL backend for dbmcp — the single-binary MCP server that lets your AI assistant talk to SQL databases.

What you get

  • PostgresHandler ready to plug into any rmcp::ServerHandler-compatible MCP transport
  • Full MCP tool surface: listDatabases, listTables (with detailed: true), listViews, listTriggers, listFunctions, listProcedures, listMaterializedViews, readQuery, writeQuery, explainQuery, createDatabase, dropDatabase, dropTable
  • Per-database connection pool cache (moka) — cheap per-call database switches
  • Read-only by default — write tools hidden unless explicitly disabled
  • Parameterised queries everywhere — user values never touch SQL strings
  • Optional PII redaction on every readQuery payload; walks JSON/JSONB recursively

See the main crate: dbmcp · Website · Docs

Dependencies

~71MB
~1M SLoC