Data API Builder

DatabasesCloud and DevOps

Data API builder provides modern REST, GraphQL endpoints and MCP tools to your Azure Databases and on-prem stores.

Your AI app calls the Data API Builder MCP server, which does the databases and cloud and DevOps work and sends the result back to the chat.

About Data API Builder

Data API Builder is the official MCP server from Azure, filed in our directory under databases and cloud and devops. Data API builder provides modern REST, GraphQL endpoints and MCP tools to your Azure Databases and on-prem stores.

At a glance

Publisher
Azure, the company behind the product
Runs
See the README for setup
Written in
C#
License
MIT
GitHub stars
1,553

How to set up Data API Builder

  1. Follow the install steps in the Data API Builder README; it is written in C#, so have that toolchain ready.
  2. Check the Data API Builder README for keys or settings; the registry lists none that Data API Builder requires.
  3. Add Data API Builder to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Data API Builder tools to confirm the connection.
  5. Run one read-only task with Data API Builder first, and keep your app asking before each tool call until the results look right.

Data API Builder compared with similar servers

  • MySQL (designcomputer) by designcomputer has fewer GitHub stars than Data API Builder (1.4k against 1.6k); Data API Builder is official while MySQL (designcomputer) is a community server, and both run locally.
  • Qdrant by qdrant has more GitHub stars than Data API Builder (1.6k against 1.6k); both are official servers, and both run locally.
  • Magic Cloud by polterguy has fewer GitHub stars than Data API Builder (1.3k against 1.6k); Data API Builder is official while Magic Cloud is a community server, and both run locally.

Before you connect Data API Builder

  • Give Data API Builder its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Data API Builder tool call until you trust what it does with them.
  • Treat text that Data API Builder fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Data API Builder on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Data API Builder

How marketing and sales teams put Data API Builder to work, by company size. Pick the size closest to yours and start Data API Builder on one use case.

Small business

  • A small business with its own app can ask Data API Builder plain questions about customers and orders, without writing SQL.
  • Owners can use Data API Builder to pull a list of customers who haven't bought in 90 days and plan a win-back email.
  • A small business can ask Data API Builder why the site is slow or down and get the likely cause in plain words.
  • Data API Builder runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing analysts can connect Data API Builder to answer campaign questions from the warehouse directly, instead of waiting on the data team's queue.
  • Lifecycle teams can use Data API Builder to build audience lists from product data and check counts before a send.
  • Web teams can connect Data API Builder to watch deploys during a launch and roll back fast if a campaign page breaks.
  • Start Data API Builder on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should point Data API Builder at a read replica with a read-only role, so agents query freely without risk to production data.
  • Data teams can expose curated views through Data API Builder, so marketing gets self-serve answers without access to raw customer tables.
  • Enterprises should give Data API Builder read access first, with changes gated by the same approvals as any infrastructure change.
  • Because Data API Builder comes from Azure, the company behind the product, it follows that product's own auth and permissions, which security teams usually prefer.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Data API Builder README

From Azure/data-api-builder on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Data API builder for Azure Databases

What's new?

Join the community

Want to be part of our priorities and roadmap? Sign up forms.office.com/pages.

About Data API builder

Data API builder (DAB) is an open-source, no-code tool that creates secure, full-featured REST and GraphQL endpoints for your database. It’s a CRUD data API engine that runs in a container, on Azure, any other cloud, or on-premises. DAB is built for developers with integrated tooling, telemetry, and other productivity features.

[!IMPORTANT] Data API builder (DAB) is open source and always free.

Which databases does Data API builder support?
Azure SQL SQL Server SQLDW Cosmos DB PostgreSQL MySQL
Supported Yes Yes Yes Yes Yes Yes
Which environments does Data API builder support?
On-Prem Azure AWS GCP Other
Supported Yes Yes Yes Yes Yes
Which endpoints does Data API builder support?
REST GraphQL MCP
Supported Yes Yes Yes

Getting started

Use the Getting Started tutorial to quickly explore the core tools and concepts.

1. Install the dotnet command line

https://get.dot.net

[!NOTE] You may already have .NET installed!

The Data API builder (DAB) command line requires the .NET runtime version 8 or later.

Validate your installation
dotnet --version
2. Install the dab command line

The Data API builder (DAB) command line is cross-platform and intended for local developer use.

dotnet tool install microsoft.dataapibuilder -g
Validate your installation
dab --version
3. Create your database (example: Azure SQL database / T-SQL)

This example uses a single table for simplicity.

CREATE TABLE dbo.Todo
(
    Id INT PRIMARY KEY IDENTITY,
    Title NVARCHAR(500) NOT NULL,
    IsCompleted BIT NOT NULL DEFAULT 0
);
INSERT dbo.Todo (Title, IsCompleted)
VALUES
    ('Walk the dog', 0),
    ('Feed the fish', 0),
    ('Clean the cat', 1);
4. Prepare your connection string

Data API builder (DAB) supports .env files for testing process-level environment variables.

PowerShell (Windows)
echo "my-connection-string=$env:database_connection_string" > .env
cmd.exe (Windows)
echo my-connection-string=%database_connection_string% > .env
bash (macOS/Linux)
echo "my-connection-string=$database_connection_string" > .env
Resulting .env file

The file .env is automatically created through this process. These are the resulting contents:

"my-connection-string=$env:database_connection_string" 

[!NOTE] Be sure and replace database_connection_string with your actual database connection string.

[!IMPORTANT] Adding .env to your .gitignore file will help ensure your secrets are not added to source control.

5. Create your initial configuration file

Data API builder (DAB) requires a JSON configuration file. Use dab --help for syntax options.

dab init
  --database-type mssql
  --connection-string "@env('my-connection-string')"
  --host-mode development

[!NOTE] Including --host-mode development enables Swagger for REST and Nitro for GraphQL.

Resulting configuration

The file dab-config.json is automatically created through this process. These are the resulting contents:

{
  "$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.5.56/dab.draft.schema.json",
  "data-source": {
    "database-type": "mssql",
    "connection-string": "@env('my-connection-string')",
    "options": {
      "set-session-context": false
    }
  },
  "runtime": {
    "rest": {
      "enabled": true,
      "path": "/api",
      "request-body-strict": true
    },
    "graphql": {
      "enabled": true,
      "path": "/graphql",
      "allow-introspection": true
    },
    "host": {
      "cors": {
        "origins": [],
        "allow-credentials": false
      },
      "authentication": {
        "provider": "AppService"
      },
      "mode": "development"
    }
  },
  "entities": { }
}
6. Add your table to the configuration
dab add Todo
  --source "dbo.Todo"
  --permissions "anonymous:*"

[!NOTE] DAB supports tables, views, and stored procedures. When the type is not specified, the default is table.

Resulting configuration

The entities section of the configuration is no longer empty:

{
  "entities": {
    "Todo": {
      "source": {
        "object": "dbo.Todo",
        "type": "table"
      },
      "graphql": {
        "enabled": true,
        "type": {
          "singular": "Todo",
          "plural": "Todos"
        }
      },
      "rest": {
        "enabled": true
      },
      "permissions": [
        {
          "role": "anonymous",
          "actions": [
            {
              "action": "*"
            }
          ]
        }
      ]
    }
  }
}
7. Run Data API builder

In production, DAB runs in a container. In development, it’s locally self-hosted.

dab start

[!IMPORTANT] The DAB CLI assumes your configuration file is called dab-config.json and is in the local folder.

8. Access your data!

By default, DAB enables both REST and GraphQL.

GET http://localhost:5000/api/Todo

[!NOTE] Change the URL to match your port if it is different.

Other things you should try
  • DAB’s Health endpoint: http://localhost:5000/health
  • DAB’s Swagger UI: http://localhost:5000/swagger
  • DAB’s Nitro UI: http://localhost:5000/graphql

How does it work?

DAB dynamically creates endpoints and translates requests to SQL, returning JSON.

sequenceDiagram
  actor Client as Client
  participant Endpoint as Endpoint
  participant QueryBuilder as QueryBuilder
  participant DB as Database

  %% Initialization / Warming up section (light grey)
  rect rgba(120,120,120,0.10)
    Endpoint -->>+ Endpoint: Read Config
    Endpoint ->> DB: Query Metadata
    DB -->> Endpoint: Metadata Response
    Endpoint ->>- Endpoint: Start Engine
  end

  %% Request/Response section (very light purple)
  rect rgba(180,150,255,0.11)
    Client ->>+ Endpoint: HTTP Request
      Endpoint ->> Endpoint: Authorize
    Endpoint ->> QueryBuilder: Invoke
    QueryBuilder -->> Endpoint: SQL Query
      Endpoint ->> DB: Submit Query
      DB -->> Endpoint: Data Response
    Endpoint -->>- Client: HTTP Response
  end

Additional resources

References
How to contribute

To contribute, see these documents:

Third-party component notice

Nitro (formerly Banana Cake Pop by ChilliCream, Inc.) may optionally store work in its cloud service via your ChilliCream account. Microsoft is not affiliated with or endorsing this service. Use at your discretion.

Trademarks

This project may use trademarks or logos. Use of Microsoft trademarks must follow Microsoft’s Trademark & Brand Guidelines. Use of third-party marks is subject to their policies.

Questions about Data API Builder

What is the Data API Builder MCP server?

Data API builder provides modern REST, GraphQL endpoints and MCP tools to your Azure Databases and on-prem stores. Data API Builder is published by Azure, the company behind the product, on GitHub at Azure/data-api-builder, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Data API Builder MCP server?

Data API Builder doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (Azure/data-api-builder). Like most servers, Data API Builder ends with a command or URL you paste into your AI app's MCP config.

Does Data API Builder need an API key?

The registry lists no required keys for Data API Builder. Check the Data API Builder README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Data API Builder an official MCP server?

Yes. Data API Builder is published by Azure, the company that makes the product it connects to, so it follows that product's own API and auth.

What license is Data API Builder under?

Data API Builder is released under the MIT license, according to its GitHub repository. The license covers the code of Data API Builder; the service it connects to has its own terms.