Microsoft's New mCP server for SQL server
SQL MCP Server is a new, free, openâsource Microsoft component (part of Data API Builder 2.0) that exposes SQL Server and other databases to AI agents through the Model Context Protocol (MCP). It runs as a lightweight container with a single JSON config file and provides a secure, deterministic, schemaâabstracted interface for AI agentsâwithout letting models generate SQL directly.
đ§Š What SQL MCP Server is SQL MCP Server is Microsoftâs official MCP-compliant data access server for AI agents. It sits between your database and an AI model, exposing a fixed set of safe, deterministic tools instead of raw SQL or schema.
Key identity points:
- It is a feature of Data API Builder (DAB) 2.0.
- It implements the Model Context Protocol (MCP) so AI agents (ChatGPT, VS Code MCP extensions, etc.) can discover and call database operations safely.
- It supports SQL Server, Azure SQL, PostgreSQL, MySQL, and Cosmos DB as backends.
- It is designed for agentic workflowsâAI agents that need structured, reliable access to enterprise data.
đ¸ Is it free? Yes â completely free and open source, maintained by Microsoft.
- âBest of all, SQL MCP Server is open source and free. It runs in any cloud, including onâpremises.â
- No licensing cost, no perâagent cost, no DAB license cost.
đď¸ What does it need to run? At a high level, very little:
Minimal requirements
- A container runtime (Docker, Podman, Kubernetes, Azure Container Apps, etc.)
- A JSON configuration file describing your entities, permissions, and database connection.
- âSQL MCP Server is a simple MCR container that requires a JSON configuration file.â
- A database (SQL Server, Azure SQL, PostgreSQL, MySQL, Cosmos DB).
- Optional: Azure Key Vault, Redis, Azure Monitor, Application Insights, OpenTelemetry.
How you start it DAB 2.0 uses three CLI commands:
- dab init
- dab add
- dab start
Supported transports
- HTTP (streamable) for server/hosted scenarios
- stdio for local/CLI scenarios
đ What SQL MCP Server does (highâlevel) SQL MCP Server gives AI agents deterministic, secure, schemaâabstracted access to your data.
Deterministic query generation (NL2DAB, not NL2SQL) Microsoft intentionally avoids NLâSQL because LLMâgenerated SQL is errorâprone.
Instead, the model produces intent, and SQL MCP Server uses DABâs query builder to generate correct, deterministic TâSQL every time.Fixed âFamily of Sevenâ tools Instead of exposing thousands of tables, it exposes seven stable tools:
- describeentities â discover objects
- readrecords â query data
- createrecord
- updaterecord
- deleterecord
- executeentity â run stored procedures
- aggregaterecords
This keeps the agentâs context window small and predictable.
- Security-first design
- RBAC at the API layer
- Azure Key Vault integration
- Schema aliasing (agents never see real table names)
- DMLâonly (no schema changes allowed)
- Performance & observability
- L1/L2 caching with Redis
- Azure Monitor, Application Insights, OpenTelemetry instrumentation
- Zero-code deployment
You donât write controllers, ORMs, or SQL.
You configure entities in JSON and run the container.
đ§ Why this matters SQL MCP Server is essentially:
A Microsoftâsupported, productionâsafe bridge between your SQL Server and AI agentsâwithout exposing schema, without writing an API, and without trusting LLMs to generate SQL.
It replaces:
- Custom REST APIs
- Adâhoc NL2SQL agents
- Risky direct DB access
- Handârolled CRUD endpoints
And it integrates cleanly with your existing Entra ID, Key Vault, Redis, and Azure Monitor stack.