db-mcp-server
Verified Safeby FreePeak
Overview
Provides AI assistants with structured access to multiple database systems (MySQL, PostgreSQL, SQLite, TimescaleDB) through the Model Context Protocol (MCP).
Installation
docker run -p 9092:9092 -v $(pwd)/config.json:/app/my-config.json -e TRANSPORT_MODE=sse -e CONFIG_PATH=/app/my-config.json freepeak/db-mcp-serverEnvironment Variables
- DB_CONFIG
- CONFIG_PATH
- TRANSPORT_MODE
- SERVER_PORT
- SERVER_HOST
- LOG_LEVEL
- LOG_DIR
- MCP_DISABLE_LOGGING
- DISABLE_LOGGING
- DB_TYPE
- DB_HOST
- DB_PORT
- DB_USER
- DB_PASSWORD
- DB_NAME
Security Notes
The server uses parameterized queries to mitigate SQL injection risks. Example configuration files, such as `config.sqlite-example.json` and `config.timescaledb-test.json`, contain hardcoded default or placeholder credentials. While these are for example/test environments and users are expected to replace them, it highlights a common security pitfall if not properly managed in production. The server binds to `0.0.0.0` in some Docker configurations, which means it listens on all network interfaces, requiring a controlled network environment.
Similar Servers
genai-toolbox
Provides an open-source MCP server to simplify the development and deployment of Gen AI tools that interact with various databases, handling complexities like connection pooling and authentication.
mcp-mysql-server
Provides an MCP-compliant interface for AI models to securely interact with a MySQL database for CRUD operations, schema inspection, and performance analysis.
mcp-server-generator
Generate Model Context Protocol (MCP) servers from database datasources for integration with AI agents, using a visual canvas interface for tool creation and management.
dx-mcp-server
Empowers AI applications to interact with and query a user-provided Postgres database via the Model Context Protocol (MCP).