Sponsored by Deepsite.site

MCP Connector: Integrating AI agent with Data Warehouse in Microsoft Fabric

Created By
LazaUK8 months ago
MCP Client and Server apps to demo integration of Azure OpenAI-based AI agent with a Data Warehouse, exposed through GraphQL in Microsoft Fabric.
Content

MCP Connector: Integrating AI agent with Data Warehouse in Microsoft Fabric

This repo demonstrates the integration of an Azure OpenAI-powered AI agent with a Microsoft Fabric data warehouse using the Model Context Protocol (MCP), open integration standard for AI agents by Anthropic.

MCP enables dynamic discovery of tools, data resources and prompt templates (with more coming soon), unifying their integration with AI agents. GraphQL provides an abstraction layer for universal data connection. Below, you will find detailed steps on how to combine MCP and GraphQL to enable bidirectional access to enterprise data for your AI agent.

NOTE

In the MCP server's script, some query parameter values are hard-coded for the sake of this example. In a real-world scenario, these values would be dynamically generated or retrieved.

Table of contents:

Part 1: Configuring Microsoft Fabric Backend

  1. In Microsoft Fabric, create a new data warehouse pre-populated by sample data by clicking New item -> Sample warehouse: Step1_SampleWarehouse
  2. Next, create a GraphQL API endpoint by clicking New item -> API for GraphQL: Step2_GraphQlCreate
  3. In the data configuration of GraphQL API, choose the Trip (dbo.Trip) table: Step3_GraphQLData.png
  4. Copy the endpoint URL of your GraphQL API: Step4_GraphQLDataURL.png

Part 2: Configuring Local Client Environment

  1. Install the required Python packages, listed in the provided requirements.txt:
pip install -r requirements.txt
  1. Configure environmnet variables for the MCP client:
VariableDescription
AOAI_API_BASEBase URL of the Azure OpenAI endpoint
AOAI_API_VERSIONAPI version of the Azure OpenAI endpoint
AOAI_DEPLOYMENTDeployment name of the Azure OpenAI model
  1. Set the value of the AZURE_FABRIC_GRAPHQL_ENDPOINT variable with the GraphQL endpoint URL from Step 1.4 above. It will be utilised by the MCP Server script to establish connectivity with Microsoft Fabric:
VariableDescription
AZURE_FABRIC_GRAPHQL_ENDPOINTMicrosoft Fabric's GraphQL API endpoint

Part 3: User Experience - Gradio UI

  1. Launch the MCP client in your command prompt:
python MCP_Client_Gradio.py
  1. Click the Initialise System button to start the MCP server and connect your AI agent to the Microsoft Fabric's GraphQL API endpoint: Step5_GradioLaunch.png
  2. You can now pull and push data to your data warehouse using GraphQL's queries and mutations enabled by this MCP connector: Step5_GradioUse.png

Part 4: Demo video on YouTube

A practical demo of the provided MCP connector can be found on this YouTube video.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
Tavily Mcp
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.