Data API Builder
Data API builder provides modern REST, GraphQL endpoints and MCP tools to your Azure Databases and on-prem stores.
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
Maintainer
Works with
Installation
Manual Installation
npx data-api-builderConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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')
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 --versionInstall 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 --versionStore 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" > .envInitialize 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 developmentExpose 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:*"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/graphqlData 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.
Data API Builder Alternatives — Similar Databases Servers
Looking for alternatives to Data API Builder? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
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.
Set Up Data API Builder in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.