dbx MCP Client: AI Agents Query 70+ Databases via Rust Server
dbx: Connecting AI Agents to 70+ Databases via MCP
dbx is a lightweight, 20 MB cross-platform database client that supports over 70 databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, and SQL Server. Beyond its desktop and CLI interfaces, dbx provides a dedicated Rust-powered MCP server, allowing AI coding agents to interact with databases through connections configured within dbx.
Wiring Up the dbx MCP Server
The dbx MCP server is distributed independently from the desktop application. To integrate it with your MCP-compatible AI agent, you first need to install it via npx:
npx @dbx-app/mcp-serverThen, add the server to your .mcp.json configuration:
{
"mcpServers": {
"dbx": { "command": "npx", "args": ["-y", "@dbx-app/mcp-server"] }
}
}For dbx Web or Docker deployments, the MCP server needs to point to the Web backend API. If the Web login page uses a password, set DBX_WEB_PASSWORD accordingly:
{
"mcpServers": {
"dbx": {
"command": "npx",
"args": ["-y", "@dbx-app/mcp-server"],
"env": {
"DBX_WEB_URL": "http://localhost:4224",
"DBX_WEB_PASSWORD": "your-web-login-password"
}
}
}
}Windows portable builds also require DBX_DATA_DIR to be set in the MCP config, pointing to the data directory next to DBX.exe (where dbx.db resides).
Granular Access Control for AI Agents
A critical aspect of connecting AI agents to databases is managing permissions. dbx addresses this by allowing you to manage connection allowlists and define access modes directly within DBX Settings → MCP. These modes include:
- Read only (
read_only) - Data read/write (
safe_write) - Full access (
high_risk_write)
These machine-readable values provide clear boundaries for agent interactions. An existing DBX_MCP_ALLOW_WRITES=0 (or false) environment variable will restrict access to read-only until a central MCP policy is explicitly saved, ensuring no unintended write access.
AI Agent Capabilities with dbx
Once configured, the dbx MCP server enables AI agents like Claude Code, Cursor, and Windsurf to perform several database operations:
- Listing available connections
- Browsing database tables
- Executing SQL queries
- Opening tables directly within dbx's UI
This integration allows AI agents to leverage dbx's broad database support and its AI SQL Assistant capabilities, which can explain queries, optimize SQL, fix errors, and run safety checks on AI-generated SQL.