Data API Builder logo

Data API Builder

Exposes configured databases through MCP, REST, and GraphQL endpoints across cloud and on-premises environments.

Install Data API Builder

Run the project’s own setup commands, in order.

Setup steps from the project

data-api-builder installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    dotnet tool install microsoft.dataapibuilder -g
    
  2. 2. Start the server
    dab start
    

Overview

The data-api-builder MCP server connects AI agents and applications to configured database entities through MCP, REST, and GraphQL interfaces. It supports Azure SQL, SQL Server, SQLDW, Cosmos DB, PostgreSQL, and MySQL, and can run on Azure, other clouds, or on-premises. A JSON configuration defines the data source, entities, endpoint settings, and permissions. Reach for it when you need a containerized CRUD data API over existing tables, views, or stored procedures.

Use cases

  • Expose database tables to AI agents through MCP
  • Generate REST and GraphQL APIs for existing data
  • Configure role-based access to database entities
  • Run a local data API during development
  • Deploy a database API in a container

Key features

  • MCP, REST, and GraphQL endpoint support
  • Azure SQL, SQL Server, SQLDW, Cosmos DB, PostgreSQL, and MySQL connectivity
  • Tables, views, and stored procedure entities
  • Role- and action-based permissions
  • Cross-platform .NET command-line tooling
  • Local and containerized deployment

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1.6kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.

How Data API Builder works

What data-api-builder does

data-api-builder is an open-source data API engine that turns configured database objects into API-accessible entities. It supports MCP alongside REST and GraphQL, allowing the same data source to serve agent tools and application clients. The engine is designed as a no-code CRUD layer rather than a separate application-specific service.

Supported database types include Azure SQL, SQL Server, SQLDW, Azure Cosmos DB, PostgreSQL, and MySQL. Data API builder can be deployed on Azure, AWS, GCP, other cloud environments, or on-premises. Entity definitions can refer to tables, views, and stored procedures.

How it works

At startup, the engine reads its JSON configuration and inspects the connected database for metadata. When a request arrives, it authorizes the request, translates the operation into a database query, sends it to the data source, and returns the result as JSON or through the relevant protocol interface.

The configuration controls which entities are exposed and how they appear through REST and GraphQL. Permissions are assigned by role and action, so access can be scoped to operations such as reading or modifying an entity. Endpoint paths, authentication, CORS, and development-mode behavior are also configured in the runtime section.

Setup and configuration

The command-line interface requires .NET 8 or later. Install the cross-platform dab tool with:

sh
dotnet tool install microsoft.dataapibuilder -g

Create a database connection and a dab-config.json file. The dab init command can generate an initial configuration with a selected database type, a connection string, and a host mode. Connection strings can reference process environment variables through .env files; keeping those files out of source control helps protect credentials.

Use dab add to register a table, view, or stored procedure as an entity and assign its permissions. Running dab start launches the service. In development mode it runs locally; production deployments run in a container. The default example exposes REST under /api, GraphQL under /graphql, and a health endpoint at /health. Development mode also enables Swagger and the GraphQL Nitro interface.

Tools and capabilities

  • Provides MCP tools for configured database access.
  • Generates REST endpoints for configured entities.
  • Generates GraphQL endpoints with configurable singular and plural entity names.
  • Supports CRUD access to tables, views, and stored procedures.
  • Applies role-based entity permissions and configured authentication.
  • Runs as a local development process or a containerized service.

Limitations and notes

The service depends on a valid JSON configuration file, and the CLI expects that file to be named dab-config.json in the working directory by default. Database credentials must be supplied through the connection configuration or referenced environment variables. The available data and operations depend on the configured entities, permissions, and capabilities of the selected database.

The example configuration uses development mode and permissive anonymous access for demonstration. Production deployments should define authentication and narrower permissions appropriate to the data. The project is licensed under MIT and is available at no charge.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Data API Builder

data-api-builder is an MCP server that connects AI agents to Azure SQL, SQL Server, SQLDW, Cosmos DB, PostgreSQL, and MySQL through configured data sources. Its main tools provide MCP access to configured database entities, while the same engine can expose REST and GraphQL endpoints.

Install .NET 8 or later, then run `dotnet tool install microsoft.dataapibuilder -g`. Use the installed `dab` command to initialize configuration, add database entities, and start the service.

data-api-builder supports Azure SQL, SQL Server, SQLDW, Azure Cosmos DB, PostgreSQL, and MySQL. Its configuration selects the database type and connection string used by the data API engine.

Create a `dab-config.json` file with the data source, connection string, runtime settings, entities, and permissions. Connection strings can reference environment variables, and `dab init` can create the initial configuration.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewData API Builder AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/data-api-builder?style=directory)](https://allmcps.com/mcp/data-api-builder)
HTML Embed
<a href="https://allmcps.com/mcp/data-api-builder"><img src="https://allmcps.com/api/badge/data-api-builder?style=directory" alt="Data API Builder on AllMCPs" /></a>