Microsoft SQL Server

v1.0.0Databasesstable

An easy-to-use bridge that lets AI assistants like Claude and Cursor IDE directly query and explore Microsoft SQL Server databases. No coding experience required!

microsoft-sql-server-mcp-server-mssqlmcpai-integration
Share:
78
Stars
0
Downloads
0
Weekly
0/5

What is Microsoft SQL Server?

Microsoft SQL Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to easy-to-use bridge that lets ai assistants like claude and cursor ide directly query and explore microsoft sql server databases. no coding experience required!

An easy-to-use bridge that lets AI assistants like Claude and Cursor IDE directly query and explore Microsoft SQL Server databases. No coding experience required!

This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An easy-to-use bridge that lets AI assistants like Claude an

Use Cases

Query and explore Microsoft SQL Server databases directly.
Enable AI assistants to perform database operations without coding.
dperussina

Maintainer

LicenseGPL 3.0
Languagejavascript
Versionv1.0.0
UpdatedApr 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx microsoft-sql-server-mcp-server-mssql

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Microsoft SQL Server

The Microsoft SQL Server MCP Server (mssql-mcp-server) bridges AI assistants like Claude and Cursor IDE with Microsoft SQL Server databases, allowing natural language database exploration and querying without writing SQL manually. It exposes tools to discover tables, inspect column schemas, execute read-only SELECT queries safely, search tables by name pattern, and paginate through large result sets. Database analysts, backend developers, and non-technical users who need to interrogate SQL Server data through an AI assistant are the primary audience.

Prerequisites

  • Node.js 16 or higher and npm installed
  • A running Microsoft SQL Server instance (local, remote, or Azure SQL Database)
  • Valid SQL Server credentials (username and password) with at least read access to the target database
  • An MCP-compatible client such as Claude Desktop or Cursor IDE
  • Git to clone the repository (no published npm package)
1

Clone the repository and install dependencies

Clone the mssql-mcp-server repository and install its Node.js dependencies.

git clone https://github.com/dperussina/mssql-mcp-server.git
cd mssql-mcp-server
npm install
2

Configure database credentials in .env

Copy the example environment file and fill in your SQL Server connection details. DB_SERVER, DB_USER, DB_PASSWORD, and DB_DATABASE are required. PORT defaults to 3333 if not set.

cp .env.example .env
# Edit .env with your values:
# DB_SERVER=your-server-name-or-ip
# DB_USER=your-sql-username
# DB_PASSWORD=your-sql-password
# DB_DATABASE=your-database-name
# PORT=3333
# TRANSPORT=stdio
3

Test the server starts correctly

Run the server in stdio mode to confirm it connects to your SQL Server instance without errors before wiring it into your MCP client.

npm start
4

Add the server to your MCP client config

Add the mssql-mcp-server to your claude_desktop_config.json. The server reads all config from environment variables, so pass them in the env block.

{
  "mcpServers": {
    "mssql": {
      "command": "node",
      "args": ["/absolute/path/to/mssql-mcp-server/src/index.js"],
      "env": {
        "DB_SERVER": "your-server.database.windows.net",
        "DB_USER": "sqladmin",
        "DB_PASSWORD": "your-password",
        "DB_DATABASE": "SalesDB",
        "TRANSPORT": "stdio"
      }
    }
  }
}
5

Restart your MCP client and explore your database

Restart Claude Desktop. The server exposes tools for database discovery, table inspection, query execution, pattern-based table search, and paginated result retrieval. Start by asking Claude to show you the available tables.

Microsoft SQL Server Examples

Client configuration

Claude Desktop config connecting to an Azure SQL Database in stdio mode.

{
  "mcpServers": {
    "mssql": {
      "command": "node",
      "args": ["/Users/you/mssql-mcp-server/src/index.js"],
      "env": {
        "DB_SERVER": "myserver.database.windows.net",
        "DB_USER": "sqladmin",
        "DB_PASSWORD": "MySecurePass123!",
        "DB_DATABASE": "SalesDB",
        "TRANSPORT": "stdio",
        "DEBUG": "false"
      }
    }
  }
}

Prompts to try

Example natural language prompts for exploring and querying your SQL Server database.

- "Explore my database structure and show me all available tables"
- "Show me the columns and data types of the Orders table"
- "Query the Customers table and return the first 10 records"
- "Find all tables whose names contain the word 'sales'"
- "Find all orders from the past month with a value exceeding $1000"

Troubleshooting Microsoft SQL Server

Connection errors: 'Failed to connect to SQL Server' or timeout on startup

Verify DB_SERVER, DB_USER, DB_PASSWORD, and DB_DATABASE are all correct in your .env or MCP env block. For Azure SQL, ensure your client IP is allowed in the Azure SQL firewall rules. Enable DEBUG=true to see detailed connection logs.

Server only supports SELECT queries but user wants to insert or update data

This server is intentionally read-only for safety. It executes only SELECT statements. For write operations you would need to modify the server code or use a different tool.

Large query results are truncated or the response is cut off

Use the pagination tools: mcp_SQL_mcp_get_query_results with a UUID from a previous query, or add FETCH NEXT N ROWS ONLY / OFFSET to your SQL. The QUERY_RESULTS_PATH env var sets where large results are saved as JSON files.

Frequently Asked Questions about Microsoft SQL Server

What is Microsoft SQL Server?

Microsoft SQL Server is a Model Context Protocol (MCP) server that easy-to-use bridge that lets ai assistants like claude and cursor ide directly query and explore microsoft sql server databases. no coding experience required! It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Microsoft SQL Server?

Follow the installation instructions on the Microsoft SQL Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Microsoft SQL Server?

Microsoft SQL Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Microsoft SQL Server free to use?

Yes, Microsoft SQL Server is open source and available under the GPL 3.0 license. You can use it freely in both personal and commercial projects.

Browse More Databases MCP Servers

Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "microsoft-sql-server-mcp-server-mssql": { "command": "npx", "args": ["-y", "microsoft-sql-server-mcp-server-mssql"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Microsoft SQL Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides