A read-only-by-default [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for Microsoft SQL Server that supports metadata
A read-only-by-default Model Context Protocol (MCP) server for Microsoft SQL Server that supports metadata discovery, parameterized queries, and query analysis, with profile-based configuration. The query. The alyio.mcpmssql mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 3 defined tools rather than through you.
Everything the assistant can do here goes through one of these:
Cursor — The Cursor tool exposed by this serverGemini — The Gemini tool exposed by this serverCodex — The Codex tool exposed by this serverYou will need 8 environment variables: MCPMSSQL_CONNECTION_STRING, MCPMSSQL_DESCRIPTION, MCPMSSQL_QUERY_MAX_ROWS, MCPMSSQL_QUERY_COMMAND_TIMEOUT_SECONDS, MCPMSSQL_QUERY_SNAPSHOT_MAX_ROWS, MCPMSSQL_ANALYZE_COMMAND_TIMEOUT_SECONDS, MCPMSSQL_ALLOW_WRITE, MCPMSSQL_WRITE_COMMAND_TIMEOUT_SECONDS. 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 @modelcontextprotocol/inspector 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.
Plenty of database access servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Alyio.Mcpmssql's toolset — Cursor, Gemini, Codex — is a fair guide to whether it matches your workflow. It is maintained by alyiox; 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 |
|---|---|
| Cursor | The Cursor tool exposed by this server. |
| Gemini | The Gemini tool exposed by this server. |
| Codex | The Codex tool exposed by this server. |
{
"mcpServers": {
"mssql": {
"command": "dotnet",
"args": ["dnx", "Alyio.McpMssql", "--prerelease", "--yes"],
"env": {
"MCPMSSQL_CONNECTION_STRING": "Server=127.0.0.1;User ID=sa;Password=<YourStrong@Passw0rd>;Encrypt=True;TrustServerCertificate=True;"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| MCPMSSQL_CONNECTION_STRING | Configuration value read at startup. | Optional |
| MCPMSSQL_DESCRIPTION | Configuration value read at startup. | Optional |
| MCPMSSQL_QUERY_MAX_ROWS | Configuration value read at startup. | Optional |
| MCPMSSQL_QUERY_COMMAND_TIMEOUT_SECONDS | Configuration value read at startup. | Optional |
| MCPMSSQL_QUERY_SNAPSHOT_MAX_ROWS | Configuration value read at startup. | Optional |
| MCPMSSQL_ANALYZE_COMMAND_TIMEOUT_SECONDS | Configuration value read at startup. | Optional |
| MCPMSSQL_ALLOW_WRITE | Configuration value read at startup. | Optional |
| MCPMSSQL_WRITE_COMMAND_TIMEOUT_SECONDS | 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.