Skip to content

Commit fb815f7

Browse files
committed
edit pass: azure-ai-foundry-agent-service-how-to
1 parent 5a938bd commit fb815f7

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

articles/ai-foundry/how-to/develop/vs-code-agents-mcp.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Work with Azure AI Foundry Agent Service and MCP Server tools in Visual Studio Code
2+
title: Work with Azure AI Foundry Agent Service and MCP Server Tools in Visual Studio Code
33
titleSuffix: Azure AI Foundry
44
description: Use this article to learn how to use MCP server tools with Azure AI Foundry Agent Service directly in VS Code.
55
manager: mcleans
@@ -16,7 +16,7 @@ author: ms-johnalex
1616

1717
# Work with Azure AI Foundry Agent Service and MCP server tools in Visual Studio Code (preview)
1818

19-
In this article, you learn how to add and use the [Model Context Protocol (MCP)](/azure/ai-foundry/agents/how-to/tools/model-context-protocol) tool with Azure AI agents by using the [Azure AI Foundry for Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.vscode-ai-foundry).
19+
In this article, you learn how to add and use [Model Context Protocol (MCP)](/azure/ai-foundry/agents/how-to/tools/model-context-protocol) tools with Azure AI agents by using the [Azure AI Foundry for Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.vscode-ai-foundry).
2020

2121
After you [build an agent in Azure AI Foundry Agent Service](./vs-code-agents.md) by using this Visual Studio Code (VS Code) extension, you can add MCP tools to your agent.
2222

@@ -39,7 +39,7 @@ To create an Azure AI agent, follow the steps in [Create and edit Azure AI agent
3939

4040
After you create your agent, you can add tools to it, including MCP tools. For more information about available tools, see [Tools for Azure AI agents](/azure/ai-foundry/agents/how-to/tools/overview).
4141

42-
You can bring multiple remote MCP servers by adding them as tools. For each tool, you need to provide a unique `Server Label` value within the same agent and a `Server URL` value that points to the remote MCP server.
42+
You can bring multiple remote MCP servers by adding them as tools. For each tool, you need to provide a unique **Server Label** value within the same agent and a **Server URL** value that points to the remote MCP server.
4343

4444
> [!WARNING]
4545
> The remote MCP servers that you use with the MCP tool in this article are not from Microsoft. Microsoft doesn't test or verify these servers. For details, see [Considerations for using non-Microsoft services and servers](/azure/ai-foundry/agents/how-to/tools/model-context-protocol?branch=pr-en-us-6966#considerations-for-using-non-microsoft-services-and-servers).
@@ -48,7 +48,7 @@ To add an existing MCP server tool to your AI agent, follow these steps:
4848

4949
1. In the designer, in the upper-right corner of the **TOOL** section, select the **Add tool** button. In the dropdown list, select the **MCP Server** tool.
5050

51-
1. Find the remote MCP server that you want to connect to, such as the GitHub MCP server. Create or update an Azure AI Foundry agent with an MCP tool by the following information:
51+
1. Find the remote MCP server that you want to connect to, such as the GitHub MCP server. Create or update an Azure AI Foundry agent with an MCP tool by using the following information:
5252

5353
1. **Server URL**: The URL of the MCP server; for example, `https://gitmcp.io/Azure/azure-rest-api-specs`.
5454

@@ -78,7 +78,7 @@ After you add an MCP tool, you can create an agent directly on Azure AI Foundry
7878

7979
Selecting the deployed agent opens the **AGENT PERFERENCES** pane in a view-only mode. You can:
8080

81-
- Select the **Edit Agent** button to view the agent designer and YAML definition of the agent for editing.
81+
- Select the **Edit Agent** button to view the agent designer and the YAML definition of the agent for editing.
8282
- Select the **Open Code File** button to create a sample code file that uses the agent.
8383
- Select the **Open Playground** button to open **Agent Playground**.
8484

@@ -96,24 +96,24 @@ Selecting the deployed agent opens the **AGENT PERFERENCES** pane in a view-only
9696

9797
### Interact with agents by using the MCP server tool in the agent playground
9898

99-
1. Right-click your deployed agent that has an **MCP Server** tool and select the **Open Playground** option. This action starts a thread with your agent and lets you send messages.
99+
1. Right-click your deployed agent that has an **MCP Server** tool and then select the **Open Playground** option. This action starts a thread with your agent and lets you send messages.
100100

101-
1. After the **Agent Playground** pane appears, enter a prompt such as **Give me an example for creating a container app** and send it.
101+
1. In the **Agent Playground** pane, enter a prompt such as **Give me an example for creating a container app** and send it.
102102

103-
1. Select the authentication mode for the MCP server tool. Choose the appropriate authentication method and proceed.
103+
1. Select the authentication method for the MCP server tool and proceed.
104104

105-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/mcp-tool-authentication.png" alt-text="Screenshot of the MCP server tool authentication prompt in the Agents Playground." lightbox="../../media/how-to/get-started-projects-vs-code/mcp-tool-authentication.png":::
106-
1. Select the approval preference for the MCP server tool. Choose the appropriate approval preference and proceed.
105+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/mcp-tool-authentication.png" alt-text="Screenshot of the MCP server tool's authentication prompt in the agent playground." lightbox="../../media/how-to/get-started-projects-vs-code/mcp-tool-authentication.png":::
106+
1. Select the approval preference for the MCP server tool and proceed.
107107

108-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/mcp-tool-approval-preference.png" alt-text="Screenshot of the MCP server tool approval preference in the Agents Playground." lightbox="../../media/how-to/get-started-projects-vs-code/mcp-tool-approval-preference.png":::
108+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/mcp-tool-approval-preference.png" alt-text="Screenshot of the MCP server tool's approval preference in the agent playground." lightbox="../../media/how-to/get-started-projects-vs-code/mcp-tool-approval-preference.png":::
109109

110110
1. If you chose **Ask every time** for your approval preference, you need to approve or reject the tool call.
111111

112-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/mcp-approve-tool.png" alt-text="Screenshot of the MCP server tool approval prompt in the Agents Playground." lightbox="../../media/how-to/get-started-projects-vs-code/mcp-approve-tool.png":::
112+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/mcp-approve-tool.png" alt-text="Screenshot of the MCP server tool's approval prompt in the agent playground." lightbox="../../media/how-to/get-started-projects-vs-code/mcp-approve-tool.png":::
113113

114-
1. The agent uses the model and the MCP server tools that you configured in the agent designer to retrieve the information. The source of the information is displayed in the **Agent Annotations** section.
114+
1. The agent uses the model and the MCP server tools that you configured in the agent designer to retrieve the information. The source of the information appears in the **Agent Annotations** section.
115115

116-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/mcp-tool-response.png" alt-text="Screenshot of the Agents Playground page with agent annotations highlighted in VS Code after using the MCP server tool." lightbox="../../media/how-to/get-started-projects-vs-code/mcp-tool-response.png":::
116+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/mcp-tool-response.png" alt-text="Screenshot of the agent playground with agent annotations highlighted in Visual Studio Code after use of the MCP server tool." lightbox="../../media/how-to/get-started-projects-vs-code/mcp-tool-response.png":::
117117

118118
## Clean up resources
119119

@@ -123,26 +123,28 @@ The Azure resources that you created in this article are billed to your Azure su
123123

124124
[!INCLUDE [tip-left-pane](../../includes/tip-left-pane.md)]
125125

126-
Delete the deployed agent in the [online AI Foundry portal](https://ai.azure.com/?cid=learnDocs). Select **Agents** from the navigation menu on the left, select your agent, then select the **Delete** button.
126+
1. In the [Azure AI Foundry portal](https://ai.azure.com/?cid=learnDocs), on the left menu, select **Agents**.
127127

128-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/delete-agent.png" alt-text="Screenshot of the AI Foundry portal with Agents from the navigation menu on the left and the Delete button highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/delete-agent.png":::
128+
1. Select the agent that you want to delete, and then select **Delete**.
129+
130+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/delete-agent.png" alt-text="Screenshot of the Azure AI Foundry portal with the Delete command for a selected agent." lightbox="../../media/how-to/get-started-projects-vs-code/delete-agent.png":::
129131

130132
### Delete your models
131133

132134
1. In VS Code, refresh the **Azure Resources** view. Expand the **Models** subsection to display the list of deployed models.
133135

134-
1. Right-click your deployed model to delete, and then select the **Delete** option.
135-
136-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/delete-model.png" alt-text="Screenshot of the model context menu with the Delete option highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/delete-model.png":::
136+
1. Right-click the deployed model that you want to delete, and then select **Delete**.
137137

138-
### Delete your tools
138+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/delete-model.png" alt-text="Screenshot of the shortcut menu with the Delete command for a selected model." lightbox="../../media/how-to/get-started-projects-vs-code/delete-model.png":::
139139

140-
Delete the connected tool with the following steps:
140+
### Delete your connected tools
141141

142142
1. Open the Azure portal.
143-
1. Select the Azure Resource Group that contains the tool.
143+
144+
1. Select the Azure resource group that contains the tool.
145+
144146
1. Select the **Delete** button.
145147

146148
## Related content
147149

148-
- Learn about the tools you can use with Azure AI agents, such as [file search](/azure/ai-services/agents/how-to/tools/file-search?tabs=python&pivots=overview), or [code interpreter](/azure/ai-services/agents/how-to/tools/code-interpreter?tabs=python&pivots=overview).
150+
- Learn about the tools that you can use with Azure AI agents, such as [file search](/azure/ai-services/agents/how-to/tools/file-search?tabs=python&pivots=overview) or [code interpreter](/azure/ai-services/agents/how-to/tools/code-interpreter?tabs=python&pivots=overview).

0 commit comments

Comments
 (0)