lallym/multi-db-mcp-server
3.2
If you are the rightful owner of multi-db-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server that provides read-only access to multiple databases including PostgreSQL, Snowflake, Databricks, and Amazon Athena.
Tools
5
Resources
0
Prompts
0
Multi-Database MCP Server
A Model Context Protocol (MCP) server that provides read-only access to PostgreSQL, Snowflake, Databricks, and Amazon Athena databases.
Setup
- Install dependencies:
pip install -r requirements.txt
- Copy environment template and configure:
cp .env.example .env
# Edit .env with your database credentials
- Test the server:
python server.py
Available Tools
query_postgres- Execute SQL queries against PostgreSQLquery_snowflake- Execute SQL queries against Snowflakequery_databricks- Execute SQL queries against Databricksquery_athena- Execute SQL queries against Amazon Athenalist_tables- List tables in any supported database
Configuration
Set these environment variables in your .env file:
PostgreSQL
POSTGRES_HOSTPOSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_PORT
Snowflake
SNOWFLAKE_USERSNOWFLAKE_PASSWORDSNOWFLAKE_ACCOUNTSNOWFLAKE_WAREHOUSESNOWFLAKE_DATABASESNOWFLAKE_SCHEMA
Databricks
DATABRICKS_SERVER_HOSTNAMEDATABRICKS_HTTP_PATHDATABRICKS_ACCESS_TOKEN
AWS/Athena
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION
Docker Deployment
Build Docker Image
docker build -t multi-db-mcp-server .
Deploy to Amazon ECR
- Create ECR repository:
aws ecr create-repository --repository-name multi-db-mcp-server --region us-east-1
- Get login token and authenticate:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <account-id>.dkr.ecr.us-east-1.amazonaws.com
- Tag and push image:
docker tag multi-db-mcp-server:latest <account-id>.dkr.ecr.us-east-1.amazonaws.com/multi-db-mcp-server:latest
docker push <account-id>.dkr.ecr.us-east-1.amazonaws.com/multi-db-mcp-server:latest
Replace <account-id> with your AWS account ID and adjust region as needed.
Usage with Q CLI
Add this server to your Q CLI MCP configuration to access these databases through natural language queries.