multi-db-mcp-server

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

  1. Install dependencies:
pip install -r requirements.txt
  1. Copy environment template and configure:
cp .env.example .env
# Edit .env with your database credentials
  1. Test the server:
python server.py

Available Tools

  • query_postgres - Execute SQL queries against PostgreSQL
  • query_snowflake - Execute SQL queries against Snowflake
  • query_databricks - Execute SQL queries against Databricks
  • query_athena - Execute SQL queries against Amazon Athena
  • list_tables - List tables in any supported database

Configuration

Set these environment variables in your .env file:

PostgreSQL

  • POSTGRES_HOST
  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • POSTGRES_PORT

Snowflake

  • SNOWFLAKE_USER
  • SNOWFLAKE_PASSWORD
  • SNOWFLAKE_ACCOUNT
  • SNOWFLAKE_WAREHOUSE
  • SNOWFLAKE_DATABASE
  • SNOWFLAKE_SCHEMA

Databricks

  • DATABRICKS_SERVER_HOSTNAME
  • DATABRICKS_HTTP_PATH
  • DATABRICKS_ACCESS_TOKEN

AWS/Athena

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION

Docker Deployment

Build Docker Image

docker build -t multi-db-mcp-server .

Deploy to Amazon ECR

  1. Create ECR repository:
aws ecr create-repository --repository-name multi-db-mcp-server --region us-east-1
  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
  1. 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.