Support Multiple Authentication Methods and Multi-Database Connections

Open
#79 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
azure, sql

Research direction

The issue names no files, tests, or entry points. Start by locating the server's authentication configuration and database connection setup, then define how the listed environment variables select credentials and how multiple connections are configured; done means the requested authentication methods and simultaneous database connections work together.

Written by the indexing model from the issue text.

Description

Problem Statement

Currently, the MCP server only supports a single authentication method at a time (either Azure AD or SQL Authentication), and
can only connect to one database per server instance.

Proposed Enhancements

  1. Support Multiple Authentication Methods
    The server should automatically detect and use the appropriate authentication method based on environment variables:
  • Azure AD Interactive Browser: If AZURE_AUTH_METHOD=interactive is set
  • Azure AD Default Credential: If AZURE_AUTH_METHOD=default is set (for managed identities, service principals)
  • Azure AD Service Principal: If AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET are set
  • SQL Authentication: If SQL_USER and SQL_PASSWORD are set
  • Windows Authentication: If WINDOWS_AUTH=true is set
  1. Support Multiple Database Connections
    Allow configuring multiple SQL Server instances/databases simultaneously, enabling users to:
  • Query across different databases
  • Work with multiple Azure SQL servers
  • Connect to both on-premises and cloud databases

Use Cases

  1. Development vs Production: Use different auth methods for local dev (SQL auth) vs Azure (Managed Identity)
  2. Multi-tenant applications: Connect to multiple customer databases
  3. Data migration/comparison: Query data across different SQL servers
Dominant language
HTML
Stars
331
Forks
208
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure-Samples/SQL-AI-samples

All issues in Azure-Samples/SQL-AI-samples

Similar issues

More Security issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.