MCP Servers

A collection of Model Context Protocol servers, templates, tools and more.

Enterprise-grade MCP server for Azure SQL with Azure AD auth, 34 tools, tiered safety gates, and multi-agent support

Created 4/8/2026
Updated about 5 hours ago
Repository documentation and setup instructions

mcp-azure-sql

Azure SQL + AI agents. 34 tools. One command.

npm  Release  Go  34 Tools  MCP

Enterprise MCP server for Azure SQL & SQL Server.
Azure AD auth • Tiered safety gates • Zero dependencies • Written in Go.

Anthropic-Claude-D97706?style=flat-square&logo=anthropic&logoColor=white - MCP Azure Sql by albahubio OpenAI-Codex-412991?style=flat-square&logo=openai&logoColor=white - MCP Azure Sql by albahubio Google-Gemini-4285F4?style=flat-square&logo=google&logoColor=white - MCP Azure Sql by albahubio GitHub-Copilot-000?style=flat-square&logo=github&logoColor=white - MCP Azure Sql by albahubio Cursor-00D1B2?style=flat-square - MCP Azure Sql by albahubio Windsurf-09B6A2?style=flat-square - MCP Azure Sql by albahubio Cline-007ACC?style=flat-square - MCP Azure Sql by albahubio Continue-FF6F00?style=flat-square - MCP Azure Sql by albahubio


Quick Start

  1   Add to your AI agent

CLI agents — one command, done:

# Claude Code (Anthropic)
claude mcp add --transport stdio --scope user azure-sql -- npx -y mcp-azure-sql

# Codex CLI (OpenAI)
codex mcp add azure-sql -- npx -y mcp-azure-sql

# Gemini CLI (Google)
gemini mcp add -s user azure-sql npx -y mcp-azure-sql

IDE agents — add this JSON block to your agent's config file:

{
  "azure-sql": {
    "command": "npx",
    "args": ["-y", "mcp-azure-sql"],
    "env": {
      "AZURE_SQL_CONFIG_FILE": "~/.config/azure-sql-mcp/connections.json"
    }
  }
}
Where does this go? (click to expand)

| Agent | File | Key | |:------|:-----|:----| | Copilot | VS Code settings.json | "mcp" > "servers" | | Cursor | ~/.cursor/mcp.json | "mcpServers" | | Windsurf | ~/.codeium/windsurf/mcp_config.json | "mcpServers" | | Cline | Cline Settings UI or cline_mcp_settings.json | "mcpServers" | | Continue | ~/.continue/config.yaml | mcpServers: (YAML) | | Claude | claude_desktop_config.json | "mcpServers" |

  2   Configure your databases

Create ~/.config/azure-sql-mcp/connections.json:

{
  "defaults": { "auth": "azuread" },
  "connections": [
    {
      "name": "dev",
      "server": "myserver.database.windows.net",
      "database": "myapp-dev",
      "environment": "dev"
    },
    {
      "name": "prod",
      "server": "myserver.database.windows.net",
      "database": "myapp-prod",
      "environment": "prod",
      "prod": true
    }
  ]
}

See example-config.json for SQL auth, connection strings, and all options.

  3   Sign in to Azure

az login

  ✓   Done

Restart your AI agent. You now have 34 database tools.


Tools

Query & Executequeryexecute
Schemalist_tablesdescribe_tabledescribe_indexesdescribe_foreign_keyssearch_columnstable_row_countssearch_objectsdescribe_triggers
Views / Procs / Functionslist_viewsdescribe_viewlist_stored_procsdescribe_sproclist_functionsdescribe_function
Performanceexplain_queryactive_querieslong_running_queriestop_queries_by_cpuwait_statsblocking_chainsindex_usage_statsmissing_indexestable_statistics_healthdatabase_size
Connectionslist_connectionstest_connectionconnection_infoadd_connection
Compliancecompare_tablesef6_migration_statuspermission_audithangfire_dashboard

Safety

Your AI agent cannot accidentally destroy production.

| | query | execute on dev | execute on prod | |:--|:--|:--|:--| | SELECT | ✓ | — | — | | INSERT / UPDATE / DELETE | ✗ | confirm=true | confirm=true | | DROP / TRUNCATE / ALTER | ✗ | confirm=true | Blocked | | EXEC / {call} | ✗ | confirm=true | confirm=true |

Production = any connection with "prod": true or "environment": "prod".


Authentication

| Mode | When to use | |:--|:--| | azuread (default) | Azure SQL via az login, managed identity, or service principal | | sql | Legacy SQL Server — add "user" and "password" to connection | | connstr | Custom — add "connection_string" with full connection string |


Why Go?

| | Go | TypeScript / Python | |:--|:--|:--| | Startup | ~5ms | 500ms+ | | Binary | Single 16MB file | Runtime + packages | | Memory | ~15MB | 80MB+ | | Install | Download → run | npm install + Node.js | | Azure AD | Native driver | @azure/identity shim | | Concurrency | Goroutines | Event loop / GIL |


Configuration reference

Config file

{
  "defaults": { "auth": "azuread", "app_name": "my-app" },
  "connections": [{
    "name": "unique-name",
    "server": "server.database.windows.net",
    "database": "dbname",
    "auth": "azuread",
    "environment": "dev",
    "description": "Human-readable note",
    "prod": false
  }]
}

Environment tags: dev sqa qa beta delta test preprod prod

Environment variables

# Legacy (no config file needed)
export AZURE_SQL_CONNECTIONS="dev=server.database.windows.net/mydb;qa=qaserver.database.windows.net/qadb"

# Override production list
export AZURE_SQL_PROD_CONNECTIONS="my-prod-db,my-staging-db"
Architecture
AI Agent  ──stdio/JSON-RPC──>  mcp-azure-sql  ──Azure AD──>  Azure SQL
                                    │
                                    ├── 34 tools with MCP annotations
                                    ├── Tiered safety (read/write/dangerous)
                                    ├── Connection pool (30s ping skip)
                                    ├── Audit logging
                                    └── Error sanitization

Built with mcp-go + go-mssqldb. MCP protocol 2024-11-05. Tool annotations (ReadOnlyHint, DestructiveHint, IdempotentHint, OpenWorldHint) on all 34 tools. Logging capability enabled.

Development & releases
go build -o mcp-azure-sql .
go vet ./...
./mcp-azure-sql --version

Release: git tag v1.3.0 && git push origin v1.3.0 → GitHub Actions builds 6 platform binaries via GoReleaser → npm auto-publishes.


Albahub, LLCMIT License

Quick Setup
Installation guide for this server

Installation Command (package not published)

git clone https://github.com/albahubio/mcp-azure-sql
Manual Installation: Please check the README for detailed setup instructions and any additional dependencies required.

Cursor configuration (mcp.json)

{ "mcpServers": { "albahubio-mcp-azure-sql": { "command": "git", "args": [ "clone", "https://github.com/albahubio/mcp-azure-sql" ] } } }