Back to Home
jeweis icon

jewei-mssql-mcp-server

by jeweis

Overview

Provides a Micro-Agent Protocol (MCP) server for querying Microsoft SQL Server databases and retrieving table structures.

Installation

Run Command
uvx jewei-mssql-mcp-server

Environment Variables

  • DB_HOST
  • DB_USER
  • DB_PASSWORD
  • DB_NAME
  • DB_PORT
  • SERVER_NAME

Security Notes

CRITICAL SQL Injection Vulnerability: The `get_table_info` and `list_show_tables` functions construct SQL queries by directly inserting `table_name` and `schema` using f-strings. This allows for SQL injection if malicious input is provided for these parameters. While `execute_query` attempts to filter dangerous keywords, this is a blacklist approach and is insufficient, and critically, it does not protect the `get_table_info` and `list_show_tables` tools. Additionally, the default database password is an empty string in `app_config.py`, and the connection string specifies `encrypt=no` and `trusted_connection=no`, which are weaker security configurations.

Similar Servers

Stats

Interest Score35
Security Score3
Cost ClassMedium
Avg Tokens1000
Stars5
Forks2
Last Update2026-01-19

Tags

mcpsql-servermssqldatabasequery