Microsoft's official open-source tool that turns Azure SQL, Cosmos DB, Postgres, or MySQL into REST + GraphQL + MCP endpoints — config file, no code.
Data API Builder (DAB) is the Azure-supported way to put your relational or NoSQL store behind well-known protocols, including MCP. You write a JSON config that lists entities, relationships, and policies; DAB starts a process that exposes them as REST, GraphQL, and (since 2026) MCP tools. It supports Azure SQL, SQL Server, Cosmos DB (NoSQL + PostgreSQL), Postgres, MySQL, and Azure Data Lake. Auth via Static Web Apps, Easy Auth, or JWT.
claude mcp add azure-data-api-builder-mcp -- docker run --rm -i -v ${PWD}/dab-config.json:/App/dab-config.json:ro -e DAB_ENVIRONMENT=Production mcr.microsoft.com/azure-databases/data-api-builder:latest --ConfigFileName /App/dab-config.json
One-liner. Verify with claude mcp list. Remove with claude mcp remove.
Use Cases
Real-world ways to use Azure Data API Builder (MCP)
Expose an Azure SQL database to Claude with role-based access
👤 Azure-shop teams; analysts who need to query, not just dump⏱ ~30 minintermediate
When to use: You have an internal Azure SQL DB and want the AI agent to read it with strict per-table permissions, not god-mode admin.
Prerequisites
Azure SQL connection string — From Azure Portal → SQL DB → Connection strings
Docker installed locally — Docker Desktop or any OCI runtime
Flow
Generate dab-config.json
Create a DAB config that exposes the Customers and Orders tables read-only over MCP. Connect to my Azure SQL via env var DAB_CONN.✓ Copied
→ dab-config.json written with both entities and actions: ["read"]
Run locally
Spin up DAB locally via Docker on port 5000 and verify the MCP endpoint responds.✓ Copied
→ GET /api/Customers returns rows; MCP tool list shows entities
Hook into Claude
Add the local DAB MCP to my Claude config and ask: 'Top 10 customers by orders in 2026.'✓ Copied
→ Claude returns the result by composing read calls
Outcome: Claude can query the database within strict, configured boundaries, not via direct SQL.
Pitfalls
Azure SQL firewall blocks the local Docker IP — Allow your IP in Azure Portal → SQL Server → Networking, or run DAB inside Azure
Wrap Cosmos DB NoSQL behind a GraphQL+MCP layer
👤 Teams already on Cosmos who want LLM access without a custom API⏱ ~40 minadvanced
When to use: You have a Cosmos NoSQL container and need read/write access from Claude with field-level policies.
Prerequisites
Cosmos DB account + container — From Azure Portal — note the connection string and database/container names
Flow
Configure entity
Add an entity for Cosmos container products with a JSON schema mapped from the actual docs. Allow read+update; require role 'editor' for updates.✓ Copied
→ Updated dab-config.json with permissions block
Set Easy Auth
Add a JWT auth provider config with the issuer of my Entra tenant.✓ Copied
→ Authentication block added; DAB enforces it
Verify policies
Try a write as anonymous (should fail), then with editor token (should succeed).✓ Copied
→ 401 then 200 — proves policies enforced
Outcome: A safe Cosmos surface for Claude — reads open, writes gated.
Pitfalls
Cosmos schema is dynamic but DAB requires GraphQL types — Provide a GraphQL schema file; DAB falls back to REST if you don't
Expose a stored procedure as an MCP tool
👤 DBAs with hardened business logic in TSQL⏱ ~25 minadvanced
When to use: Existing stored procedures encode business rules and you'd rather expose those to Claude than direct table access.
Flow
Define the entity
In dab-config, add entity GetSalesByRegion of type stored-procedure pointing to dbo.usp_GetSalesByRegion. Map parameters to MCP tool inputs.✓ Copied
→ Stored proc shows up as a callable MCP tool
Test
Call GetSalesByRegion for region='APAC', period='2026Q1'.✓ Copied
→ Result rows returned
Outcome: Business logic stays in the DB, AI just calls it.
Pitfalls
Stored proc returns multiple result sets — DAB returns the first; refactor to a single set or split into multiple procs