Mssql Mcp Python — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mssql Mcp Python (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<div align="center"> <img src="docs/logo.png" alt="logo"> </div>
This is a MCP (Model Context Protocol) server implementation in Python that safely exposes SQL Server database capabilities to LLM clients.
cd mssql-mcp-python
pip install -r requirements.txt
# or:
uv syncCreate .env file:
# For local SQL Server (Linux/Docker)
export MSSQL_CONNECTION_STRING="Driver={ODBC Driver 17 for SQL Server};Server=localhost,1433;Database=master;UID=sa;PWD=YourPassword123"
# Or for Windows Auth
export MSSQL_CONNECTION_STRING="Driver={ODBC Driver 17 for SQL Server};Server=localhost;Database=master;Trusted_Connection=yes"# With stdio transport (for MCP clients)
python -m mssql_mcp.cli
# With custom settings
MSSQL_QUERY_TIMEOUT=60 READ_ONLY=true python -m mssql_mcp.cli --log-level DEBUG
# Or with HTTP transport
python -m mssql_mcp.cli --transport http --bind 0.0.0.0:8080
# Build and run
docker build -t mssql-mcp:latest .
docker run -e MSSQL_CONNECTION_STRING="..." mssql-mcp:latest# Health check
curl http://localhost:8080/health
# Readiness check
curl http://localhost:8080/ready
# Server info
curl http://localhost:8080/info
# Prometheus metrics
curl http://localhost:8080/metricsThe server exposes these tools to MCP clients:
execute_sql(sql, format="table")Execute SELECT queries (or write operations if enabled)
Input: "SELECT * FROM users LIMIT 10"
Output: ASCII table or JSONlist_schemas()List all database schemas
Input: (none)
Output: Schema names listlist_tables(schema, limit=200)List tables with optional schema filter
Input: schema="dbo", limit=100
Output: Table list with metadataschema_discovery(schema)Get full schema metadata (tables, columns, types)
Input: schema="dbo"
Output: JSON with detailed column infoget_database_info()Get server/database metadata
Input: (none)
Output: Database name, version, machine nameget_policy_info()Get current security policy settings
Input: (none)
Output: Policy details (allowed operations, limits)check_db_connection()Health check for database connectivity
Input: (none)
Output: Connection status✅ Read-Only by Default
ENABLE_WRITES=true + ADMIN_CONFIRM token✅ SQL Injection Prevention
✅ Sensitive Data Protection
✅ Resource Limits
✅ Audit Trail
Available at GET /metrics (HTTP mode):
mssql_queries_executed_total — Total queries by tool and statusmssql_queries_blocked_total — Blocked queries by reasonmssql_query_duration_seconds — Query latency histogrammssql_query_rows_returned — Result set size histogrammssql_active_queries — Currently executing queriesmssql_server_ready — Server readiness (0/1)All logs in JSON format (when LOG_FORMAT=json):
{
"timestamp": "2024-01-15T10:30:00.123456",
"level": "INFO",
"logger": "mssql_mcp.tools",
"message": "Query allowed",
"module": "tools",
"function": "execute_sql",
"line": 42
}GET /health — Liveness probe (always 200)GET /ready — Readiness probe (200 if DB connected)LOG_LEVEL=DEBUG python -m mssql_mcp.cliENABLE_WRITES=true ADMIN_CONFIRM=secret python -m mssql_mcp.cliMSSQL_QUERY_TIMEOUT=120 python -m mssql_mcp.clipython -m mssql_mcp.cli --transport http --bind 127.0.0.1:8080
python -m mssql_mcp.cli --transport http --bind 127.0.0.1:8081 # Different port~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.