68abd92c40
Adds prepulling mcp server images to the SDK.
```typescript
export const template = Template()
.fromTemplate("mcp-gateway")
.betaAddMcpServer("arxiv")
await Template.build(template, {
alias: "arxiv-mcp-gateway",
cpuCount: 1,
memoryMB: 1024,
onBuildLogs: console.log,
});
```
```python
template = Template().from_template("mcp-gateway").beta_add_mcp_server("arxiv")
Template.build(
template,
alias="arxiv-mcp-gateway-v1",
cpu_count=1,
memory_mb=1024,
)
```
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduce beta methods to prepull MCP servers via mcp-gateway in JS
and Python templates, with typing, validation, and stacktrace-tested
errors.
>
> - **Template SDKs**
> - **JS**:
> - Add `Template.betaAddMcpServer(servers: McpServerName |
McpServerName[])` to run `mcp-gateway pull ...`.
> - Enforce base template check (`'mcp-gateway'`), throwing `BuildError`
with stack trace.
> - Introduce and export `McpServerName` type (from `../sandbox/mcp`).
> - **Python**:
> - Add `Template.beta_add_mcp_server(servers: Union[str, List[str]])`
to run `mcp-gateway pull ...`.
> - Enforce `'mcp-gateway'` base template; raise `BuildException` with
captured traceback.
> - **Tests**
> - Add stacktrace tests for `betaAddMcpServer` (JS) and
`beta_add_mcp_server` (Python async/sync).
> - **Release**
> - Changeset: patch bumps for `@e2b/python-sdk` and `e2b`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
43b4a01ce3c856dff7def5ba6b706ee00eda0f84. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Joseph Lombrozo <joe.lombrozo@e2b.dev>