mssql-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mssql-mcp-serverlist the 10 largest tables in sales"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mssql-mcp-server
A Microsoft SQL Server MCP server. Query, inspect, and troubleshoot any SQL Server instance from Cursor, Claude Code, Codex, or any MCP (Model Context Protocol) client. Connects via ODBC using per-caller credentials elicited at runtime. Passwords live only in server memory with an idle TTL and are never logged.
Query tools:
connect/disconnect/list_sessionssession lifecycle,execute_sqlwith table/JSON/CSV output, andexplain_queryfor estimated or actual Showplan XML execution plansPer-caller identity: the
X-DB-UserandX-DB-Passwordheaders are both optional; anything missing is elicited once and cached in-memoryPermission-scoped access: read vs. write is governed by the SQL login's own permissions;
provision_mcp_read.sqlprovisions a ready-made read-onlymcp_readlogin across all user databasesZero secrets on disk: no credentials in config files, env vars, or logs
Example prompts
"Show the execution plan for this query and suggest a better index."
"Who is blocking whom on
db1right now?""List the 10 largest tables in the
salesdatabase.""Find all stored procedures that reference the
Orderstable.""Export the results of this query as CSV."
Related MCP server: mcp-sqlserver
Tools
Tool | Description |
| Open a session to a SQL Server database and return a |
| Close an active SQL Server session |
| List active sessions with server, database, and usage details |
| Run a SQL statement and return rows as table, JSON, or CSV |
| Estimated or actual execution plan as Showplan XML |
Quick Start
docker compose -f docker-compose.yml -p mssql-mcp up -d --build --force-recreateClient setup
Both X-DB-User and X-DB-Password headers are optional: anything missing is prompted for once via MCP elicitation and cached in memory.
Cursor (mcp.json)
{
"mcpServers": {
"mssql-mcp": {
"type": "http",
"url": "http://localhost:8007/mcp",
"headers": {
"X-DB-User": "<your-db-username>",
"X-DB-Password": "<your-db-password>"
}
}
}
}Claude Code
claude mcp add --transport http mssql-mcp http://localhost:8007/mcp \
--header "X-DB-User: <your-db-username>" \
--header "X-DB-Password: <your-db-password>"Codex (~/.codex/config.toml)
[mcp_servers.mssql-mcp]
url = "http://localhost:8007/mcp"
http_headers = { "X-DB-User" = "<your-db-username>", "X-DB-Password" = "<your-db-password>" }Any other MCP client works the same way: point it at the streamable HTTP endpoint and pass the headers.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables connection to Microsoft SQL Server databases, providing tools for schema inspection and querying through standardized interfaces.MIT
- FlicenseAqualityDmaintenanceAn MCP server for Microsoft SQL Server that enables executing read-only queries, listing tables, and describing database schemas. It offers specialized support for custom ports and multiple authentication methods including SQL credentials, NTLM, and Windows Integrated Auth.3
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Microsoft SQL Server instances using Windows or SQL Server authentication via native ODBC drivers. It allows users to execute SQL queries, list tables, and inspect schemas across multiple configured database environments through natural language.746MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables querying SQL Server databases via tools for table search, SELECT execution, and table info retrieval.
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Chillwind132/mssql-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server