Skip to content

Commit 4933911

Browse files
committed
docs: add network egress permissions for containerized MCP servers
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
1 parent e2b9847 commit 4933911

2 files changed

Lines changed: 56 additions & 2 deletions

File tree

docs/mcps.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,34 @@ tools:
194194
X-Custom-Key: "${secrets.CUSTOM_KEY}"
195195
```
196196

197+
## Network Egress Permissions
198+
199+
Restrict outbound network access for containerized MCP servers using a per‑tool domain allowlist. Define allowed domains under `mcp.permissions.network.allowed`.
200+
201+
```yaml
202+
tools:
203+
fetch:
204+
mcp:
205+
container: mcp/fetch
206+
permissions:
207+
network:
208+
allowed:
209+
- "example.com"
210+
allowed: ["fetch"]
211+
```
212+
213+
Enforcement in compiled workflows:
214+
215+
- A Squid proxy is generated and pinned to a dedicated Docker network for each proxy‑enabled MCP server.
216+
- The MCP container is configured with `HTTP_PROXY`/`HTTPS_PROXY` to point at Squid; iptables rules only allow egress to the proxy.
217+
- The proxy is seeded with an `allowed_domains.txt` built from your `allowed` list; requests to other domains are blocked.
218+
219+
Notes:
220+
221+
- Applies to stdio MCP servers that specify a `container`. Non‑container stdio and remote `type: http` servers do not use this control (at the moment)
222+
- Use bare domains without scheme; list each domain you intend to permit.
223+
224+
197225
## Debugging and Troubleshooting
198226

199227
### MCP Server Inspection
@@ -256,4 +284,4 @@ Error: Tool 'my_tool' not found
256284
## External Resources
257285
258286
- [Model Context Protocol Specification](https://github.com/modelcontextprotocol/specification)
259-
- [GitHub MCP Server](https://github.com/github/github-mcp-server)
287+
- [GitHub MCP Server](https://github.com/github/github-mcp-server)

docs/security-notes.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,33 @@ tools:
169169

170170
#### Egress Filtering
171171

172-
A critical guardrail is strict control over outbound network connections. Consider using network proxies to enforce allowlists for outbound hosts.
172+
A critical guardrail is strict control over outbound network connections. Agentic Workflows now supports declarative network allowlists for containerized MCP servers.
173+
174+
Example (domain allowlist):
175+
176+
```yaml
177+
tools:
178+
fetch:
179+
mcp:
180+
type: stdio
181+
container: mcp/fetch
182+
permissions:
183+
network:
184+
allowed:
185+
- "example.com"
186+
allowed: ["fetch"]
187+
```
188+
189+
Enforcement details:
190+
191+
- Compiler generates a per‑tool Squid proxy and Docker network; MCP egress is forced through the proxy via iptables.
192+
- Only listed domains are reachable; all others are denied at the network layer.
193+
- Applies to `mcp.container` stdio servers. Non‑container stdio and `type: http` servers are not governed by this control.
194+
195+
Operational guidance:
196+
197+
- Use bare domains (no scheme). Explicitly list each domain you intend to permit.
198+
- Prefer minimal allowlists; review the compiled `.lock.yml` to verify proxy setup and rules.
173199

174200
### Agent Security and Prompt Injection Defense
175201

0 commit comments

Comments
 (0)