SQL-AI-samples
SQL-AI-samples copied to clipboard
Browser opens for authentication while using sql or windows auth type
Hi
How do we circumvent this behaviour, this is not required for windows or sql authentication.
Thanks
Are you using Linux/WSL? If so, I got this to work by:
- install dotnet in WSL
- Clone repo and build the dotnet version
- Update .claude.json
"mcpServers": {
"mssql": {
"command": "/usr/bin/dotnet",
"args": ["/home/myuser/repos/SQL-AI-samples/MssqlMcp/dotnet/MssqlMcp/bin/Debug/net8.0/MssqlMcp.dll"],
"env": {
"CONNECTION_STRING": "Server=host.docker.internal,1433;Database=DB;User Id=sa;Password=yourpassword;TrustServerCertificate=true;"
}
}
If you are using Windows and Claude Desktop, the config would be:
mcpServers": {
"mssql": {
"type": "stdio",
"command": "C:\\Users\\youruser\\repos\\SQL-AI-samples\\MssqlMcp\\dotnet\\MssqlMcp\\bin\\Debug\\net8.0\\MssqlMcp.exe",
"args": [ ],
"env": {
"CONNECTION_STRING":"Server=localhost,1434;Database=DB;Trusted_Connection=False;TrustServerCertificate=True;UID=sa;PWD=yourpwd"
}
}
}
I am on windows using vscode and claude sonnet 4 with copilot.
"sql": {
"type": "stdio",
"command": "node",
"args": [
"C:/src/SQL-AI-samples-main/MssqlMcp/Node/dist/index.js"
],
"env": {
"SERVER_NAME": "my-host.com",
"DATABASE_NAME": "my-database",
"READONLY": "true",
"AUTH_TYPE": "sql",
"TRUST_SERVER_CERTIFICATE": "true",
"SQL_USER": "sa",
"SQL_PASSWORD": "AmazingPassword"