The usual arrangement is one server process per database, declared in advance. Here list_databases and add_database let an agent discover what is available and add what is not, then route each query by alias. The read-only mode is worth knowing about because it does two things: it removes the write tool, and it validates the query tool's SQL, so a write smuggled into a read call is rejected too.
A Rust database server covering SQLite, MySQL, PostgreSQL, SQL Server, DuckDB and Turso through one interface. Databases can be declared when it starts or registered by the agent while it is running, each getting its own connection pool.
- sql_query for read-only statements and sql_exec for inserts, updates and deletes, both optionally targeting a named database
- add_database to register a connection under an alias and open a pool for it without restarting, and remove_database to tear one down
- list_databases to see every registered alias with its address and detected type, so the agent can discover what it can reach
- db_status for a pool's state and test_connection to ping one
- A read-only mode that removes the write tool entirely and additionally rejects write keywords and multi-statement input in the query tool
- Each alias has an independent pool, so queries against different databases do not block one another
The server binary — built from source with a Rust toolchain, or downloaded prebuilt for your platform. Connection URLs are supplied at startup or at runtime; it can also start with none at all and let the agent register the first one.
One command — cargo install --git https://github.com/rbatis/rbdc-mcp.git
