Skip to content

Commit d4eff21

Browse files
CopilotMossaka
andauthored
Document AWF–MCP gateway interplay in security architecture (#9471)
* Initial plan * plan: update security architecture docs Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * docs: add mcp gateway + awf architecture flow Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * chore: merge main into copilot/update-security-architecture Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> Co-authored-by: Jiaxiao Zhou <duibao55328@gmail.com>
1 parent 07eeaf9 commit d4eff21

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/src/content/docs/introduction/architecture.mdx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,35 @@ network:
185185
- "api.example.com" # Custom domain
186186
```
187187
188+
## MCP Gateway + Firewall Flow
189+
190+
When the MCP gateway is enabled, the firewall and gateway work together to keep MCP traffic contained while still allowing the agent to reach the GitHub MCP server.
191+
192+
```mermaid
193+
flowchart LR
194+
subgraph Host["Host machine"]
195+
GATEWAY["gh-aw-mcpg\nDocker container\nHost port 80 maps to container port 8000"]
196+
GH_MCP["GitHub MCP Server\nspawned via Docker socket"]
197+
GATEWAY -->|"spawns"| GH_MCP
198+
end
199+
200+
subgraph AWFNet["AWF network namespace"]
201+
AGENT["Agent container\nCopilot CLI + MCP client\n172.30.0.20"]
202+
PROXY["Squid proxy\n172.30.0.10"]
203+
end
204+
205+
AGENT -->|"CONNECT host.docker.internal:80"| PROXY
206+
PROXY -->|"allowed domain\n(host.docker.internal)"| GATEWAY
207+
GATEWAY -->|"forwards to"| GH_MCP
208+
```
209+
210+
**How the pieces fit together**
211+
212+
1. AWF starts an isolated network with a Squid proxy that enforces the workflow `network.allowed` list.
213+
2. The agent container can only egress through Squid. To reach the gateway, it uses `host.docker.internal:80` (Docker's host alias). That hostname must be allowed by the firewall.
214+
3. The `gh-aw-mcpg` container publishes host port 80 mapped to container port 8000. It then uses the Docker socket to spawn the GitHub MCP server container.
215+
4. All MCP traffic stays inside the host boundary: the firewall restricts egress, and the gateway routes requests to the sandboxed GitHub MCP server.
216+
188217
## MCP Server Sandboxing
189218

190219
Model Context Protocol (MCP) servers run in isolated containers with explicit tool filtering, preventing unauthorized access and limiting the attack surface.

0 commit comments

Comments
 (0)