mcp
Links to samples, tools, and resources for building and integrating Model Context Protocol (MCP) servers on Azure using multiple languages
claude mcp add --transport stdio azure-samples-mcp npx -y azure-samples-mcp
How to use
This MCP hub describes how to run and connect to MCP servers hosted on Azure Functions. It supports multiple languages for server implementations (C#, Python, and TypeScript) and provides official SDKs to build clients, servers, or tooling that communicate via MCP. Use the hub to discover plug-and-play MCP servers (data APIs, dev/infra APIs, etc.) and to build agents that call real APIs through MCP without having to manage the underlying APIs directly. You can run your own MCP server using Azure Functions and then connect client tooling or agents via MCP endpoints exposed by that server, or reuse existing MCP-enabled servers and agents from the ecosystem.
How to install
Prerequisites:
- An Azure account and Azure CLI installed and configured
- Node.js and npm (for npx usage) or alternative language toolchains if you choose non-Node runtimes
- Azure Functions Core Tools installed if you plan to run Functions locally
Step-by-step:
- Install prerequisites
- Install Node.js: https://nodejs.org/
- Install Azure CLI: https://aka.ms/azcli
- Install Azure Functions Core Tools: https://aka.ms/functions-core-tools
- Prepare the MCP hub configuration
- Create a project directory for the hub configuration
- Use the provided mcp_config template (see the mcp_config field in this document) to specify how to launch the MCP server via npx (Node) or another runner if you adapt the hub for your environment
- Run the hub locally (example using npx)
- Ensure you have an internet connection and npm access
- Execute: npx -y azure-samples-mcp
- Follow any prompts to configure Azure Functions locally (if needed)
- Deploy to Azure Functions (recommended for production)
- Login to Azure: az login
- Create a Function App and deploy the MCP server code according to the language you use (C#, Python, or TypeScript)
- Configure environment variables and application settings as required by the MCP server
- Connect clients and agents
- Use the official MCP SDKs (C#, Python, TypeScript, Java) to create clients or servers that communicate through the deployed Azure Functions endpoint
- Point your agents at the MCP server endpoint exposed by the Function App
Additional notes
Tips and common considerations:
- MCP servers exposed via Azure Functions can be written in C#, Python, or TypeScript. Choose the runtime you’re most comfortable with.
- When running locally, ensure your environment variables (Azure credentials, region, resource group) are set properly to avoid deployment issues.
- The hub references plug-and-play servers (Data APIs and Dev/Infra APIs). Explore those repositories to quickly wire real APIs into MCP.
- For production, consider setting up authentication and networking (e.g., private endpoints, function-level security) to protect MCP endpoints.
- If you encounter connectivity issues, verify function app URL, endpoint path, and any required API keys or tokens used by the MCP servers.
- The MCP ecosystem includes multiple SDKs; use the SDK that matches your client language to simplify integration.