Now that you have started DAB, using one of the following methods:
dotnet tool run dab start
-- This starts DAB with MCP enabled, exposing the MCP endpoint at /mcp in HTTP mode.
dotnet tool run dab start --mcp-stdio role:anonymous
-- This will start MCP in Stdio mode.
There are two methods to run and use the MCP server.
Started dab this way:
dotnet tool run dab start
In dab-config.json, you need to select the right provider for authentication:
"authentication": {
"provider": "AppService"
},
- DAB runs as an independent web server
- MCP is exposed via streamable HTTP
- Clients connect to the
/mcpendpoint instead of spawning a local process - Multiple clients can connect to the same MCP server
- This is the mode used by:
- Azure AI Foundry agents
- Remote / shared MCP deployments
- Production-style scenarios
If you deploy the MCP server to Azure, please refer to this article to include it in AI foundry.
https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/quickstart-azure-ai-foundry
You can run the MCP server locally and include it in AI agent.
In AI foundry, create an agent, add custom MCP as tool. 
Use http://localhost:5000/mcp as MCP server endpoint. 
Configure the MCP tool. Add allowed MCP tools like: list_tables, describe_table, read_data, insert_data, update_data, delete_data.

Your MCP is ready for the agent to use!
An example of table READ is shown in
.
A table WRITE example is in
.
In Fabric SQL database, then verify the table WRITE is successful
.
You can create the MCP server as app service and include it in AI agent. In Step 1, you have created and registered your app with my-app-ID.
Then the MCP server endpoint is: https://my-app-ID.azurewebsites.net/mcp
In AI foundry, create an agent, add custom MCP as tool. Setup authentication method, type and audience.

Configure the MCP tool using the same way as local MCP server.
Your MCP is ready for the agent to use!
An example of table READ is shown in
.
A table WRITE example is in
.
When you want a scalable, reusable MCP server, you must host it on Azure App Service as a Web App and attach it to an App Service Plan that you control. This gives you predictable compute, identity integration, and standard scaling knobs (SKU, instances, autoscale).
You creatw a new web app (Linux recommended), publish as 'Code'.
After the web app is created, use https://your-web-app-name.azurewebsites.net/mcp
as the MCP endpoint.
Setting the audience, Configuring the MCP tool, and running the agent in play ground are the same as preiously.
Started dab this way:
dotnet tool run dab start --mcp-stdio role:anonymous
In dab-config.json, you need to select the right provider for authentication:
"authentication": {
"provider": "Simulator"
},
VS code starts the MCP server for you. The communication is via stdin/stdout. No HTTP endpoint is used.
CTRL + SHIFT + P, MCP: Add Server, Command Stdio, C:/Users/xxxx/project-folder/northwind, choose a name, say, northwind-mcp, then 'enter'.
Then MCP: Start Server -> northwind-mcp.
You will see:
[MCP DEBUG] MCP stdio server started.
[info] Discovered 6 tools
Failed to parse message logging/setLevel: Method not found
These occur because:
MCP stdio requires pure JSON on stdout DAB emits ASP.NET runtime logs to stdout VS Code attempts to parse them as MCP JSON‑RPC
After MCP server is started, a mcp.json file is created in your user folder, for example:
C:\Users\xxxx\AppData\Roaming\Code\User{}mcp.json
{
"servers": {
"sql-mcp": {
"type": "stdio",
"command": "dotnet",
"args": []
},
"northwind-mcp": {
"type": "stdio",
"command": "C:/Users/xxxx/project-folder/northwind",
"args": []
}
},
"inputs": []
}
Then you need to edit this mcp.json file, to configure the MCP server command path, arguments, etc. Below is one example to configure two MCP servers with two different paths:
{
"servers": {
"itsm-mcp": {
"type": "stdio",
"command": "dotnet",
"args": [
"tool",
"run",
"dab",
"start",
"--mcp-stdio",
"role:anonymous"
],
"cwd": "C:/Users/xxxx/project-folder/itsm-sql-db"
},
"northwind-mcp": {
"type": "stdio",
"command": "dotnet",
"args": [
"tool",
"run",
"dab",
"start",
"--mcp-stdio",
"role:anonymous"
],
"cwd": "C:/Users/xxxx/project-folder/northwind"
}
},
"inputs": []
}
C:/Users/xxxx/project-folder/itsm-sql-db and C:/Users/xxxx/project-folder/northwind are the places where you can find the dab-config.json for your corresponding MCP server.
**Note: "role:anonymous" is only for local dev testing. In --mcp-stdio mode, the MCP client talks to DAB over stdin/stdout (no HTTP headers). authentication.provider = Simulator so role-based permissions can be exercised locally.
Please see Project-folder of this repo for example of mcp.json, in C:\Users\xxxx\AppData\Roaming\Code\User folder.
Start Copilot Chat agent mode: CTRL + SHIFT + P -> Chat: Open Chat (Agent)

READ example:
List first 5 rows from orders.
You will be asked for Approval of using the MCP tool to access the table.

After getting your approval, the agent will proceed to READ the table and give you answer.

WRITE example:
Insert a new row into the Orders table with:
OrderID = 11079,
CustomerID = 'VINET',
EmployeeID = 5,
OrderDate = '1998-05-06',
ShipCountry = 'France'
Verify in Fabric SQL database, the new row is created successfully.
If you have multiple SQL MCP servers, in Copilot Chat, you can switch among them and enable the right one for you immediately.
At the bottom of Copilot chat window, select Agent 'configure Tools', if you see multiple MCP servers there, you can dynamically select the one you want, it will be enabled immediately, then you can start chatting with that agent.






