# MSSQL MCP Server [](https://smithery.ai/server/@c0h1b4/mssql-mcp-server) A
If you already use MSSQL, the mssql mcp server is the piece that lets your assistant work with it directly. # MSSQL MCP Server A Model Context Protocol (MCP) server for connecting to Microsoft SQL Server databases. This.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
query — The query tool exposed by this serverParameters — The Parameters tool exposed by this serverExample — The Example tool exposed by this serverInstallation goes through your MCP client rather than a global install: point it at @smithery/cli on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
Configuration is passed through the environment: MSSQL_CONNECTION_STRING, MSSQL_HOST, MSSQL_PORT, MSSQL_DATABASE, MSSQL_USER, MSSQL_PASSWORD, MSSQL_ENCRYPT, MSSQL_TRUST_SERVER_CERTIFICATE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. MSSQL's toolset — query, Parameters, Example — is a fair guide to whether it matches your workflow. It is maintained by c0h1b4; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| query | The query tool exposed by this server. |
| Parameters | The Parameters tool exposed by this server. |
| Example | The Example tool exposed by this server. |
{
"mcpServers": {
"mssql": {
"command": "mssql-mcp-server",
"env": {
"MSSQL_CONNECTION_STRING": "Server=localhost;Database=master;User Id=sa;Password=yourpassword;",
// Or individual connection parameters:
"MSSQL_HOST": "localhost",
"MSSQL_PORT": "1433",
"MSSQL_DATABASE": "master",
"MSSQL_USER": "sa",
"MSSQL_PASSWORD": "yourpassword",
"MSSQL_ENCRYPT": "false",
"MSSQL_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| MSSQL_CONNECTION_STRING | Configuration value read at startup. | Optional |
| MSSQL_HOST | Endpoint or connection string the server talks to. | Optional |
| MSSQL_PORT | Configuration value read at startup. | Optional |
| MSSQL_DATABASE | Configuration value read at startup. | Optional |
| MSSQL_USER | Configuration value read at startup. | Optional |
| MSSQL_PASSWORD | Configuration value read at startup. | Optional |
| MSSQL_ENCRYPT | Configuration value read at startup. | Optional |
| MSSQL_TRUST_SERVER_CERTIFICATE | Configuration value read at startup. | Optional |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.