DB MCP
Rust MCP server letting AI agents query and modify Oracle, PostgreSQL, MySQL, SQLite
DB MCP is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, macOS, Linux
- Runs
- Locally
- What it can do
- Can change data (1 tool)
- Version
- 0.2.6
Similar MCP servers
Install
In Claude Desktop → Settings → Extensions
https://github.com/arthurhoch/db-mcp/releases/download/v0.2.6/db-mcp-linux-x64.mcpbDownload the bundle and open it with Claude Desktop, or drag it onto Settings → Extensions and click Install. This server is only published as a Claude Desktop bundle.
Using several servers? Build one config file with the MCP config generator.
About DB MCP
Rather than giving an assistant a single database login, this server keeps each connection in its own TOML file with a description, credentials and an access mode. The agent picks a database by ID and writes SQL in that engine's native dialect, so Oracle, PostgreSQL, MySQL, SQLite and SQL Server queries all run through one interface.
Access is controlled per connection: read-only, read-write, or read-write with DDL. Tools cover listing databases, inspecting tables, columns, indexes and constraints, running SQL, and returning an estimated query plan without executing it. Batches run in one transaction per call, and statements can set up row-level security context before dependent queries.
It suits developers and data teams who want an AI client to explore schemas and run queries against existing databases under explicit permissions. Packages for macOS, Linux and Windows ship as standalone executables with a SQLite demo, and the server is used over STDIO from clients such as VS Code Copilot and Codex.
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 4 tools changes data.
From the server's own tool labels and tool names; not verified by us.
- list_databasesName suggests: reads
- Finds the configured database connection.
- describe_databaseName suggests: reads
- Inspects tables, columns, indexes or constraints.
- execute_sqlName suggests: changes
- Runs SQL against a selected connection.
- explain_queryName suggests: reads
- Returns an estimated query plan without running the query.
What it does
- Per-connection access modes
- Each database connection is set to read-only, read-write, or read-write with DDL, limiting what the agent can change.
- Multi-engine SQL execution
- Runs SQL in the native dialect of Oracle, PostgreSQL, MySQL, SQLite or SQL Server, selected by connection ID.
- Schema inspection tools
- Describes tables, columns, indexes and constraints so the agent can understand a database before querying it.
- Query plan explanation
- Returns an estimated execution plan for a query without running it.
- Transactional batches
- Groups statements into one transaction per call, with row-level security context kept on the same connection.
- No separate driver install
- Oracle connects through a Rust driver, so Instant Client and Oracle libraries are not needed.
Good for
- Letting an AI assistant list pending orders or other records in a production-like database under read-only access
- Inspecting unfamiliar schemas, indexes and constraints before writing queries
- Comparing estimated query plans before running expensive SQL
- Running controlled data corrections through read-write connections
- Testing SQL across Oracle, PostgreSQL, MySQL and SQLite from one MCP client
Pricing
Open source
DB MCP FAQ
Which databases are supported?
Oracle, PostgreSQL, MySQL and SQLite support reads and writes, while Microsoft SQL Server is supported for querying.
How is access restricted?
Each connection's TOML file sets its mode: read_only, read_write, or read_write_ddl.
Do I need to install Rust or Oracle Instant Client?
No. Downloaded packages include the executable, and Oracle connects without Instant Client.
How does the server run with a client?
It runs as a STDIO subprocess started by the MCP client, such as VS Code Copilot or Codex.
Is DB MCP free?
Yes. DB MCP is open source, so you can use and self-host it for free.
What are the best alternatives to DB MCP?
The closest alternatives to DB MCP are Custom MCP Database, MCP Sql Rust, JDBC MCP Server, SQL Server MCP and Mysql.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.