- Home
- MCP servers
- Multi-DB
Multi-DB
- other
0
GitHub Stars
other
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"roshanponnappa-multidb-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"-v",
"[YOUR/PATH]/databases.json:/app/databases.json:ro",
"multidb-mcp-server"
]
}
}
}You can query and compare multiple databases of different types at once using a single MCP server that runs in Docker. This server lets you connect to PostgreSQL, MySQL/MariaDB, SQL Server, and SQLite databases, run the same query across all configured databases in parallel, explore schemas, and describe tables. It’s ideal for migrations, migrations validation, and cross-database comparisons.
How to use
Connect an MCP client to the server to perform cross-database queries and exploration. The MCP server exposes a set of tools that let you list configured databases, query individual databases, list tables and schemas, describe table structures, and run the same query across multiple databases at once. Use the following practical patterns to accomplish common tasks: - Add and organize your database connections into a single configuration file. - Start the MCP server using Docker so it can access your configured databases. - From your MCP client, issue commands to list databases, run queries on one or more databases, and inspect table schemas.
How to install
Prerequisites: you need Docker installed on your machine. Optionally, Docker Compose is convenient for managing multiple services, but you can run the container directly if you prefer.
Step-by-step setup and run flow:
-
Create a database configuration file named
databases.jsonwith all your database connections organized by type at the root level. You will include connection details such as host, port, user, password, and database for each database. -
Build and run with Docker Compose (recommended for easy setup):
docker-compose up --build
- Or build and run with Docker directly, mounting your configuration into the container:
# Build the image
docker build -t multidb-mcp-server .
# Run the container with your configuration mounted
docker run -it \
-v $(pwd)/databases.json:/app/databases.json:ro \
multidb-mcp-server
Additional setup notes
When running inside Docker, connect to host or container databases using appropriate hostnames:
- Access host databases from within Docker: use
host.docker.internalon Windows/Mac or172.17.0.1on Linux. - Access other containers: use the container/service name defined in your orchestration file.
- Access remote databases: use the actual hostname or IP address.
Available tools
list_databases
List all configured database connections.
query_database
Execute a SQL query on a specific database.
list_tables
List all tables in a database schema.
describe_table
Get detailed schema information for a table.
list_schemas
List all schemas in a database.
query_multiple_databases
Execute the same query on multiple databases simultaneously.