# MCP SQL Server [](https://opensource.org/licenses/Apache-2.0)
MCP Sqlserver MCP server exists for a simple reason — assistants are far more useful when they can act on MCP Sqlserver directly instead of describing what you should do. # MCP SQL Server
.
Once MCP Sqlserver is connected, these are the calls the assistant has available:
Required — The Required tool exposed by this serverOptional — The Optional tool exposed by this serverYou will need 6 environment variables: SQLSERVER_HOST, SQLSERVER_USER, SQLSERVER_PASSWORD, SQLSERVER_DATABASE, SQLSERVER_ENCRYPT, SQLSERVER_TRUST_CERT. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Installation goes through your MCP client rather than a global install: point it at mcp-sqlserver 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.
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. MCP Sqlserver's toolset — Required, Optional — is a fair guide to whether it matches your workflow. It is maintained by bilims; 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 |
|---|---|
| Required | The Required tool exposed by this server. |
| Optional | The Optional tool exposed by this server. |
{
"mcpServers": {
"sqlserver": {
"command": "mcp-sqlserver",
"env": {
"SQLSERVER_HOST": "your-server.database.windows.net",
"SQLSERVER_USER": "your-username",
"SQLSERVER_PASSWORD": "your-password",
"SQLSERVER_DATABASE": "your-database",
"SQLSERVER_ENCRYPT": "true",
"SQLSERVER_TRUST_CERT": "false"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| SQLSERVER_HOST | Endpoint or connection string the server talks to. | Optional |
| SQLSERVER_USER | Configuration value read at startup. | Optional |
| SQLSERVER_PASSWORD | Configuration value read at startup. | Optional |
| SQLSERVER_DATABASE | Configuration value read at startup. | Optional |
| SQLSERVER_ENCRYPT | Configuration value read at startup. | Optional |
| SQLSERVER_TRUST_CERT | 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.