Back to Home
FreePeak icon

db-mcp-server

Verified Safe

by FreePeak

Overview

Provides AI assistants with structured access to multiple databases, enabling them to execute SQL queries, manage transactions, explore schemas, and analyze performance through a unified interface.

Installation

Run Command
docker run -p 9092:9092 -v $(pwd)/config.json:/app/config.json -e TRANSPORT_MODE=sse -e CONFIG_PATH=/app/config.json freepeak/db-mcp-server:latest

Environment Variables

  • DB_TYPE
  • DB_HOST
  • DB_PORT
  • DB_USER
  • DB_PASSWORD
  • DB_NAME
  • DB_CONFIG
  • CONFIG_PATH
  • TRANSPORT_MODE
  • SERVER_PORT
  • LOG_LEVEL
  • TZ
  • MCP_DISABLE_LOGGING
  • DISABLE_LOGGING

Security Notes

Hardcoded database credentials (passwords for test users) are present in Docker Compose files (`docker-compose.yml`, `docker-compose.timescaledb-test.yml`), `config.json`, and `README.md`. While explicit for testing, this is a critical vulnerability for production deployments. The `config.timescaledb-test.json` sets CORS `allowed_origins` to `"*"`, which is unsafe for production. However, the Go source code correctly uses parameterized queries to mitigate SQL injection risks. The `wait-for-it.sh` script employs safe methods for checking service availability.

Similar Servers

Stats

Interest Score76
Security Score7
Cost ClassMedium
Avg Tokens2000
Stars316
Forks52
Last Update2025-12-06

Tags

Multi-databaseAI IntegrationSQLTimescaleDBPostgreSQLMySQL