wangddff/mcp-server-sql
3.2
If you are the rightful owner of mcp-server-sql 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 secure, production-ready MCP server enabling LLMs to query SQL databases using natural language.
MCP Server for SQL Databases (PostgreSQL / MySQL)
A secure, production-ready MCP (Model Context Protocol) server that allows LLMs (via Dify, Cursor, etc.) to query traditional databases with natural language.
✨ Features
- Supports PostgreSQL and MySQL
- SQL injection prevention
- Table/column allowlist
- Forbidden keyword blocking
- Docker ready
- Compatible with Dify Custom Tool
🚀 Quick Start
# Build
docker build -t mcp-server-sql .
# Run (PostgreSQL example)
docker run -d \
--name mcp-sql \
-p 8000:8000 \
-e DATABASE_URL="postgresql://user:pass@host:5432/db" \
-e DB_TYPE="postgresql" \
mcp-server-sql