Skip to content

Browser opens for authentication while using sql or windows auth type #71

Open

Description

@christophedemey

Hi

How do we circumvent this behaviour, this is not required for windows or sql authentication.

Thanks

Activity

  1. TjWheeler commented on Sep 19, 2025

    @TjWheeler

    Are you using Linux/WSL?
    If so, I got this to work by:

    1. install dotnet in WSL
    2. Clone repo and build the dotnet version
    3. 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"
    			}
    		 }
    }
  2. christophedemey commented on Sep 19, 2025

    @christophedemey
    Author

    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"
    			
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions