universal-db-mcp-server
2
The Universal Database MCP Server is a versatile Model Context Protocol server supporting connections to various relational database systems. It offers features like read-only SQL querying and automatic data privacy protection, using the MCP protocol to communicate with large language models.
Universal Database MCP Server
Features
- Multi-Database Support: Compatible with MySQL, PostgreSQL, Oracle, SQL Server, and SQLite
- Metadata Access: Retrieve table structures, field comments, primary keys, indexes, and foreign key information
- Sample Data Viewing: Quickly access sample data from tables
- Read-Only SQL Queries: Safely execute any read-only SQL queries
- Data Privacy Protection: Automatically masks sensitive information to protect data privacy
- MCP Protocol Communication: Communicates using the standard MCP protocol with large language models
- SSE Transmission: Uses Server-Sent Events (SSE) for transmission, no WebSocket dependency
System Requirements
- Python 3.10 or higher
- Applicable database servers: MySQL, PostgreSQL, Oracle, SQL Server, or SQLite
Quick Start
Direct Installation
- Clone the repository and navigate to the directory
- Install dependencies
- Start the server
Docker Deployment
- Build Docker image
- Run Docker container
Configuration Options
Available via environment variables or command line parameters for server customization.
Integration with Claude
Steps for integrating this server with Claude using specific configuration settings.
Docker Compose Deployment
Provides a complete deployment environment using Docker Compose.
Security Notes
- By default, the server listens on all network interfaces; it is advised to use localhost or a reverse proxy in production.
- Sensitive information is automatically masked; use a read-only database user in production.
- Only supports read-only queries and prohibits modifying database operations.
License
Licensed under the MIT License.
Contributions
Issues and pull requests are welcome.