
mcp-multi-db
Read-only MCP server letting AI agents query PostgreSQL, MySQL and SQLite together
The repository was last updated 23 days ago and is published under ISC.
mcp-multi-db is an open-source MCP server for databases. It is available on CLI, API, Linux, macOS, Windows and Self-hosted.
- Pricing
- Open source
- Platforms
- CLI, API, Linux
- What it can do
- Can change data (1 tool)
- GitHub stars
- 1
- Last commit
Similar MCP servers
About mcp-multi-db
Rather than running one MCP server per database, this server connects an AI client to several SQL databases at once. Connections are declared in a single config file, and the agent selects the target by database identifier before it inspects tables or runs a query.
Every query runs under two layers of protection: a SQL text guard that rejects writes and DDL, and a database-level read-only transaction. Row caps and statement timeouts keep results bounded. An optional governance layer adds per-database tool scoping, table allow and deny lists checked against the query plan, column redaction that holds under aliasing, query budgets and a JSONL audit log.
It suits developers and analysts who want an assistant to explore live operational or analytics data without giving it write access, and teams that need an audit trail of what was run against which database.
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
- List configured database connections
- list_tablesName suggests: reads
- List tables/views in a database
- describe_tableName suggests: reads
- Show column metadata for a table
- run_queryName suggests: changes
- Run read-only SQL (SELECT, WITH, EXPLAIN)
What it does
- Multiple engines in one server
- Connects PostgreSQL, MySQL and SQLite databases side by side through a single MCP endpoint.
- Read-only enforcement
- Blocks writes through a SQL guard and runs each statement inside a read-only database transaction.
- Schema discovery
- Lets the agent list databases, tables, views and column metadata before writing a query.
- Row and time limits
- Caps returned rows and sets statement timeouts so runaway queries are bounded.
- Opt-in governance
- Offers per-database tool scope, table allow and deny lists, column redaction, rate limits and an audit log.
Good for
- Letting an assistant explore a production read replica without risking writes
- Querying analytics and reporting databases from one chat session
- Giving a team's AI tools schema-aware access to SQL data with an audit trail
- Restricting which tables and columns an agent can see on sensitive databases
Pricing
Open source
Free open source under the ISC license.
mcp-multi-db FAQ
Can the agent modify data?
No. Inserts, updates, deletes and DDL are blocked by a SQL guard and by read-only database transactions.
Which databases are supported?
PostgreSQL, MySQL and SQLite. Other engines would need a new adapter.
How is the server installed?
It runs with npx mcp-multi-db or as a global npm install, and it also ships a Docker image. It speaks MCP over stdio.
Are governance features required?
No. Without a policy or audit section, a database behaves with the default read-only protections only.
Is mcp-multi-db free?
Yes. mcp-multi-db is open source, so you can use and self-host it for free.
What are the best alternatives to mcp-multi-db?
The closest alternatives to mcp-multi-db are db-mcp-server, sql-query-mcp, thinair-data, Custom MCP Database and DB MCP.
Where this comes from
- Description: written from the project's README.


