data-api-builder

作者 Azure已验证

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

1,493
Stars
361
Forks
C#
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/Azure/data-api-builder

快速入门

使用 data-api-builder 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Data API builder for Azure Databases

NuGet Package Nuget Downloads Documentation License: MIT

What's new?

Join the community

Want to be part of our priorities and roadmap? Sign up here.

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 SQLSQL ServerSQLDWCosmos DBPostgreSQLMySQL
SupportedYesYesYesYesYesYes

Which environments does Data API builder support?

On-PremAzureAWSGCPOther
SupportedYesYesYesYesYes

Which endpoints does Data API builder support?

RESTGraphQLMCP
SupportedYesYesYes

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.

常见问题

What is data-api-builder?

data-api-builder is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Azure. Data API builder provides modern REST, GraphQL endpoints and MCP tools to your Azure Databases and on-prem stores. It has 1,493 GitHub stars.

Is data-api-builder safe to use?

Yes. data-api-builder passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install data-api-builder?

Clone the repository with "git clone https://github.com/Azure/data-api-builder" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is data-api-builder written in?

data-api-builder is primarily written in C#. It is open-source under Azure on GitHub, so you can review or fork the full source.

Are there alternatives to data-api-builder?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh data-api-builder against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP 服务器
查看详情

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP 服务器
查看详情

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP 服务器
查看详情

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP 服务器
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情