# azure-samples/azmcp-copilot-studio-aca-mi architecture

> Architecture diagram of the GitHub repository azure-samples/azmcp-copilot-studio-aca-mi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/azure-samples/azmcp-copilot-studio-aca-mi
- Repository: https://github.com/azure-samples/azmcp-copilot-studio-aca-mi

## Overview

This repository is a deployment template for hosting Azure MCP Server in Azure Container Apps and connecting it to Copilot Studio through a Power Apps custom connector. The documented workflow is to deploy the server and supporting identity/authentication resources, configure the connector to use the server’s HTTPS endpoint and OAuth, then invoke Azure Storage tools. The README documents the resource roles and user workflow; no source excerpts were provided, so links between individual Bicep modules are omitted where their calls are not evidenced.

Main entry points: [`infra/modules/aca-infrastructure.bicep`](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/aca-infrastructure.bicep) (Container App), [`infra/main.bicep`](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/main.bicep) (Deployment entry), [`infra/modules/aca-storage-managed-identity.bicep`](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/aca-storage-managed-identity.bicep) (Storage managed identity), [`infra/modules/entra-app.bicep`](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/entra-app.bicep) (Server app registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deployment["Azure deployment"]
  node_main["Deployment entry<br/>[main.bicep]"]
  node_aca["Container App"]
  node_mcp["Azure MCP Server"]
end

subgraph group_identity["Identity and monitoring"]
  node_storage_identity["Storage managed identity"]
  node_subscription_role["Subscription Reader role"]
  node_server_app["Server app registration<br/>[entra-app.bicep]"]
  node_client_app["Client app registration<br/>[entra-app.bicep]"]
  node_insights[("Application Insights")]
end

subgraph group_connection["Agent connection"]
  node_swagger["Connector API example"]
  node_connector["Custom connector"]
end

node_operator(("Deploying operator"))
node_azd["Azure Developer CLI"]
node_azure_storage[("Azure Storage")]
node_power_apps["Power Apps"]
node_copilot(("Copilot Studio agent"))
node_foundry(("Microsoft Foundry agent"))

node_operator -->|"runs deployment"| node_azd
node_azd -->|"deploys template"| node_main
node_main -.->|"provisions app"| node_aca
node_aca -->|"runs server"| node_mcp
node_mcp -->|"calls tools"| node_azure_storage
node_aca -->|"uses identity"| node_storage_identity
node_storage_identity -->|"has role"| node_subscription_role
node_connector -->|"requests OAuth"| node_server_app
node_connector -->|"authenticates with"| node_client_app
node_server_app -->|"pre-authorizes"| node_client_app
node_power_apps -->|"uses example"| node_swagger
node_connector -->|"invokes over HTTPS"| node_mcp
node_copilot -->|"uses connector"| node_connector
node_foundry -->|"invokes tools"| node_mcp
node_aca -.->|"monitored by"| node_insights

click node_main "https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/main.bicep"
click node_aca "https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/aca-infrastructure.bicep"
click node_storage_identity "https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/aca-storage-managed-identity.bicep"
click node_subscription_role "https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/aca-storage-subscription-role.bicep"
click node_server_app "https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/entra-app.bicep"
click node_client_app "https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/entra-app.bicep"
click node_insights "https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/application-insights.bicep"
click node_swagger "https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/custom-connector-swagger-example.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_aca,node_mcp toneBlue
class node_storage_identity,node_subscription_role,node_server_app,node_client_app,node_insights,node_azure_storage toneAmber
class node_swagger,node_connector toneMint
class node_operator,node_azd,node_power_apps,node_copilot,node_foundry toneIndigo
```

## Components

### Azure deployment

- [Deployment entry](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/main.bicep): `infra/main.bicep`
- [Container App](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/aca-infrastructure.bicep): `infra/modules/aca-infrastructure.bicep`
- **Azure MCP Server**

### Identity and monitoring

- [Storage managed identity](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/aca-storage-managed-identity.bicep): `infra/modules/aca-storage-managed-identity.bicep`
- [Subscription Reader role](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/aca-storage-subscription-role.bicep): `infra/modules/aca-storage-subscription-role.bicep`
- [Server app registration](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/entra-app.bicep): `infra/modules/entra-app.bicep`
- [Client app registration](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/entra-app.bicep): `infra/modules/entra-app.bicep`
- [Application Insights](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/infra/modules/application-insights.bicep): `infra/modules/application-insights.bicep`

### Agent connection

- [Connector API example](https://github.com/azure-samples/azmcp-copilot-studio-aca-mi/blob/main/custom-connector-swagger-example.yaml): `custom-connector-swagger-example.yaml`
- **Custom connector**

### Other components

- **Deploying operator**
- **Azure Developer CLI**
- **Azure Storage**
- **Power Apps**
- **Copilot Studio agent**
- **Microsoft Foundry agent**

## Connections

- Deploying operator → Azure Developer CLI: runs deployment (evidence: `README.md`)
- Azure Developer CLI → Deployment entry: deploys template (evidence: `README.md`)
- Deployment entry → Container App: provisions app
- Container App → Azure MCP Server: runs server (evidence: `README.md`)
- Azure MCP Server → Azure Storage: calls tools (evidence: `README.md`)
- Container App → Storage managed identity: uses identity (evidence: `README.md`)
- Storage managed identity → Subscription Reader role: has role (evidence: `README.md`)
- Custom connector → Server app registration: requests OAuth (evidence: `README.md`)
- Custom connector → Client app registration: authenticates with (evidence: `README.md`)
- Server app registration → Client app registration: pre-authorizes (evidence: `README.md`)
- Power Apps → Connector API example: uses example (evidence: `README.md`)
- Custom connector → Azure MCP Server: invokes over HTTPS (evidence: `README.md`)
- Copilot Studio agent → Custom connector: uses connector (evidence: `README.md`)
- Microsoft Foundry agent → Azure MCP Server: invokes tools (evidence: `README.md`)
- Container App → Application Insights: monitored by
