Skip to content

Commit fcc56a0

Browse files
dvdksncodexclaude
authored
sbx: local mcp gateway and mcp governance (#25559)
## Summary Add Docker Sandboxes MCP docs for the local gateway path, including `sbx mcp` usage, OAuth behavior, bundles, explicit sandbox exposure, built-in gateway tools, and MCP access-governance documentation. Generated by Codex ## Scope note for reviewers This PR deliberately documents the local MCP gateway path only. That is the path that ships by default for Docker Sandboxes: servers and bundles are registered on the host, exposed explicitly to sandboxes, and governed through the local gateway surface. Remote, SaaS, and self-hosted gateway behavior is intentionally out of scope for this PR. That includes dynamic discovery tools such as `mcp-find` and `mcp-add`, remote dataplane behavior, and setup for non-local gateways. These will be documented in a follow-up PR. The MCP policy reference is likewise limited to values available in the local gateway path. Hosted-only policy surface, including the `container-stdio` server type, `resource.category`, and `context.oauth_scopes`, is deferred to the same follow-up. Preview links: - [MCP gateway](https://deploy-preview-25559--docsdocker.netlify.app/ai/sandboxes/mcp-gateway/) - [MCP policies concept](https://deploy-preview-25559--docsdocker.netlify.app/ai/sandboxes/governance/concepts/#mcp-policies) - [MCP access policies](https://deploy-preview-25559--docsdocker.netlify.app/ai/sandboxes/governance/access-controls/mcp/) - [MCP policy reference](https://deploy-preview-25559--docsdocker.netlify.app/ai/sandboxes/governance/reference/mcp-policy/) --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3c2573a commit fcc56a0

34 files changed

Lines changed: 1388 additions & 355 deletions

content/manuals/admin/organization/manage/manage-licenses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ See these docs to explore Docker Core add-ons, or products that need licenses:
4444

4545
- [Docker plans](/manuals/subscription/plans/_index.md) to learn about different add-ons
4646
- [Manage seats](/manuals/admin/organization/manage/manage-seats.md) to add more seats to your Docker Core subscription
47-
- [AI Governance](/manuals/ai/sandboxes/governance/org.md) to set up organization policies for your organization members
47+
- [AI Governance plan](/manuals/subscription/plans/ai-governance.md) to learn about AI Governance license usage and billing
4848
- [Docker Offload](/manuals/offload/about.md) to let your developers offload building and running containers to the cloud

content/manuals/ai/sandboxes/_index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ system.
1818
> [organization governance](governance/) requires a separate paid subscription.
1919
2020
Organization admins can
21-
[centrally manage sandbox network and filesystem policies](governance/org.md),
22-
so the same rules apply uniformly across every developer's machine. Available
23-
on a separate paid subscription.
21+
[centrally manage sandbox network, filesystem, and MCP policies](governance/access-controls/organization.md),
22+
so the same controls apply uniformly across every developer's machine.
23+
Available on a separate paid subscription.
2424

2525
## Get started
2626

@@ -75,6 +75,8 @@ the [usage guide](usage.md) for basic commands.
7575
- [Agents](agents/) — supported agents and per-agent configuration
7676
- [Integrations](integrations/) — connect editors and apps like VS Code and
7777
Cursor to a sandbox over SSH
78+
- [MCP gateway](mcp-gateway.md) — register MCP servers and connect them to
79+
sandboxed agents
7880
- [Customize](customize/) — reusable templates and declarative kits for
7981
extending or tailoring sandboxes
8082
- [Architecture](architecture.md) — microVM isolation, workspace mounting,

content/manuals/ai/sandboxes/agents/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Supported agents
33
linkTitle: Agents
4-
weight: 30
4+
weight: 40
55
description: AI coding agents supported by Docker Sandboxes.
66
keywords: docker sandboxes, ai agents, claude code, codex, cursor, gemini
77
---

content/manuals/ai/sandboxes/architecture.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Architecture
3-
weight: 40
3+
weight: 70
44
description: Technical architecture of Docker Sandboxes; workspace mounting, storage, networking, and sandbox lifecycle.
55
keywords: docker sandboxes, architecture, microVM, workspace mounting, sandbox lifecycle
66
---
@@ -54,7 +54,7 @@ $ DOCKER_SANDBOXES_ENABLE_VIRTIOFS_CACHE=0 sbx run <template>
5454

5555
All outbound traffic from the sandbox routes through an HTTP/HTTPS proxy on
5656
your host. Agents are configured to use the proxy automatically. The proxy
57-
enforces [network access policies](governance/) and handles
57+
enforces [network access policies](governance/access-controls/network.md) and handles
5858
[credential injection](security/credentials.md). See
5959
[Network isolation](security/isolation.md#network-isolation) for how this
6060
works and [Default security posture](security/defaults.md) for what is
@@ -102,6 +102,22 @@ One limitation applies:
102102
`HTTP_PROXY`, `HTTPS_PROXY`, or `DOCKER_SANDBOXES_PROXY` environment variables
103103
explicitly.
104104

105+
## MCP gateway
106+
107+
Supported agents connect to a single MCP gateway endpoint for the sandbox. The
108+
gateway runs on the host side of the sandbox boundary and brokers access to
109+
registered MCP servers.
110+
111+
Registered MCP servers can be remote endpoints, or they can be local stdio
112+
servers launched on the host. Local stdio servers don't run inside the sandbox
113+
VM. If a local stdio server is packaged as an OCI image, or if you register an
114+
explicit `docker` command, it uses Docker on the host.
115+
116+
When MCP policies apply, enforcement happens on the MCP gateway path, separate
117+
from the HTTP/HTTPS network proxy. Server registration is checked before the
118+
server is stored, and governed MCP requests are checked by the gateway before
119+
tool calls, resource reads, prompt retrieval, or gateway meta-tool execution.
120+
105121
## Lifecycle
106122

107123
`sbx run` initializes a VM with a workspace for a specified agent and starts

content/manuals/ai/sandboxes/customize/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Customizing sandboxes
33
linkTitle: Customize
44
description: Build reusable sandbox images, extend agents with tools and credentials, and define custom agents using templates and kits.
55
keywords: sandboxes, sbx, customize, templates, kits, mixins, custom agents
6-
weight: 35
6+
weight: 60
77
aliases:
88
- /ai/sandboxes/agents/custom-environments/
99
params:

content/manuals/ai/sandboxes/customize/kit-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Install steps run under `sh`, not bash, so bash-only builtins such as
8585
(`curl … | bash`) or wrap the step in `bash -c '…'` when you need them.
8686

8787
Downloads are subject to the sandbox's
88-
[deny-by-default network policy](../governance/local.md). A domain that
88+
[network access rules](../governance/access-controls/network.md). A domain that
8989
resolves from your host can still be blocked inside the sandbox — for
9090
example, `get.sdkman.io` returns a 403 until you allow it with
9191
`sbx policy allow network get.sdkman.io`. A tool may also need base

content/manuals/ai/sandboxes/faq.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: FAQ
3-
weight: 70
3+
weight: 110
44
description: Frequently asked questions about Docker Sandboxes.
55
keywords: docker sandboxes, sbx, faq, sign in, telemetry, clipboard, image paste, pricing, commercial use, allowlist, firewall, domains, proxy
66
---
@@ -11,8 +11,9 @@ Yes to both. The `sbx` CLI is free to use, including for commercial and
1111
professional work, with no per-seat fee. Install it, sign in with a free
1212
Docker account, and run sandboxes at no cost.
1313

14-
The only paid component is organization governance: centrally managed network
15-
and filesystem policies, [sign-in enforcement](governance/sign-in-enforcement.md),
14+
The only paid component is organization governance: centrally managed network,
15+
filesystem, and MCP policies,
16+
[sign-in enforcement](governance/monitor-and-enforce/sign-in-enforcement.md),
1617
and [audit logs](governance/audit/). These
1718
[organization governance features](governance/) require a separate paid
1819
subscription —
@@ -29,9 +30,8 @@ Signing in gives each sandbox a verified identity, which lets Docker:
2930
containers, install packages, and push code. Your Docker identity is the
3031
anchor.
3132
- **Enable team features.** Team-scale features like
32-
[organization governance](governance/org.md), shared environments, and
33-
audit logs need a concept of "who," and adding that later would be worse for
34-
everyone.
33+
[organization governance](governance/), shared environments, and audit logs
34+
need a concept of "who," and adding that later would be worse for everyone.
3535
- **Authenticate against Docker infrastructure.** Sandboxes pull images, run
3636
daemons, and talk to Docker services. A Docker account authenticates those
3737
requests.
@@ -40,13 +40,13 @@ Your Docker account email is only used for authentication, not marketing.
4040

4141
## Can I enforce sandbox policies across my organization?
4242

43-
Yes. Admins can centrally manage network and filesystem policies. These
44-
rules apply to every sandbox in the
45-
organization. When organization governance is active, it replaces local rules
46-
set with `sbx policy` — local rules are no longer evaluated.
43+
Yes. Admins can centrally manage network, filesystem, and MCP policies. These
44+
controls apply to every sandbox in the organization. When organization
45+
governance is active, it replaces local rules set with `sbx policy` — local
46+
rules are no longer evaluated.
4747

48-
See [Organization governance](governance/org.md). This feature requires
49-
a separate paid subscription —
48+
See [Organization policies](governance/access-controls/organization.md). This
49+
feature requires a separate paid subscription —
5050
[contact Docker Sales](https://www.docker.com/products/ai-governance/#contact-sales)
5151
to get started.
5252

@@ -132,7 +132,7 @@ $ echo $BRAVE_API_KEY
132132
## Why do agents run without approval prompts?
133133

134134
The sandbox itself is the safety boundary. Because agents run inside an
135-
isolated microVM with [network policies](governance/),
135+
isolated microVM with [network policies](governance/access-controls/network.md),
136136
[credential isolation](security/credentials.md), and no access to your host
137137
system outside explicitly shared paths, the usual reasons for approval prompts
138138
(preventing destructive commands, network access, file modifications) are

content/manuals/ai/sandboxes/get-started.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ Initialize the global network policy for your sandboxes:
160160

161161
**Balanced** is a good starting point — it permits traffic to common
162162
development services while blocking everything else. You can adjust individual
163-
rules later. See [Policies](governance/local.md) for a full description of each
164-
option.
163+
rules later. See [Local policy](governance/access-controls/local.md) for a full
164+
description of each option.
165165

166166
Replace `claude` with the agent you want to use — see [Agents](agents/) for the
167167
full list.
@@ -224,11 +224,11 @@ To allow a specific host:
224224
$ sbx policy allow network registry.npmjs.org
225225
```
226226

227-
With **Balanced**, common development services are allowed by default. With
228-
**Locked Down**, everything is blocked until you allow it — including your
229-
model provider's API. If the agent can't reach a service it needs, the network
230-
policy is the first place to look. See [Policies](governance/local.md) for the
231-
full rule set and how to customize it.
227+
With **Locked Down**, even your model provider API is blocked unless you
228+
explicitly allow it. With **Balanced**, common development services are
229+
permitted by default. See
230+
[local policy](governance/access-controls/local.md) for the full rule set
231+
and how to customize it.
232232

233233
## Clean up
234234

@@ -272,5 +272,5 @@ Then explore:
272272
network rules into a reusable definition you launch with a single flag.
273273
- [Agents](agents/) — the full list of supported agents and how to configure
274274
each one.
275-
- [Governance](governance/) — centrally manage network and filesystem policies
276-
across a team.
275+
- [Governance](governance/) — centrally manage network, filesystem, and MCP
276+
policies across a team.
Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
---
22
title: Governance
3-
weight: 55
3+
weight: 90
44
description: Control what sandboxes can access, from local developer rules to org-wide enforcement.
5-
keywords: docker sandboxes, governance, policy, network access, filesystem access, organization policy
5+
keywords: docker sandboxes, governance, policy, network access, filesystem access, mcp policy, organization policy
66
---
77

88
Sandbox governance covers the policy system that controls what sandboxes can
9-
access over the network and on the filesystem. It operates at two layers, and
10-
only one applies at a time:
9+
access over the network, on the filesystem, and through MCP. For MCP setup and
10+
server registration, see [MCP gateway](../mcp-gateway.md). Governance operates
11+
at two layers, and only one applies at a time:
1112

12-
**Local policy** is configured per machine using the `sbx policy` CLI. It lets
13-
individual developers customize which domains their sandboxes can reach. See
14-
[Local policy](local.md).
13+
**Local policy** is configured per machine using the `sbx policy` CLI. It
14+
lets individual developers customize which domains their sandboxes can reach.
15+
See [Local policy](access-controls/local.md).
1516

16-
**Organization policy** is configured centrally in the Docker Admin Console or
17-
via the [Governance API](/reference/api/ai-governance/). Rules defined at the
18-
org level apply uniformly across every sandbox in the organization. When
17+
**Organization policy** is configured centrally in Docker Home. Network and
18+
filesystem policies can also be managed via the
19+
[Governance API](/reference/api/ai-governance/). Controls defined at the org
20+
level apply uniformly across every sandbox in the organization. Organization
21+
governance can also include MCP policies for sandbox MCP activity. When
1922
organization governance is active, it replaces local policy entirely: local
2023
`sbx policy` rules are no longer evaluated. See
21-
[Organization policy](org.md).
24+
[Organization policies](access-controls/organization.md).
2225

2326
Alongside this access-control policy, admins can require developers to sign in
2427
as members of their organization before using sandboxes at all.
25-
[Sign-in enforcement](sign-in-enforcement.md) is deployed through endpoint
26-
management and ensures developers can't bypass organization policy by using a
27-
personal account.
28+
[Sign-in enforcement](monitor-and-enforce/sign-in-enforcement.md) is deployed
29+
through endpoint management and ensures developers can't bypass organization
30+
policy by using a personal account.
2831

2932
> [!NOTE]
3033
> Organization governance is available on a separate paid subscription.
@@ -33,17 +36,36 @@ personal account.
3336
3437
## Learn more
3538

36-
- [Policy concepts](concepts.md): resource model, rule syntax, evaluation, and
37-
precedence
38-
- [Local policy](local.md): configure network and filesystem rules on your
39-
machine with the `sbx policy` CLI
40-
- [Organization policy](org.md): centrally manage sandbox policies across your
41-
organization from the Admin Console
42-
- [Sign-in enforcement](sign-in-enforcement.md): require developers to sign in
43-
as organization members, enforced through endpoint management
44-
- [Monitoring](monitoring.md): inspect active rules and monitor sandbox network
45-
traffic with `sbx policy ls` and `sbx policy log`
39+
Start with [Policy concepts](concepts.md) for the resource model, rule syntax,
40+
MCP policy basics, evaluation, and precedence.
41+
42+
### Access controls
43+
44+
- [Local policy](access-controls/local.md): configure network rules on your
45+
machine with the `sbx policy` CLI.
46+
- [Organization policies](access-controls/organization.md): centrally manage
47+
sandbox policies across your organization.
48+
- [Network access policies](access-controls/network.md): control outbound network
49+
access from sandboxes.
50+
- [Filesystem access policies](access-controls/filesystem.md): control which
51+
host paths sandboxes can mount as workspaces.
52+
- [MCP access policies](access-controls/mcp.md): control MCP server registration,
53+
tool calls, resources, prompts, and approval gates.
54+
55+
### Monitor and enforce
56+
57+
- [Monitoring policies](monitor-and-enforce/monitoring.md): inspect active
58+
rules and monitor sandbox network traffic with `sbx policy ls` and
59+
`sbx policy log`.
4660
- [Audit logs](audit/): view, configure, export, and collect governance audit
47-
records
48-
- [API reference](/reference/api/ai-governance/): manage org policies
49-
programmatically via the Governance API
61+
records.
62+
- [Sign-in enforcement](monitor-and-enforce/sign-in-enforcement.md): require
63+
developers to sign in as organization members, enforced through endpoint
64+
management.
65+
66+
### Reference
67+
68+
- [AI Governance API](/reference/api/ai-governance/): manage network and
69+
filesystem org policies programmatically.
70+
- [MCP policy reference](reference/mcp-policy.md): look up Docker MCP policy
71+
actions, resources, attributes, context fields, and approval behavior.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Access controls
3+
weight: 20
4+
description: Configure local and organization controls for sandbox network, filesystem, and MCP access.
5+
keywords: docker sandboxes, access controls, governance, network access, filesystem access, MCP access
6+
---
7+
8+
Access controls are expressed as policies. Local and organization pages
9+
describe where policies apply. Network and filesystem pages describe the rules
10+
inside those policies. MCP policies use Cedar statements instead of the network
11+
and filesystem rule format.
12+
13+
## Policy scope
14+
15+
- [Local policy](local.md): configure network rules on a developer machine with
16+
the `sbx policy` CLI.
17+
- [Organization policies](organization.md): manage centralized policies for an
18+
organization or team.
19+
20+
## Access surfaces
21+
22+
- [Network access policies](network.md): control outbound network access from
23+
sandboxes.
24+
- [Filesystem access policies](filesystem.md): control which host paths
25+
sandboxes can mount as workspaces.
26+
- [MCP access policies](mcp.md): control MCP server registration, tool calls,
27+
resources, prompts, and approval gates with Cedar policy.

0 commit comments

Comments
 (0)