MCP MS SQL Server is an MCP server that provides a standardized Model Context Protocol interface for AI models to interact with Microsoft SQL Server databases. Built on Node.js using the official Model Context Protocol SDK and the mssql library, it allows software engineers, data analysts, and database administrators to inspect and query relational data using natural language or automated agent workflows. The server provides tools to execute parameterized SQL queries, retrieve lists of database tables, and inspect detailed schema information for specific tables. It supports dual transport modes, including standard input/output (stdio) for local AI clients and HTTP mode for web-based setups. With built-in Winston logging, configurable environment variables, and JSON-RPC 2.0 compliance, MCP MS SQL Server simplifies enterprise database administration and data retrieval through LLMs without requiring external intermediary services.
Category: Databases & Data Stores
Tags: database, microsoft, mssql, SQL, sql server
bash npm install Alternatively, install it globally using npm install -g mcp-mssql-server. 2. Create a .env file in the project root containing your database credentials: env DB_SERVER=your_server_address DB_USER=your_username DB_PASSWORD=your_password DB_DATABASE_NAME=your_database_name 3. Launch the server in stdio mode with npm start or HTTP mode with npm run start:http. 4. For client configuration (such as Claude Desktop), add the server command pointing to your local Node installation or run command (npx mcp-mssql-server) using stdio transport.Part of MCP Servers
MCP MS SQL Server is a Model Context Protocol server that enables AI clients to connect to and execute queries on Microsoft SQL Server databases using a standardized JSON-RPC interface.
The server includes three primary tools: execute_sql_query for running parameterized SQL queries, list_tables for listing all tables in the connected database, and describe_table for inspecting detailed table schemas.
It supports both stdio mode for local process communication with desktop clients and HTTP mode for network-based integrations.
Yes, MCP MS SQL Server is open source and licensed under the MIT license on GitHub.