MS SQL MCP Server 1.1
@dperussina
MCP server for MS SQL Server
Overview
What is MS SQL MCP Server 1.1?
MS SQL MCP Server 1.1 is a bridge that lets AI assistants like Claude directly query and explore Microsoft SQL Server databases. It requires no coding experience and executes read-only SQL queries by default to keep data safe.
How to use MS SQL MCP Server 1.1?
Install Node.js (version 14+), clone the repository, run npm install, copy .env.example to .env, and configure database credentials (DB_USER, DB_PASSWORD, DB_SERVER, DB_DATABASE, PORT, HOST, TRANSPORT, SERVER_URL, DEBUG, QUERY_RESULTS_PATH). Start with npm start (stdio transport) or npm run start:sse (HTTP/SSE transport). Use the bundled interactive client via npm run client.
Key features of MS SQL MCP Server 1.1
- Discover tables and their structures (columns, data types)
- Execute read-only SQL queries safely
- Generate SQL queries from natural language requests
- Supports offset/fetch and cursor-based pagination
- Query results saved as JSON files locally
- Operates via stdio or HTTP/SSE transport
Use cases of MS SQL MCP Server 1.1
- Sales performance analysis: monthly trends and top products by region
- Customer segmentation by purchase frequency and order value
- Database schema optimization and data quality auditing
- API exploration: analyze schema to design endpoints
- Natural language database interrogation for non-technical users
FAQ from MS SQL MCP Server 1.1
Can MS SQL MCP Server 1.1 modify my database?
No. All queries are read-only by default, ensuring data safety.
What are the runtime requirements?
Node.js version 14 or higher and access to a Microsoft SQL Server database (on-premises or Azure).
How do I change the transport mode?
Edit the .env file: set TRANSPORT=stdio for local use or TRANSPORT=sse for network access, then start with npm start or npm run start:sse respectively.
Where are query results stored?
Results of executed queries are saved as JSON files in the directory specified by the QUERY_RESULTS_PATH environment variable.
Does the server support pagination?
Yes. It supports both offset/fetch (OFFSET ... ROWS FETCH NEXT ... ROWS ONLY) and cursor-based pagination (WHERE ID > last_id ORDER BY ID).