MCP server for SQL Server metadata, parameterized queries, plan analysis, and writes opt-in.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
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>"
}
}
}
}需要的环境变量
MCPMSSQL_CONNECTION_STRING
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。