Running Multiple MCP Servers with Azure Logic Apps
Source: Dev.to
Overview
Model Context Protocol (MCP) is now the standard way to expose tools to AI agents.
Using Azure Logic Apps, you can create and run multiple MCP servers and let an agent consume them together—cleanly and modularly.
In this guide we will:
- Build a Basic Arithmetic MCP server
- Build an Extended Arithmetic MCP server
- Connect an agent to both servers
Building the MCP Servers
Create the Logic App workflows
Each operation is implemented as a separate Logic App workflow and exposed as an MCP tool. Typical workflow steps:
- Accept inputs – usually two numbers and an operation identifier.
- Execute the required logic – e.g., addition, subtraction, etc.
- Return a structured response – JSON format expected by the MCP client.
Group workflows into MCP servers
After creating the individual workflows, group them into two MCP servers:
| Server | Operations |
|---|---|
| BasicArithmetic | Add, Subtract, Multiply, Divide |
| ExtendedArithmetic | Power, Square Root, Modulo |
When workflows are grouped, Azure Logic Apps automatically persists the configuration in a file named mcpserver.json. This file contains:
- MCP server definitions
- Workflow (tool) mappings
Key idea: The grouped workflows define the MCP servers, and the definitions are written to
mcpserver.jsonwithout any manual steps.
Server Configuration (mcpserver.json)
The generated mcpserver.json looks roughly like this (simplified for illustration):
{
"servers": [
{
"name": "BasicArithmetic",
"tools": ["Add", "Subtract", "Multiply", "Divide"]
},
{
"name": "ExtendedArithmetic",
"tools": ["Power", "SquareRoot", "Modulo"]
}
]
}
The file is automatically updated whenever you add, remove, or modify workflows.
Accessing the MCP Servers
Once registered, each MCP server is reachable at a predictable URL:
https://<your-app>.azurewebsites.net/api/mcpservers/<server-name>/mcp
Examples:
- Basic server →
https://<your-app>.azurewebsites.net/api/mcpservers/BasicArithmetic/mcp - Extended server →
https://<your-app>.azurewebsites.net/api/mcpservers/ExtendedArithmetic/mcp
The
<server-name>in the URL must match exactly the name you used when grouping the workflows; no extra configuration is required.
Connecting an Agent to Multiple MCP Servers
The agent creates separate MCP client connections for each server:
- BasicArithmetic client → accesses add, subtract, multiply, divide.
- ExtendedArithmetic client → accesses power, square root, modulo.
This clean separation allows the agent to:
- Use basic operations from one server.
- Use advanced operations from another.
- Operate as if it were using a single unified toolset.
When the agent runs, it invokes operations across both MCP servers seamlessly, and the results are resolved correctly.
Benefits of the Multi‑Server Pattern
- Separation of concerns – each server focuses on a specific set of tools.
- Modular extensibility – add new operations by creating additional workflows and grouping them into a new server.
- Independent scalability – scale servers individually without affecting others.
- Zero‑code wiring – the agent can connect to multiple servers without extra configuration; the endpoint URLs are deterministic.
Overall, running multiple MCP servers from a single Azure Logic Apps instance provides a modular, composable tool ecosystem for AI agents.