Back to Home
enzokamal icon

mcp-mssql-server

by enzokamal

Overview

Connects to an MS SQL database to expose tables as resources and execute arbitrary SQL queries via an MCP (Multi-Modal Compute Platform) server.

Installation

Run Command
python -m mssql_mcp_server

Environment Variables

  • MSSQL_SERVER
  • MSSQL_USER
  • MSSQL_PASSWORD
  • MSSQL_DATABASE
  • MSSQL_PORT
  • MSSQL_ENCRYPT
  • MSSQL_COMMAND
  • MODE

Security Notes

The `call_tool` function directly executes arbitrary SQL queries provided by the client via `cursor.execute(query)`, making it highly vulnerable to SQL injection and unauthorized database operations (read, write, delete, DDL) if exposed to untrusted input without additional, robust input sanitization and authorization layers. While environment variables are used for credentials (good practice), the core functionality of executing arbitrary SQL is a significant security risk. The `read_resource` function uses `validate_table_name` which helps prevent basic table name injection, but the `call_tool` functionality remains critical.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassLow
Avg Tokens500
Stars0
Forks0
Last Update2025-12-11

Tags

SQLDatabaseMSSQLMCPAPI