Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Azure APIM + MCP Server Demosearch for 'smart' products and list all current orders"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Azure APIM + MCP Server Demo
This project demonstrates how to expose backend APIs through Azure API Management (APIM) as a Model Context Protocol (MCP) Server, enabling AI assistants and tools to interact with your APIs using the standardized MCP protocol.
ποΈ Architecture
π¦ Components
Backend API (backend-api/)
Express.js application with TypeScript
REST API endpoints for products and orders
MCP JSON-RPC endpoint handler
5 MCP tools:
get_products- List all products in the catalogget_product_by_id- Get product details by IDsearch_products- Search products by query stringget_orders- List all orderscreate_order- Create a new order
Infrastructure (infrastructure/)
Bicep templates for Azure deployment
Azure App Service (Linux, Node.js 20 LTS, B1 Basic)
Azure API Management (Developer SKU)
Application Insights for monitoring
Log Analytics workspace
π Endpoints
Endpoint | Description |
| Backend root |
| Health check |
| Products REST API |
| Orders REST API |
| MCP endpoint (direct) |
| MCP endpoint (via APIM) β |
π‘ MCP Protocol
The server implements the Model Context Protocol (version 2024-11-05):
Initialize
List Tools
Call Tool
Example: Search Products
Example: Create Order
π Deployment
Prerequisites
Azure CLI installed and logged in
Azure subscription
Node.js 18+ installed locally
1. Create Resource Group
2. Deploy Infrastructure
β οΈ Note: APIM provisioning takes 15-30 minutes on first deployment.
3. Build Backend API
4. Deploy Backend API
5. Get APIM Subscription Key
π§ͺ Testing
Run Test Script
Expected Output
Manual Testing
π οΈ Development
Local Development
The server will start on http://localhost:3000.
Project Structure
π§ Configuration
APIM Settings
Subscription Required: Yes
Rate Limiting: Configurable via APIM policies
Authentication: Subscription key header (
Ocp-Apim-Subscription-Key)
App Service Settings
SKU: B1 Basic (Linux)
Node Version: 20 LTS
Startup Command:
node index.js
π Monitoring
Application Insights integrated with both App Service and APIM
Access logs in Log Analytics workspace
Health endpoint available at
/api/health
π Resources
π License
MIT