loading…
Search for a command to run...
loading…
Enables AI agents to browse pizza menus, place orders, and track order status via the Model Context Protocol.
Enables AI agents to browse pizza menus, place orders, and track order status via the Model Context Protocol.

Open project in GitHub Codespaces
Join Azure AI Community Discord
TypeScript
License
⭐ If you like this sample, star it on GitHub — it helps a lot!
Overview • Getting started • Local development • Deploy to Azure • Resources • Troubleshooting
This project demonstrates how to build AI agents that can interact with real-world APIs using the Model Context Protocol (MCP). It features a complete pizza ordering system with a serverless API, web interfaces, and an MCP server that enables AI agents to browse menus, place orders, and track order status.
The system consists of multiple interconnected services:
[!TIP] You can test this application locally without deployment needed or any cloud costs. The MCP server works with popular AI tools like GitHub Copilot, Claude, and other MCP-compatible clients.
This sample uses a microservices architecture deployed on Azure:
The Pizza MCP server provides these tools for AI agents:
| Tool | Description |
|---|---|
get_pizzas |
Retrieve all pizzas from the menu |
get_pizza_by_id |
Get specific pizza details by ID |
get_toppings |
List available toppings (filterable by category) |
get_topping_by_id |
Get specific topping details |
get_topping_categories |
List all topping categories |
get_orders |
Retrieve orders (filterable by user, status, time) |
get_order_by_id |
Get specific order details |
place_order |
Create a new pizza order (needs userId, optional nickname) |
delete_order_by_id |
Cancel pending orders (needs userId) |
There are multiple ways to get started with this project. The quickest way is to use GitHub Codespaces that provides a preconfigured environment for you. Alternatively, you can set up your local environment following the instructions below.
You can run this project directly in your browser by using GitHub Codespaces, which will open a web-based VS Code:
A similar option to Codespaces is VS Code Dev Containers, that will open the project in your local VS Code instance using the Dev Containers extension.
You will also need to have Docker installed on your machine to run the container.
You need to install following tools to work on your local machine:
pwsh.exe from a PowerShell command. If this fails, you likely need to upgrade PowerShell.Then you can get the project code:
Fork the project to create your own copy of this repository.
On your forked repository, select the Code button, then the Local tab, and copy the URL of your forked repository.

Open a terminal and run this command to clone the repo: git clone <your-repo-url>
After setting up your environment, you can run the entire application locally:
# Install dependencies for all services
npm install
# Start all services locally
npm start
This will start:
[!NOTE] When running locally without having deployed the application, the servers will use in-memory storage, so any data will be lost when you stop the servers. After a successful deployment, the servers will use Azure Cosmos DB for persistent storage.
You can test the MCP server using the MCP Inspector:
Install and start MCP Inspector:
npx -y @modelcontextprotocol/inspector
In your browser, open the MCP Inspector (the URL will be shown in the terminal)
Configure the connection:
http://localhost:3000/mcp (for Streamable HTTP) or http://localhost:3000/sse (for legacy SSE)Click Connect and explore the available tools
To use the MCP server in local mode with GitHub Copilot, create a local .vscode/mcp.json configuration file in your project root:
{
"servers": {
"pizza-mcp": {
"command": "npm",
"args": ["run", "-s", "mcp:local"],
"env": {
"PIZZA_API_URL": "http://localhost:7071"
}
}
}
}
Make sure that you have the Pizza services running locally by running npm start in the project root.
Then, you can use GitHub Copilot in agent mode to interact with the MCP server. For example, you can ask questions like "What pizzas are available?" or "Place an order for a Margherita pizza" and Copilot will use the MCP server to provide answers or perform actions.
[!TIP] Copilot models can behave differently regarding tools usage, so if you don't see it calling the
pizza-mcptools, you can explicitly mention using the Pizza MCP server by adding#pizza-mcpin your prompt.
Microsoft.Authorization/roleAssignments/write permissions, such as Role Based Access Control Administrator, User Access Administrator, or Ownerazd auth loginazd up to deploy the application to Azure. This will provision Azure resources and deploy all servicesOnce deployment is complete, you'll see the URLs of all deployed services in the terminal.
Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage. However, you can use the Azure pricing calculator with pre-configured estimations to get an idea of the costs: Azure Pricing Calculator.
To clean up all the Azure resources created by this sample:
azd down --purge
Here are some resources to learn more about the technologies used in this project:
You can also find more Azure AI samples here.
If you encounter issues while running or deploying this sample:
azd auth loginFor more detailed troubleshooting, check the individual README files in each service directory.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Выполни в терминале:
claude mcp add pizza-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.