5/9/26

SQL MCP Server with Copilot Studio — Connect Your Agent to Azure SQL

Most Copilot Studio agents answer questions from documents or SharePoint. But what if you want your agent to query a live database like customer records, insurance data, or product inventory in real time?

That's exactly what SQL MCP Server makes possible. It's a free, open source tool from Microsoft that turns your Azure SQL tables into tools that AI agents can discover and call. No APIs to build, no Power Automate flows, no custom connectors. You point it at your database, tell it which tables to expose, and it handles the rest.

In this tutorial I walk through the complete setup from zero. We start with installing Data API builder on your local machine, then configure which tables the agent can access and what permissions apply. We test the connection locally to make sure everything works, then package the whole thing into a Docker container and deploy it to Azure Container Apps, which gives us a public HTTPS endpoint that Copilot Studio can reach. Finally we connect it to a Copilot Studio agent and test it with real natural language queries against live data.

One of the things that makes SQL MCP Server different from other database tools for AI is that the agent never writes raw SQL. Instead it calls structured tools like read_records or aggregate_records, and Data API builder generates the actual SQL query behind the scenes. Same input, same query, every time. This makes it predictable, testable, and safe for enterprise use.

By the end of this tutorial you'll have a working Copilot Studio agent that can answer questions like "show me all active customers in California" or "which region has the highest average premium" by querying your live database, with no code written.

Next

One Agent Isn't Enough — Build Multi-Agent Systems in Copilot Studio