Azure Functions ⚡️❤️ MCP Servers
@0GiS0
Crea tu servidor MCP con Azure Functions ⚡️🧰
Overview
What is Azure Functions ⚡️❤️ MCP Servers?
Azure Functions ⚡️❤️ MCP Servers is a sample repository that demonstrates how to create Model Context Protocol (MCP) servers using Azure Functions and the preview NuGet package Microsoft.Azure.Functions.Worker.Extensions.Mcp. It is designed for developers who want to integrate Azure Functions with MCP and use those servers with GitHub Copilot Chat's agent mode.
How to use Azure Functions ⚡️❤️ MCP Servers?
Install the NuGet package (dotnet add package Microsoft.Azure.Functions.Worker.Extensions.Mcp --version 1.0.0-preview.2). Run the project locally with func start. Test it using MCP Inspector (npx @modelcontextprotocol/inspector http://localhost:7071/runtime/webhooks/mcp/sse). Configure GitHub Copilot Chat by adding an MCP server entry in .vscode/mcp.json or .vscode/settings.json, using either a local endpoint or a remote Azure Functions URL with the function key. Optionally deploy the function to Azure using the Terraform scripts in the infra directory after creating a terraform.tfvars file with your subscription ID and YouTube API key.
Key features of Azure Functions ⚡️❤️ MCP Servers
- Sample MCP server built with Azure Functions and .NET.
- Uses the preview NuGet extension
Microsoft.Azure.Functions.Worker.Extensions.Mcp. - Supports local development and testing with
func start. - Integrates directly with GitHub Copilot Chat via SSE transport.
- Provides configuration templates for local and remote servers.
- Includes Terraform infrastructure for deploying to Azure.
Use cases of Azure Functions ⚡️❤️ MCP Servers
- Build and test MCP servers locally using Azure Functions.
- Deploy MCP servers to Azure and access them remotely.
- Use the MCP server with GitHub Copilot Chat in agent mode.
- Secure your MCP server with Azure Functions access keys.
FAQ from Azure Functions ⚡️❤️ MCP Servers
How do I install the NuGet package for MCP support in Azure Functions?
Run dotnet add package Microsoft.Azure.Functions.Worker.Extensions.Mcp --version 1.0.0-preview.2 to add the preview extension.
How can I test the MCP server locally?
Start the Azure Functions runtime with func start, then use npx @modelcontextprotocol/inspector http://localhost:7071/runtime/webhooks/mcp/sse to open the MCP inspector.
How do I configure GitHub Copilot Chat to use this MCP server?
Create a .vscode/mcp.json file with a server entry of type sse, pointing to the local or remote URL, and optionally use inputs for sensitive values like the function key.
How do I deploy the Azure Function to Azure?
Use the Terraform scripts inside the infra folder. After creating a terraform.tfvars file with subscription_id and youtube_api_key, run terraform init and terraform apply. Then deploy the code using Visual Studio Code or another method.
What transport and authentication does the MCP server use?
The server uses SSE (Server-Sent Events) transport. Remote access uses the Azure Functions host key as an authentication header (x-functions-key).