Step 10: Connect VS Code / Copilot to the Cloud MCP Endpoint¶
Finally, configure VS Code and Copilot Chat to use the tools running on your deployed Azure Function App.
-
Get the MCP System Key:
The cloud MCP endpoint (/runtime/webhooks/mcp) is protected by a system key. You'll need this key to authenticate calls. Run the following commands in your VS Code terminal to retrieve the system key:
macOS/Linux:
appName=$(azd env get-value AZURE_FUNCTION_NAME) az functionapp keys list -n $appName --query "systemKeys.mcp_extension" -g rg-snippymcplab-<unique-suffix> --output tsvWindows:
$appName = azd env get-value AZURE_FUNCTION_NAME az functionapp keys list -n $appName --query "systemKeys.mcp_extension" -g rg-snippymcplab-<unique-suffix> --output tsvNote: Replace
<unique-suffix>with the suffix you chose in Step 1.3.The output will be a long string - copy this value. This is your system-key required for calling the MCP endpoint.
-
Add Cloud Endpoint to .vscode/mcp.json:
After retrieving your Function App name and MCP system key, you can now configure the cloud endpoint in .vscode/mcp.json.
Stop the local-snippy server if it is still running.
Select Start above remote-snippy in mcp.json - this will prompt you to enter: - The Function App name - The MCP system key
You don't need to manually replace any values in the JSON - just copy the following values from your Terminal:
macOS/Linux:
Windows:
Use the $appName value for the functionapp-name input, and paste the system key you retrieved earlier.
This setup allows the cloud-hosted MCP to receive and stream events securely.

-
Switch Copilot to Cloud Server:
- Open Copilot Chat (Ctrl+Alt+I or Cmd+Alt+I)
- Ensure Agent mode is selected
- Verify the tools are loaded correctly
-
Test Cloud hosted Tools:
Repeat the tests from earlier, but this time with the remote-snippy server:
- Select some code
-
Ask Copilot:
-
Confirm the tool usage
-
Ask Copilot:
-
Try other tools like deep_wiki as we did earlier
Verify that the tools work correctly by interacting with your deployed Azure Function App.