Data API Builder

v1.0.0Databasesstable

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

apiazuredatabasegraphqlhacktoberfest
Share:
1,414
Stars
0
Downloads
0
Weekly
0/5

What is Data API Builder?

Data API Builder is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to data api builder provides modern rest, graphql endpoints and mcp tools to your azure databases and on-prem stores.

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

This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Data API builder provides modern REST, GraphQL endpoints and

Use Cases

REST and GraphQL endpoints for databases
Azure and on-prem data access
Azure

Maintainer

LicenseMIT
Languagec#
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx data-api-builder

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Data API Builder

Data API Builder (DAB) is an open-source, no-code tool from Microsoft that automatically generates secure REST and GraphQL endpoints for Azure databases and on-premises data stores, including Azure SQL, SQL Server, Cosmos DB, PostgreSQL, MySQL, and Azure Synapse. It runs as a container and requires only a JSON configuration file to expose full CRUD operations on your database tables, views, and stored procedures — with built-in authentication, authorization, CORS, and relationship support. Data engineers and application developers use it to add a fully featured data API layer to an existing database in minutes without writing any backend code.

Prerequisites

  • .NET runtime version 8 or later (required by the DAB CLI)
  • An existing database: Azure SQL, SQL Server, Azure Cosmos DB, PostgreSQL, or MySQL
  • The 'dab' CLI tool installed globally via dotnet tool install
  • A connection string for your database with appropriate permissions
  • An MCP-compatible client to interact with DAB's MCP endpoint (MCP support listed as 'coming soon')
1

Install the .NET runtime

Data API Builder requires .NET 8 or later. Download and install it from get.dot.net, then verify the installation.

# Install from https://get.dot.net
dotnet --version
2

Install the dab CLI

Install the Data API Builder command line tool as a global dotnet tool.

dotnet tool install microsoft.dataapibuilder -g

# Verify installation
dab --version
3

Store your connection string in a .env file

Create a .env file with your database connection string. DAB reads it at startup. Add .env to your .gitignore to keep secrets out of source control.

# bash / macOS / Linux
echo "my-connection-string=$database_connection_string" > .env

# PowerShell (Windows)
echo "my-connection-string=$env:database_connection_string" > .env
4

Initialize the DAB configuration file

Run 'dab init' to generate a dab-config.json file. Specify your database type and reference the connection string from the .env file. Use --host-mode development to enable Swagger for REST and GraphQL introspection.

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

Expose a database table as an API entity

Use 'dab add' to register a table (or view or stored procedure) as an API entity. This updates dab-config.json with the entity definition and permission rules.

dab add Todo \
  --source "dbo.Todo" \
  --permissions "anonymous:*"
6

Start the Data API Builder server

Run 'dab start' to launch the REST and GraphQL endpoints. In development mode, a Swagger UI is available at /swagger and a GraphQL playground at /graphql.

dab start
# REST endpoint: https://localhost:5001/api/Todo
# GraphQL endpoint: https://localhost:5001/graphql

Data API Builder Examples

Client configuration

Add Data API Builder as an MCP server in Claude Desktop once MCP transport support is available. This configuration targets a locally running DAB instance.

{
  "mcpServers": {
    "data-api-builder": {
      "command": "npx",
      "args": ["data-api-builder"],
      "env": {
        "DAB_ENVIRONMENT": "Development",
        "DATABASE_CONNECTION_STRING": "Server=localhost;Database=mydb;Trusted_Connection=True;"
      }
    }
  }
}

Prompts to try

These prompts work when querying a DAB-exposed REST or GraphQL endpoint from an AI assistant.

- "Query all incomplete Todo items from the DAB REST endpoint and summarize them."
- "Write a GraphQL mutation to insert a new Todo item with title 'Review PR' and IsCompleted false."
- "Generate a dab-config.json for a PostgreSQL database exposing the Products and Orders tables with read-only anonymous access."
- "Explain the difference between using --permissions 'anonymous:read' vs 'authenticated:*' in a DAB entity definition."
- "Add a relationship between the Orders entity and the Customers entity in the DAB configuration."

Troubleshooting Data API Builder

'dab' command not found after installation

The dotnet tools directory may not be in your PATH. Add it: on macOS/Linux add 'export PATH="$PATH:$HOME/.dotnet/tools"' to your shell profile (.zshrc or .bashrc). On Windows the tools are typically installed to %USERPROFILE%\.dotnet\tools which should be in PATH by default after a new terminal session.

Connection string authentication errors when starting DAB

Verify the connection string in your .env file is correct and the database user has SELECT/INSERT/UPDATE/DELETE permissions on the exposed tables. For Azure SQL with managed identity, ensure the DAB process identity has been granted database access. Test the connection string independently with sqlcmd or psql before using it with DAB.

Swagger UI or GraphQL endpoint returns 404 in production mode

Swagger and GraphQL introspection are only enabled in development mode (--host-mode development). In production mode, set 'graphql.allow-introspection' to false in dab-config.json as a security best practice. To re-enable Swagger in production, explicitly set 'rest.enabled' to true and reconsider your security posture.

Frequently Asked Questions about Data API Builder

What is Data API Builder?

Data API Builder is a Model Context Protocol (MCP) server that data api builder provides modern rest, graphql endpoints and mcp tools to your azure databases and on-prem stores. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Data API Builder?

Follow the installation instructions on the Data API Builder GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Data API Builder?

Data API Builder works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Data API Builder free to use?

Yes, Data API Builder is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Databases MCP Servers

Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "data-api-builder": { "command": "npx", "args": ["-y", "data-api-builder"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Data API Builder?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides