Alyio.Mcpmssql MCP Server

A read-only-by-default [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for Microsoft SQL Server that supports metadata

Local serverstdio

What is the Alyio.Mcpmssql MCP server?

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.

Its toolset

Everything the assistant can do here goes through one of these:

  • Cursor — The Cursor tool exposed by this server
  • Gemini — The Gemini tool exposed by this server
  • Codex — The Codex tool exposed by this server

Configuration

You 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.

Adding it to your client

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.

When to reach for it

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.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the alyio.mcpmssql mcp server does with a few real requests.

Available tools

ToolWhat it does
CursorThe Cursor tool exposed by this server.
GeminiThe Gemini tool exposed by this server.
CodexThe Codex tool exposed by this server.

How to install the Alyio.Mcpmssql MCP 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.

Configuration

VariableDescriptionRequired
MCPMSSQL_CONNECTION_STRINGConfiguration value read at startup.Optional
MCPMSSQL_DESCRIPTIONConfiguration value read at startup.Optional
MCPMSSQL_QUERY_MAX_ROWSConfiguration value read at startup.Optional
MCPMSSQL_QUERY_COMMAND_TIMEOUT_SECONDSConfiguration value read at startup.Optional
MCPMSSQL_QUERY_SNAPSHOT_MAX_ROWSConfiguration value read at startup.Optional
MCPMSSQL_ANALYZE_COMMAND_TIMEOUT_SECONDSConfiguration value read at startup.Optional
MCPMSSQL_ALLOW_WRITEConfiguration value read at startup.Optional
MCPMSSQL_WRITE_COMMAND_TIMEOUT_SECONDSConfiguration value read at startup.Optional

Example prompts to try

  • Use Alyio.Mcpmssql to Cursor.
  • Use Alyio.Mcpmssql to Gemini.
  • Use Alyio.Mcpmssql to Codex.

Frequently asked questions

It connects Alyio.Mcpmssql to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (Cursor, Gemini, Codex) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Alyio.Mcpmssql directly.