Skip to content

feat (iac): [networking] add MCP subnet - #106

Open
ferantivero wants to merge 6 commits into
Azure-Samples:mainfrom
ferantivero:589557_mcp-subnet
Open

feat (iac): [networking] add MCP subnet#106
ferantivero wants to merge 6 commits into
Azure-Samples:mainfrom
ferantivero:589557_mcp-subnet

Conversation

@ferantivero

@ferantivero ferantivero commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

WHY

Foundry Agent Service supports private MCP server endpoints when the standard agent setup uses private networking and a dedicated subnet. The RI now provide the networking required for a future internal ACA environment that host MCP servers

WHAT

  • reserve a deleted /24 MCP subnet
  • add deny-by-default container apps nsg rules
  • allow private agent-to-mcp https traffic
  • route mcp egress through azure fw
  • update README

TEST

e2e passed

image

ferantivero and others added 6 commits July 24, 2026 16:53
Prepare the workload virtual network for privately hosted MCP servers:
- reserve a dedicated /24 subnet
- delegate the subnet to Microsoft.App/environments
- expose the subnet name and resource ID

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply deny-by-default controls for a future Container Apps environment:
- allow required platform, DNS, load-balancer, and intra-subnet traffic
- allow access to workload private endpoints
- attach the NSG to the reserved MCP subnet

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enable the private MCP request path within the workload virtual network:
- allow Foundry Agent outbound HTTPS to the MCP subnet
- allow matching inbound HTTPS on the MCP subnet

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Control private MCP server outbound traffic through Azure Firewall:
- associate the MCP subnet with the egress route table
- allow required Container Apps platform dependencies
- wire the MCP subnet into the firewall module

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify how agents reach public and private MCP servers:
- describe firewall-controlled public MCP egress
- identify the reserved private MCP subnet
- note that the Container Apps environment is not deployed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the Container Apps load-balancer probe rule lifecycle:
- retain the required dynamic allocation range initially
- narrow the NSG rule after Azure assigns the immutable ports

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ferantivero
ferantivero marked this pull request as ready for review July 25, 2026 18:38
Copilot AI review requested due to automatic review settings July 25, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds networking foundations for future private MCP servers hosted in Azure Container Apps.

Changes:

  • Reserves and secures a delegated MCP subnet.
  • Adds agent connectivity and firewall-controlled MCP egress.
  • Documents private and public MCP traffic flows.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
README.md Documents MCP networking behavior.
infra-as-code/bicep/network.bicep Adds the subnet, NSG rules, and outputs.
infra-as-code/bicep/main.bicep Passes the MCP subnet to the firewall module.
infra-as-code/bicep/azure-firewall.bicep Adds Container Apps and MCP egress policies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ckittel ckittel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing it? Where does this subnet get configured as being the MCP subnet in our foundry deployment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants