| name | data-api-builder-mcp |
| description | Enable and secure Data API Builder MCP endpoints so AI agents can query databases through DAB tools. Use when asked to set up /mcp, client config, or MCP tool restrictions. |
| license | MIT |
Data API Builder MCP
This skill configures MCP access through DAB (v1.7+). MCP is part of DAB, not a separate server product.
Included script template
When to use
- Enable
/mcp endpoint
- Configure MCP client access (for example
.vscode/mcp.json)
- Restrict agent write/delete capabilities
- Deploy MCP-capable DAB locally
Fast setup
- Install/upgrade DAB prerelease (1.7+)
- Ensure
runtime.mcp.enabled: true
- Add entities + permissions
- Validate and start
- Connect MCP client to
/mcp
dotnet tool update microsoft.dataapibuilder --prerelease
dab validate && dab start
Minimal MCP runtime block
"runtime": {
"mcp": {
"enabled": true,
"path": "/mcp"
}
}
Client config example (VS Code)
{
"servers": {
"my-database": {
"type": "http",
"url": "http://localhost:5000/mcp"
}
}
}
Security model
MCP operations still use DAB RBAC and entity abstraction.
- Table/view operations:
create, read, update, delete
- Stored procedure operations:
execute
- Restrict globally or per-entity with
mcp.dml-tools
Example: disable delete globally:
dab configure --runtime.mcp.dml-tools.delete-record false
Troubleshooting (syntax gotchas)
Wrong endpoint path
# WRONG
http://localhost:5000/api
# CORRECT
http://localhost:5000/mcp
Wrong client transport assumptions
Use MCP over HTTP with an MCP URL (not GraphQL/REST URLs):
{
"servers": {
"my-database": {
"type": "http",
"url": "http://localhost:5000/mcp"
}
}
}
Stored procedure permission mismatch
dab add GetReport --source dbo.usp_GetReport --source.type stored-procedure --permissions "anonymous:read"
dab add GetReport --source dbo.usp_GetReport --source.type stored-procedure --permissions "anonymous:execute"
DML tool key names are hyphenated
dab configure --runtime.mcp.dml-tools.delete-record false
Description quality for AI
Add meaningful descriptions to entities/fields so agents reason better.
dab update Products --description "Product catalog with price and inventory"
Deployment notes
- Local: Docker/Aspire +
http://localhost:5000/mcp
Completion checks
/mcp endpoint reachable
describe_entities returns expected entities
- Role restrictions behave as intended
- Unwanted write/delete tools are disabled where required
References