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: README.md
+43-3Lines changed: 43 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,9 +70,9 @@ An Azure Storage Emulator is needed for this particular sample because we will s
70
70
71
71
>**Note** by default this will use the webhooks route: `/runtime/webhooks/mcp/sse`. Later we will use this in Azure to set the key on client/host calls: `/runtime/webhooks/mcp/sse?code=<system_key>`
72
72
73
-
## Use the MCP server from within a client/host
73
+
## Connect to the *local* MCP server from a client/host
74
74
75
-
### VS Code - Copilot Edits
75
+
### VS Code - Copilot agent mode
76
76
77
77
1. **Add MCP Server** from command palette and add URL to your running Function app's SSE endpoint:
78
78
@@ -133,10 +133,50 @@ azd env set VNET_ENABLED true
133
133
134
134
Additionally, [API Management]() can be used for improved security and policies over your MCP Server, and [App Service built-in authentication](https://learn.microsoft.com/azure/app-service/overview-authentication-authorization) can be used to set up your favorite OAuth provider including Entra.
135
135
136
-
### Connect to your function app from a client
136
+
## Connect to your *remote* MCP server function app from a client
137
137
138
138
Your client will need a key in order to invoke the new hosted SSE endpoint, which will be of the form `https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp/sse`. The hosted function requires a system key by default which can be obtained from the [portal](https://learn.microsoft.com/azure/azure-functions/function-keys-how-to?tabs=azure-portal) or the CLI (`az functionapp keys list --resource-group <resource_group> --name <function_app_name>`). Obtain the system key named `mcp_extension`.
139
139
140
+
### Connect to remote MCP server in MCP Inspector
141
+
For MCP Inspector, you can include the key in the URL:
### Connect to remote MCP server in VS Code - GitHub Copilot
147
+
For GitHub Copilot within VS Code, you should instead set the key as the `x-functions-key` header in `mcp.json`, and you would just use `https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp/sse` for the URL. The following example uses an input and will prompt you to provide the key when you start the server from VS Code. Note [mcp.json](.vscode/mcp.json) has already been included in this repo and will be picked up by VS Code. Click Start on the server to be prompted for values including `functionapp-name` (in your /.azure/*/.env file) and `functions-mcp-extension-system-key` which can be obtained from CLI command above or API Keys in the portal for the Function App.
148
+
149
+
```json
150
+
{
151
+
"inputs": [
152
+
{
153
+
"type": "promptString",
154
+
"id": "functions-mcp-extension-system-key",
155
+
"description": "Azure Functions MCP Extension System Key",
For MCP Inspector, you can include the key in the URL: `https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp/sse?code=<your-mcp-extension-system-key>`.
141
181
142
182
For GitHub Copilot within VS Code, you should instead set the key as the `x-functions-key` header in `mcp.json`, and you would just use `https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp/sse` for the URL. The following example uses an input and will prompt you to provide the key when you start the server from VS Code:
0 commit comments