MCP server for SQL Server metadata, parameterized queries, plan analysis, and writes opt-in.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add microsoft-sql --env MCPMSSQL_CONNECTION_STRING='<MCPMSSQL_CONNECTION_STRING>' -- dnx Alyio.McpMssql --yes~/.codex/config.toml
[mcp_servers.microsoft-sql]
command = "dnx"
args = ["Alyio.McpMssql", "--yes"]
env = { MCPMSSQL_CONNECTION_STRING = "<MCPMSSQL_CONNECTION_STRING>" }
# codex mcp add microsoft-sql --env MCPMSSQL_CONNECTION_STRING='<MCPMSSQL_CONNECTION_STRING>' -- dnx Alyio.McpMssql --yes~/.cursor/mcp.json
{
"mcpServers": {
"microsoft-sql": {
"command": "dnx",
"args": [
"Alyio.McpMssql",
"--yes"
],
"env": {
"MCPMSSQL_CONNECTION_STRING": "<MCPMSSQL_CONNECTION_STRING>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"microsoft-sql": {
"type": "stdio",
"command": "dnx",
"args": [
"Alyio.McpMssql",
"--yes"
],
"env": {
"MCPMSSQL_CONNECTION_STRING": "<MCPMSSQL_CONNECTION_STRING>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"microsoft-sql": {
"command": "dnx",
"args": [
"Alyio.McpMssql",
"--yes"
],
"env": {
"MCPMSSQL_CONNECTION_STRING": "<MCPMSSQL_CONNECTION_STRING>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"microsoft-sql": {
"command": "dnx",
"args": [
"Alyio.McpMssql",
"--yes"
],
"env": {
"MCPMSSQL_CONNECTION_STRING": "<MCPMSSQL_CONNECTION_STRING>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"microsoft-sql": {
"command": "dnx",
"args": [
"Alyio.McpMssql",
"--yes"
],
"env": {
"MCPMSSQL_CONNECTION_STRING": "<MCPMSSQL_CONNECTION_STRING>"
}
}
}
}Environment variables
MCPMSSQL_CONNECTION_STRING
Replace the placeholders with your own credentials and keep them out of version control.