SuperAPIAI Directory

wenerme/wener-mssql-mcp

github.com · AI developer platforms

wener-mssql-mcp is an MCP (Model Context Protocol) server for Microsoft SQL Server that allows Claude Desktop to query SQL Server databases through natural language. It supports executing SQL queries in CSV or JSON format, supports SQL Server authentication, Windows authentication, and Azure SQL, is compatible with LocalDB, Azure SQL Database, and SQL Server 2008+, and provides security capabilities such as read-only mode, parameterized queries, and table name validation. The project can be installed and run via npx, offers STDIO and HTTP modes, and is suitable for establishing a secure and convenient interaction channel between AI assistants and databases.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

wener-mssql-mcp is an MCP (Model Context Protocol) server for Microsoft SQL Server. Its main purpose is to allow Claude Desktop and other AI assistants that support MCP to interact with SQL Server databases through natural language.

Main capabilities:

  • Intelligent querying: Execute SQL queries through natural language, and results can be output in CSV or JSON format.
  • Database resource browsing: Automatically list available tables, browse table contents (up to the first 100 rows per table), and access table structures and metadata.
  • Authentication: Supports SQL Server Auth, Windows Auth, and Azure SQL.
  • Compatibility: Supports LocalDB, Azure SQL Database, and SQL Server 2008+.
  • Security features: Provides optional read-only mode, limited to SELECT, WITH (CTE), and SHOW, DESCRIBE, EXPLAIN, DESC commands; prevents SQL injection through parameterized queries, performs table name validation and escaping, automatically encrypts Azure SQL connections, and securely handles credentials.
  • Zero configuration: A single executable file with dependencies already packaged.

Usage:

  • Recommended to install and run via npx; global installation is also supported.
  • When configuring for Claude Desktop, you need to create a .env file containing database credentials and add configuration in claude_desktop_config.json, then restart Claude Desktop.
  • Provides available tools: exec_sql_csv (execute SQL and return CSV), exec_sql_json (execute SQL and return JSON), get_version (get SQL Server version information, read-only prompt).
  • The command line supports STDIO mode (required by Claude Desktop) and HTTP mode (for development), with options including --stdio, --env-file, --port (default 3003), --host (default localhost), --verbose, --help.

Applicable scenarios: Suitable for allowing AI assistants to explore database tables in natural language, write and execute queries, generate data summariesand analysis reports, for example querying customers with the highest sales, listing available tables, summarizing inventory by category, finding orders in the last 30 days, etc. It is also suitable for enterprise environments that need compatibility with older versions of SQL Server or Azure SQL.

Limitations and notes: The materials do not provide specific pricing or fee information; read-only mode is an optional security mode, and it is recommended to enable it for production databases; connection issues may involve login failures, server not found, SSL errors (for local development, MSSQL_ENCRYPT=false can be set), or insufficient permissions, and the corresponding configuration and permissions need to be checked. The project uses the MIT License.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools