You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/export-rest-mcp-server.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,24 +83,27 @@ To verify that the MCP server is working, you can use Visual Studio Code to send
83
83
84
84
In Visual Studio Code, use GitHub Copilot chat in agent mode (preview) to add the MCP server and use the tools. For background about MCP servers in Visual Studio Code, see [Use MCP Servers in VS Code (Preview)](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
85
85
86
+
### Add the MCP server in Visual Studio Code
87
+
86
88
To add the MCP server in Visual Studio Code:
87
89
88
-
1. Use the **MCP: Add Server** command from the Command Palette. When prompted, provide the following information:
90
+
1. Use the **MCP: Add Server** command from the Command Palette.
89
91
90
-
1. Select the server type: **HTTP (HTTP or Server Sent Events)**.
91
-
1. Enter the **URL of the MCP server** in API Management. Example: `https://<apim-service-name>.azure-api.net/<api-name>-mcp/sse` (for SSE endpoint) or `https://<apim-service-name>.azure-api.net/<api-name>-mcp/mcp` (for MCP endpoint)
92
-
1. Enter a **server ID** of your choice.
93
-
1. Select whether to save the configuration to your **workspace settings** or **user settings**.
94
-
* **Workspace settings** - The server configuration is saved to a `.vscode/mcp.json` file only available in the current workspace.
92
+
1. When prompted, select the server type: **HTTP (HTTP or Server Sent Events)**.
93
+
1. Enter the **URL of the MCP server** in API Management. Example: `https://<apim-service-name>.azure-api.net/<api-name>-mcp/sse` (for SSE endpoint) or `https://<apim-service-name>.azure-api.net/<api-name>-mcp/mcp` (for MCP endpoint)
94
+
1. Enter a **server ID** of your choice.
95
+
1. Select whether to save the configuration to your **workspace settings** or **user settings**.
96
+
* **Workspace settings** - The server configuration is saved to a `.vscode/mcp.json` file only available in the current workspace.
95
97
96
-
* **User settings** - The server configuration is added to your global `settings.json` file and is available in all workspaces. The configuration looks similar to the following:
98
+
* **User settings** - The server configuration is added to your global `settings.json` file and is available in all workspaces. The configuration looks similar to the following:
97
99
98
-
:::image type="content" source="media/export-rest-mcp-server/mcp-servers-visual-studio-code.png" alt-text="Screenshot of MCP servers configured in Visual Studio Code.":::
100
+
:::image type="content" source="media/export-rest-mcp-server/mcp-servers-visual-studio-code.png" alt-text="Screenshot of MCP servers configured in Visual Studio Code.":::
99
101
100
102
Add fields to the JSON configuration for settings such as authentication header. The following example shows the configuration for an API Management subscription key passed in a header as in input value. Learn more about the [configuration format](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_configuration-format)
101
103
102
104
:::image type="content" source="media/export-rest-mcp-server/mcp-server-with-header-visual-studio-code.png" alt-text="Screenshot of authentication header configuration for an MCP server":::
103
105
106
+
### Use tools in agent mode
104
107
105
108
After adding an MCP server, you can use tools in agent mode.
0 commit comments