# dbx: Rust MCP Client for AI Database Querying Across 70+ DBs

> dbx is a 20 MB Rust-powered cross-platform database client supporting over 70 databases, including MySQL, PostgreSQL, and MongoDB. It provides a separate MCP server that enables AI coding agents to query databases using pre-configured connections, managing access with granular read/write policies.

**Published:** 2026-10-16T12:00:43.527+00:00

**Keywords:** dbx,mcp-client,t8y2dbx,database-client,ai-agent-integration

# dbx: Connecting AI Agents to 70+ Databases via MCP

dbx is a lightweight, 20 MB cross-platform database client built in Rust, offering support for over 70 databases including MySQL, PostgreSQL, SQLite, Redis, MongoDB, and SQL Server. Beyond its comprehensive query editor and AI SQL assistant, dbx integrates with the Model Context Protocol (MCP) by providing a dedicated server for AI coding agents to interact with configured database connections.

## Deploying the dbx MCP Server

The dbx MCP server is a separate Rust-powered package, not automatically installed with the desktop application. To enable AI agent integration, you first need to install and configure this server.

You can install and run the server using `npx`:

```bash
npx @dbx-app/mcp-server
```

To integrate it into your local MCP environment, add the following entry to your `.mcp.json` file:

```json
{
  "mcpServers": {
    "dbx": { "command": "npx", "args": ["-y", "@dbx-app/mcp-server"] }
  }
}
```

For Windows portable builds, ensure the `DBX_DATA_DIR` environment variable is set in your MCP config, pointing to the `data` directory located next to `DBX.exe` (which contains `dbx.db`).

## Configuring Access for AI Agents

Security is managed through granular access controls within dbx. You can define connection allowlists and set permissions to **Read only**, **Data read/write**, or **Full access** modes directly in **DBX Settings → MCP**. These correspond to machine-readable values: `read_only`, `safe_write`, and `high_risk_write`.

Existing `DBX_MCP_ALLOW_WRITES=0` (or `false`) environment variables will enforce read-only access until a central MCP policy is explicitly saved. This legacy setting can never enable writes or override a newly saved policy.

## Web and Docker Deployments

For dbx Web or Docker deployments, the MCP server needs to be configured to point to the Web backend API. If your Web login page requires a password, set `DBX_WEB_PASSWORD` in the MCP server's environment variables to match:

```json
{
  "mcpServers": {
    "dbx": {
      "command": "npx",
      "args": ["-y", "@dbx-app/mcp-server"],
      "env": {
        "DBX_WEB_URL": "http://localhost:4224",
        "DBX_WEB_PASSWORD": "your-web-login-password"
      }
    }
  }
}
```

## AI Agent Capabilities

Once configured, the dbx MCP server allows AI agents like Claude Code, Cursor, and Windsurf to perform several database operations:
*   Listing configured connections.
*   Browsing tables within those connections.
*   Executing SQL queries.
*   Opening tables directly within the dbx UI for visual inspection.

This integration provides a direct conduit for AI coding agents to interact with a wide array of databases, leveraging dbx's established connection management and query capabilities.

## References
- [dbx on GitHub](https://github.com/t8y2/dbx)
- [Model Context Protocol Documentation](https://modelcontextprotocol.io/introduction)
- [dbx on model-context-protocol.com](https://model-context-protocol.com/clients/)

## Related Repository

- [dbx](https://model-context-protocol.com/clients/dbx)

**Source:** https://model-context-protocol.com/blog/dbx-rust-mcp-client-for-ai-database-querying-across-70-dbs-mcp-client-guide
