Learning objectives
By the end of this lesson you will be able to:- Evaluate different deployment strategies for MCP servers
- Run an MCP server locally for end-user distribution
- Deploy an MCP server to Azure Container Apps
Deployment strategies
Local
Distribute the server binary or source code. Users run it on their own machines. Best for developer tools and CLI integrations.
Containers
Package the server as a Docker image. Deploy to any container runtime — Docker Desktop, Kubernetes, or a cloud container service.
Cloud
Use a managed cloud service like Azure Container Apps, AWS ECS, or Google Cloud Run. Best for multi-user or always-on scenarios.
Local deployment
If your server is meant to run on users’ machines:For stdio servers, no networking configuration is needed. The client manages the server process lifecycle.
Azure Container Apps deployment
Azure Container Apps is a fully managed serverless container platform that works well for MCP servers.Test locally
.vscode/mcp.json to connect VS Code to the local server:Deploy to Azure Container Apps
Make sure you have the Azure CLI installed and are logged in.Azure Container Apps builds the container image, pushes it to a registry, and deploys it. The command returns a public URL for your server.
Other cloud options
| Platform | Notes |
|---|---|
| Azure Functions | Serverless; good for infrequent workloads. See Remote MCP with Azure Functions. |
| AWS ECS / Fargate | Managed container service; similar workflow to Azure Container Apps. |
| Google Cloud Run | Fully managed; scales to zero. |
| Kubernetes | High availability and fine-grained control; more operational overhead. |
Additional resources
Azure Functions + MCP
Deploy a .NET MCP server as an Azure Function.
Azure Container Apps blog post
Detailed walkthrough of hosting MCP servers in Azure Container Apps.
Azure Container Apps MCP sample
Reference implementation used in this lesson.
Build Agents with MCP on Azure
End-to-end guide for building agents using MCP on Azure.
Key takeaways
- Choose local deployment for developer tools and CLI integrations; choose cloud for always-on, multi-user scenarios.
- For stdio servers, no port configuration is needed — the client manages the process.
- Azure Container Apps provides a straightforward path from local testing to cloud deployment with a single
az containerapp upcommand. - Serverless options (Azure Functions, Cloud Run) are ideal for infrequent workloads that benefit from scale-to-zero.