sql_queryLABSCO SUMMARY
Registering a database mid-conversation is the feature — no restart, no second server process.
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.
What it is
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.
What you get
- 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
Requirements
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.
Setup effort
One command — cargo install --git https://github.com/rbatis/rbdc-mcp.git
USE CASES
Querying a database nobody set up in advance
Register the connection under an alias, confirm it is there, then query it.
Comparing two databases in one conversation
Route each query to its own alias; the pools are independent, so they do not block each other.
Letting an agent read without letting it write
Run in read-only mode, where the write tool is absent and write statements are rejected by the query tool too.
Diagnosing a connection that is not working
Ping the database and read its pool state instead of guessing from a failed query.
Cleaning up after an exploratory session
Unregister the aliases you added and close their pools.
7 tools
Listed in project docs. Your client may show a different list.
sql_execdb_statustest_connectionlist_databasesadd_databaseremove_databaseBEFORE YOU INSTALL
What to know first
Tools you get
7 tools named in the project's documentation.
Requires
rbdc-mcp on PATH
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
cargo install --git https://github.com/rbatis/rbdc-mcp.gitMCP Clients
Claude Desktop
{
"mcpServers": {
"rbdc-mcp": {
"command": "rbdc-mcp",
"args": [
"--database-url",
"sqlite://./database.db"
]
}
}
}Codex
[mcp_servers.rbdc-mcp]
command = "rbdc-mcp"
args = ["--database-url", "sqlite://./database.db"]
type = "stdio"
enabled = true