Back to Home
wangddff icon

mcp-server-sql

Verified Safe

by wangddff

Overview

A secure server enabling LLMs to interact with SQL databases via natural language queries.

Installation

Run Command
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

Environment Variables

  • DATABASE_URL
  • DB_TYPE

Security Notes

Implements basic SQL injection prevention (SELECT-only, forbidden keywords, table allowlist). However, the table name check uses a simple regex and the source code itself suggests 'more robust parsing libraries' for production environments, indicating it might not be foolproof against sophisticated attacks. No 'eval' or obvious malicious code execution patterns were found. Environment variables are used for sensitive credentials, which is good practice.

Similar Servers

Stats

Interest Score0
Security Score7
Cost ClassMedium
Avg Tokens500
Stars0
Forks0
Last Update2025-12-05

Tags

LLMDatabaseSQLAPISecurity