Back to Home
sugiruu icon

mssql-mcp-server

by sugiruu

Overview

Provides a simple MCP server with tools to execute queries and retrieve metadata from an MSSQL database.

Installation

Run Command
python mssql_mcp_server.py

Environment Variables

  • MSSQL_SERVER
  • MSSQL_USER
  • MSSQL_PASSWORD

Security Notes

The `run_query` tool directly executes the provided `sql` string using `cur.execute(sql)` without any parameterization or sanitization. This is a critical SQL injection vulnerability, allowing an attacker to execute arbitrary SQL commands on the connected database if they can send requests to the MCP server. Although database credentials are read from environment variables or a .env file (a standard and generally acceptable practice for configuration), the direct SQL execution poses a severe risk.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassLow
Avg Tokens50
Stars0
Forks0
Last Update2025-11-26

Tags

MSSQLDatabaseMCP ServerPythonSQL Querying