You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/manuals/ai/mcp-catalog-and-toolkit/e2b-sandboxes.md
+62-79Lines changed: 62 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,37 +1,18 @@
1
1
---
2
-
title: Sandboxes
3
-
description: "Learn how sandboxes provide secure, isolated execution environments for AI agents in the MCP ecosystem, enabling safe code execution and protecting production systems."
4
-
keywords: Sandboxes, E2B, MCP Gateway, isolated environment, AI agent security
5
-
params:
6
-
sidebar:
7
-
badge:
8
-
color: green
9
-
text: New
10
-
weight: 50
2
+
title: E2B sandboxes
3
+
description: Cloud-based secure sandboxes for AI agents with built-in Docker MCP Gateway integration
4
+
keywords: E2B, cloud sandboxes, MCP Gateway, AI agents, MCP Catalog
5
+
aliases:
6
+
- /ai/mcp-catalog-and-toolkit/sandboxes/
11
7
---
12
8
13
-
Sandboxes are isolated execution environments that provide secure, controlled spaces for running code and applications without affecting the host system. They create strict boundaries around executing processes, preventing access to unauthorized resources while providing consistent, reproducible environments. Think of it as a virtual "playground" with clearly defined boundaries, where code can execute freely within those boundaries but cannot escape to impact other systems or access sensitive data.
9
+
Docker has partnered with [E2B](https://e2b.dev/), a provider of secure cloud sandboxes for AI agents. Through this partnership, every E2B sandbox includes direct access to Docker's [MCP Catalog](https://hub.docker.com/mcp), a collection of 200+ tools from publishers including GitHub, Notion, and Stripe.
14
10
15
-
In the Model Context Protocol ecosystem, sandboxes address several critical challenges that arise when AI agents need to execute code or interact with external systems. They enable safe code execution for AI-generated scripts, secure tool validation for MCP servers, and multi-tenant isolation when multiple agents share infrastructure. This ensures that sensitive credentials and data remain protected within appropriate security boundaries while maintaining compliance and audit requirements.
16
-
17
-
## Key features
18
-
19
-
- Isolation and Security: Complete separation between executing code and the host environment, with strict controls over file access, network connections, and system calls.
20
-
- Resource Management: Fine-grained control over CPU, memory, disk space, and network usage to prevent resource exhaustion.
21
-
- Reproducible Environments: Consistent, predictable execution environments. Code that runs successfully in one sandbox instance will behave identically in another.
22
-
- Ephemeral Environments: Temporary, disposable environments that can be destroyed after task completion, leaving no persistent artifacts.
23
-
24
-
## E2B sandboxes
25
-
26
-
Docker has partnered with [E2B](https://e2b.dev/), a provider of secure cloud sandboxes for AI agents. Through this partnership, every E2B sandbox now includes direct access to Docker’s [MCP Catalog](https://hub.docker.com/mcp), a collection of 200+ tools, including ones from known publishers such as GitHub, Notion, and Stripe, all enabled through the Docker MCP Gateway.
27
-
28
-
When creating a new sandbox, E2B users can specify which MCP tools the sandbox should access. E2B then launches these MCP tools and provides access through the Docker MCP Gateway.
29
-
30
-
The following example shows how to set up an E2B sandbox with GitHub and Notion MCP servers.
11
+
When you create a sandbox, you specify which MCP tools it should access. E2B launches these tools and provides access through the Docker MCP Gateway.
31
12
32
13
## Example: Using GitHub and Notion MCP server
33
14
34
-
The following example demonstrates how to analyze data in Notion and create GitHub issues. By the end, you'll understand how to connect multiple MCP servers in an E2B sandbox and orchestrate cross-platform workflows.
15
+
This example demonstrates how to connect multiple MCP servers in an E2B sandbox. You'll analyze data in Notion and create GitHub issues using Claude.
35
16
36
17
### Prerequisites
37
18
@@ -40,29 +21,28 @@ Before you begin, make sure you have the following:
40
21
-[E2B account](https://e2b.dev/docs/quickstart) with API access
41
22
- Anthropic API key for Claude
42
23
43
-
>[!Note]
44
-
>
45
-
> This example uses Claude CLI which comes pre-installed in E2B sandboxes. However,
46
-
> you can adapt the example to work with other AI assistants of your choice. See
47
-
> [E2B's MCP documentation](https://e2b.dev/docs/mcp/quickstart) for alternative
48
-
> connection methods.
24
+
> [!NOTE]
25
+
> This example uses Claude Code which comes pre-installed in E2B sandboxes.
26
+
> However, you can adapt the example to work with other AI assistants of your
27
+
> choice. See [E2B's MCP documentation](https://e2b.dev/docs/mcp/quickstart)
> Replace `owner/repo` in the prompt with your actual GitHub username and repository
342
326
> name (for example, `yourname/test-repo`).
@@ -418,16 +402,16 @@ if __name__ == "__main__":
418
402
419
403
Run the script:
420
404
421
-
```bash
422
-
python workflow.py
405
+
```console
406
+
$ python workflow.py
423
407
```
424
408
425
409
{{< /tab >}}
426
410
{{</tabs >}}
427
411
428
412
You should see:
429
413
430
-
```bash
414
+
```console
431
415
Creating sandbox...
432
416
433
417
Running example: Search Notion and create GitHub issue...
@@ -456,14 +440,13 @@ Successfully created test issue:
456
440
Both operations completed successfully. The MCP servers are properly configured and working.
457
441
```
458
442
459
-
You've successfully created an E2B sandbox with multiple MCP servers and used Claude to orchestrate a workflow across Notion and GitHub.
460
-
461
-
You can extend this example to combine any of the 200+ MCP servers in the Docker MCP Catalog to build sophisticated automation workflows for your specific needs.
443
+
The sandbox connected multiple MCP servers and orchestrated a workflow across Notion and GitHub. You can extend this pattern to combine any of the 200+ MCP servers in the Docker MCP Catalog.
462
444
463
445
## Related pages
464
446
465
447
-[How to build an AI-powered code quality workflow with SonarQube and E2B](/guides/github-sonarqube-sandbox.md)
466
448
-[Docker + E2B: Building the Future of Trusted AI](https://www.docker.com/blog/docker-e2b-building-the-future-of-trusted-ai/)
0 commit comments