/microsoft-sql:azuresql-db-dabfrom Microsoft SQL
Generates a REST and GraphQL API over existing Azure SQL Database tables using Data API Builder (DAB) with no application code. Invoke when asked for an instant API over a database.
Ships in Microsoft SQL. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate a full REST and GraphQL API over the local Azure SQL Database container
(Private Preview) with no application code, using Data API Builder (DAB) -
Microsoft's first-party open-source engine. You describe tables as entities in
dab-config.json; DAB serves them. DAB connects over the normal TDS protocol
with a plain connection string, so no change tracking or special engine
feature is needed.
The generated dab-config.json keeps the environment-variable indirection rather than the
password, the /api and /graphql prefixes and the /mcp endpoint are defaults, and REST and
GraphQL return the same rows from a table in the container.
dab-rest-and-graphql.mcr.microsoft.com/mssql/server. SERVERPROPERTY('EngineEdition')
returns 5, SERVERPROPERTY('Edition') returns 'SQL Azure'.sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest
(x64, linux/amd64). Registry is private: sign in first with
docker login sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io using the shared
pull-only credentials from https://aka.ms/sqldbcontainerpreview-signup (they
may rotate). Registry and tag are provisional during Private Preview.ACCEPT_EULA=Y and a unique, caller-supplied complex
MSSQL_SA_PASSWORD (8+ chars, upper/lower/digit/symbol). Engine listens on 1433.CREATE DATABASE appdb on
a master connection before DAB connects with Database=appdb. Do not use
USE to switch databases (in a user-database session it returns
Msg 40508); select the database in the connection string.--platform linux/amd64.For the full engine model (readiness loop, vectors, troubleshooting) see the
azuresql-db-container skill. To start the container and provision appdb
first, use azuresql-db-container or azuresql-db-scaffold.
Two supported ways. Pick the CLI for local dev; pick the container to wire DAB into a compose stack. Open references/dab-snippets.md when you want that compose service rather than the CLI.
# CLI (.NET 8 required): installs the `dab` command. 2.1.5 is the release this skill and its siblings
# (dab-rest-and-graphql, dab-mcp-endpoint, deploy-dab-to-azure) were checked on; move all four together.
dotnet tool install --global Microsoft.DataApiBuilder --version 2.1.5
# later: dotnet tool update --global Microsoft.DataApiBuilder --version <new>
# Container image (alternative):
# mcr.microsoft.com/azure-databases/data-api-builder:2.1.5
DAB reads the complete, caller-supplied SQL_CONNECTION_STRING through
@env(), so no secret is written into dab-config.json. Use the host port your
container chose.
Build it from the same caller-supplied password and host port used by the SQL container:
set +x
: "${MSSQL_SA_PASSWORD:?Set MSSQL_SA_PASSWORD to the SQL container password}"
: "${HOST_PORT:?Set HOST_PORT to the SQL container host port}"
SQL_CONNECTION_STRING="Server=localhost,$HOST_PORT;Database=appdb;User Id=sa;"
SQL_CONNECTION_STRING+="Password=$MSSQL_SA_PASSWORD;TrustServerCertificate=true"
export SQL_CONNECTION_STRING
TrustServerCertificate=true is required for the container's self-signed cert.
appdb must exist before dab start, and this engine does not create it on connect. Create it on a
master connection, idempotently, in the same script that starts DAB, after the engine answers:
for i in $(seq 1 60); do
sqlcmd -S "localhost,$HOST_PORT" -U sa -P "$MSSQL_SA_PASSWORD" -C -d master -Q "SELECT 1" >/dev/null 2>&1 && break
sleep 2
done
sqlcmd -S "localhost,$HOST_PORT" -U sa -P "$MSSQL_SA_PASSWORD" -C -d master \n -Q "IF DB_ID('appdb') IS NULL CREATE DATABASE appdb;"
Without this, dab start logs Cannot open database "appdb" requested by the login and exits. A readiness
check alone does not fix that; the database has to be created.
# Initialize config in Development mode (enables Swagger + friendlier errors).
dab init --database-type mssql \
--connection-string "@env('SQL_CONNECTION_STRING')" \
--host-mode Development
# Expose a table as an entity. Repeat per table.
# --permissions is role:actions; "anonymous:*" allows all actions with no auth (dev only).
dab add Book --source dbo.Books --source.type table --permissions "anonymous:*"
# Serve REST + GraphQL (and the MCP endpoint) on loopback only.
ASPNETCORE_URLS=http://127.0.0.1:5000 dab start
appdb is just the example database name and Book/dbo.Books the example
entity/table; substitute your own. The entity name (Book) is what appears in
the API path; the --source is the real schema.table. The anonymous:*
permission is only for this loopback local demonstration.
With dab start running (default port 5000):
GET http://localhost:5000/api/Book (list), /api/Book/id/1 (by
key), plus POST / PATCH / PUT / DELETE. Query with
?$filter=, $select=, $orderby=, $first=, $after= (OData-style).POST http://localhost:5000/graphql - queries and mutations for
every entity, with relationship navigation.GET /api/openapi (document) and GET /swagger (UI,
Development mode only).GET /health.curl http://localhost:5000/api/Book
curl -s http://localhost:5000/graphql -H 'Content-Type: application/json' \
-d '{"query":"{ books { items { id title } } }"}'
DAB exposes related entities (e.g. an author's books) once you declare the
relationship. Config schema, permissions/policies, @env(), REST/GraphQL
options, and the exact dab update --relationship syntax are in
references/dab-config-reference.md; open it when declaring a
relationship or changing permissions, policies, or API options.
DAB 2.x (checked on 2.1.5) also serves a built-in MCP endpoint
from the same dab-config.json, at http://localhost:5000/mcp by default,
enabled by default. This is an additional API surface Data API Builder provides
over your configured entities - it is not, and should not be presented as, a
standalone "MSSQL MCP server." How to point an MCP client at it and how to
scope the exposed tools is in references/dab-mcp.md; open it when a user
asks to point an MCP client at DAB, or to narrow which entities it exposes.
REST, GraphQL, and MCP use the same entity permissions. Once the endpoint is
hosted rather than on loopback, connecting a remote client, its authentication
and tool curation belong to dab-mcp-endpoint, and hosting DAB in Azure to
deploy-dab-to-azure.
mcr.microsoft.com/mssql/server.appdb exists (created on a master connection) BEFORE dab start; DAB's
connection string uses Database=appdb and TrustServerCertificate=true.@env('SQL_CONNECTION_STRING'), not
hardcoded into dab-config.json.anonymous:* local demonstration listens only on 127.0.0.1.dab start serves REST at /api/<Entity> and GraphQL at /graphql; a GET
on the entity returns rows from the container.mcr.microsoft.com/mssql/server; this is the Azure SQL engine.appdb; provision it on a master connection first.appdb idempotently on a master connection instead, and say plainly when a step destroys data.dab-config.json; use @env('SQL_CONNECTION_STRING').anonymous:* remotely reachable. A shared service requires token
validation or an authenticating gateway that blocks direct DAB access, with
scoped permissions; Simulator is not shared-service authentication.TrustServerCertificate=true (the container uses a self-signed cert) or --platform linux/amd64 on a non-x64 host.dab-config.json, connection handling, entities, permissions, policies, API settings, or relationships.Authoritative, version-pinned references for the tools this skill uses (read the one you need):
dab validate checks against, and the one dab init 2.1.5 writes into dab-config.json. Bump this URL together with the CLI version above.If the Microsoft Learn MCP server is configured, use mcp__microsoft-learn__microsoft_docs_search or mcp__microsoft-learn__microsoft_docs_fetch to fetch the current version of any of these on demand. It is optional; when it is unavailable, the references above are authoritative.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub microsoft/microsoft-sql --plugin microsoft-sql54 skills in this plugin
/azure-functions-sql-bindingsUse when wiring Azure Functions to Azure SQL Database: a serverless CRUD API with SQL input or output bindings, SqlTrigger on row changes, a SQL trigger that never fires, an output binding that updated instead of inserting./azure-sqlUse when Azure SQL Database comes up without a specific task: what it can do today, GA or preview, which tier, tool or skill fits, current limits and defaults. Routes to the owning skill. Not Managed Instance or SQL Server./azuresql-db-authUse when an app connects to the local Azure SQL Database container as sa: create a least-privilege user, choose auth per environment, keep the connection string out of source (user-secrets, Key Vault).2 plugins in one repository ship this exact skill · first indexed Nov 26, 2026
Other plugins' skills for the same job