Skip to content

Commit 1da2f2f

Browse files
Merge pull request #2542 from MicrosoftDocs/main639021098604870557sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 57f9c41 + 748209d commit 1da2f2f

File tree

3 files changed

+95
-5
lines changed

3 files changed

+95
-5
lines changed

docs/data-science/.openpublishing.redirection.data-science.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,6 @@
136136
"redirect_url": "/fabric/data-science/ai-functions/pandas/translate",
137137
"redirect_document_id": true
138138
},
139-
{
140-
"source_path_from_root": "/docs/data-science/data-agent-mcp-server.md",
141-
"redirect_url": "/fabric/data-science/concept-data-agent",
142-
"redirect_document_id": false
143-
},
144139
{
145140
"source_path_from_root": "/docs/data-science/data-agent-ai-search-index.md",
146141
"redirect_url": "/fabric/data-science/concept-data-agent",
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: Data agent as Model Context Protocol server (preview)
3+
description: Learn how to consume a data agent as MCP server.
4+
author: jonburchel
5+
ms.author: jburchel
6+
ms.reviewer: amjafari
7+
reviewer: amjafari
8+
ms.service: fabric
9+
ms.subservice: data-science
10+
ms.topic: how-to #Don't change
11+
ms.date: 12/18/2025
12+
ms.update-cycle: 180-days
13+
ms.collection: ce-skilling-ai-copilot
14+
#customer intent: As an Analyst, I want to consume a Fabric data agent as MCP server in VS Code.
15+
---
16+
17+
# Consume Fabric data agent as a model context protocol server in Visual Studio Code
18+
19+
The Model Context Protocol (MCP) server is an emerging standard in the AI landscape that allows AI systems to discover and interact with external tools in a structured way. It plays a critical role in enabling AI models to access and use external knowledge and capabilities. By using MCP servers, AI systems can extend beyond their own data and reasoning. MCP servers provide a way to expose tools and services to AI systems in a consistent, discoverable manner. They help organizations integrate their knowledge into AI workflows.
20+
21+
> [!IMPORTANT]
22+
> This feature is in [preview](../fundamentals/preview.md).
23+
24+
[!INCLUDE [data-agent-prerequisites](./includes/data-agent-prerequisites.md)]
25+
26+
## How it works
27+
28+
Fabric data agents can also function as MCP servers. When used as an MCP server, a Fabric data agent exposes a single tool. This tool represents the data agent itself, so external AI systems can interact with it through the MCP protocol. Because of this, it's important to provide a detailed and accurate description when publishing a Fabric data agent. The description becomes the tool description for the MCP server. External AI systems use this description to determine when and how to invoke the data agent. A clear and comprehensive description ensures that the agent is correctly understood and can be effectively used in AI workflows.
29+
30+
The Fabric data agent as an MCP server is valuable for people who build or test their own AI systems. It allows them to connect directly to the data agent and access organizational data that lives in Fabric OneLake without having to switch between different tools or platforms. This capability makes it easier to integrate organizational knowledge into AI experiments and development workflows, all within a single environment.
31+
32+
> [!NOTE]
33+
> Currently, you can use the Fabric data agent MCP server only in **VS Code**.
34+
35+
:::image type="content" source="./media/data-agent-mcp-server/data-agent-mcp-server-not-published.png" alt-text="Screenshot showing the data agent MCP server before publishing." lightbox="./media/data-agent-mcp-server/data-agent-mcp-server-not-published.png":::
36+
37+
To get started, after publishing the data agent, go to the **Settings** of the agent and open the **Model Context Protocol** tab. Here you see the following information:
38+
39+
- **Data agent MCP server name**
40+
- **MCP server URL**
41+
- **Data agent MCP tool name**
42+
- **MCP server tool description**
43+
44+
You can also download the **mcp.json** file from this tab. Use this file to configure the MCP server in VS Code.
45+
46+
:::image type="content" source="./media/data-agent-mcp-server/data-agent-mcp-server-published.png" alt-text="Screenshot showing the data agent MCP server settings tab." lightbox="./media/data-agent-mcp-server/data-agent-mcp-server-published.png":::
47+
48+
## Setting up the MCP server in VS Code
49+
50+
1. Open **VS Code** and select a folder to work in.
51+
1. Inside this folder, create a folder named **.vscode**.
52+
1. Inside the inner folder, create a file called `mcp.json`.
53+
1. VS Code automatically displays a blue **Add Server** button at the bottom right of the window.
54+
55+
:::image type="content" source="./media/data-agent-mcp-server/data-agent-mcp-json-vscode.png" alt-text="Screenshot showing the data agent MCP server json file." lightbox="./media/data-agent-mcp-server/data-agent-mcp-json-vscode.png":::
56+
57+
1. Select **Add Server** and select **HTTP**. You're prompted to enter a URL. You can copy the **MCP server URL** from the Setting tab of the data agent as was shown earlier.
58+
59+
:::image type="content" source="./media/data-agent-mcp-server/data-agent-mcp-server-select-http.png" alt-text="Screenshot showing the selection of HTTP." lightbox="./media/data-agent-mcp-server/data-agent-mcp-server-select-http.png":::
60+
61+
:::image type="content" source="./media/data-agent-mcp-server/data-agent-mcp-server-url.png" alt-text="Screenshot showing to enter the URL for MCP server." lightbox="./media/data-agent-mcp-server/data-agent-mcp-server-url.png":::
62+
63+
1. Press **Enter** and provide a name for your MCP server. Use this name to display the data agent MCP server in your VS Code environment.
64+
1. VS Code attempts to authenticate with the server. Select **Allow** and sign in with your credentials.
65+
66+
:::image type="content" source="./media/data-agent-mcp-server/data-agent-mcp-json.png" alt-text="Screenshot showing to MCP file of the data agent." lightbox="./media/data-agent-mcp-server/data-agent-mcp-json.png":::
67+
68+
## Enabling Agent Mode
69+
70+
After adding the MCP server, enable **Agent Mode** in VS Code. Agent Mode lets VS Code act as an orchestrator interface, connecting your editor with MCP servers to interact with external tools like the Fabric data agent. To enable it:
71+
72+
1. In VS Code, go to the **Command Palette** (Ctrl+Shift+P or Cmd+Shift+P).
73+
1. Search for **Enable Agent Mode** and select it.
74+
1. Confirm any prompts to activate the mode.
75+
76+
:::image type="content" source="./media/data-agent-mcp-server/data-agent-vs-code-agent-mode.png" alt-text="Screenshot showing data agent in F studio code in agent mode." lightbox="./media/data-agent-mcp-server/data-agent-vs-code-agent-mode.png":::
77+
78+
When Agent Mode is active, select an **orchestrator** to handle your queries. Available orchestrators in public preview include **GPT-5, GPT-4.1, Claude Sonnet 4.5, Gemini 2.5 pro**, and many more. The orchestrator manages the flow of information between your queries in VS Code and the Fabric data agent MCP server.
79+
80+
## Using the Fabric Data Agent MCP Server
81+
82+
When you enable Agent Mode and select the orchestrator:
83+
84+
- You can start asking questions directly from VS Code.
85+
- The orchestrator routes your queries to the Fabric data agent MCP server.
86+
- The agent returns answers based on the knowledge it has access to, including organizational data stored in Fabric OneLake.
87+
88+
By functioning as an MCP server, the Fabric data agent allows users to integrate organizational knowledge into AI workflows, perform experiments, and develop AI solutions without leaving VS Code. This integration streamlines access to OneLake data and enhances productivity for developers and business users alike.
89+
90+
## Related content
91+
92+
- [Data agent concept](concept-data-agent.md)
93+
- [Data agent end-to-end tutorial](data-agent-end-to-end-tutorial.md)

docs/data-science/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ items:
115115
href: consume-data-agent-python.md
116116
- name: Consume a data agent from Microsoft 365 Copilot (preview)
117117
href: data-agent-microsoft-365-copilot.md
118+
- name: Consume a data agent as Model Context Protocol Server (preview)
119+
href: data-agent-mcp-server.md
118120
- name: Source Control, CI/CD, and ALM for Fabric data agent
119121
href: data-agent-source-control.md
120122
- name: Fabric data agent end-to-end tutorial

0 commit comments

Comments
 (0)