Skip to content

Commit 384e731

Browse files
authored
remove beta (#34)
1 parent 1d4ba73 commit 384e731

4 files changed

Lines changed: 27 additions & 27 deletions

File tree

docs/mcp.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-
1616
```typescript TypeScript
1717
import Sandbox from 'e2b'
1818

19-
const sbx = await Sandbox.betaCreate({
19+
const sbx = await Sandbox.create({
2020
mcp: {
2121
browserbase: {
2222
apiKey: process.env.BROWSERBASE_API_KEY!,
@@ -32,8 +32,8 @@ const sbx = await Sandbox.betaCreate({
3232
},
3333
});
3434

35-
const mcpUrl = sbx.betaGetMcpUrl();
36-
const mcpToken = await sbx.betaGetMcpToken();
35+
const mcpUrl = sbx.getMcpUrl();
36+
const mcpToken = await sbx.getMcpToken();
3737

3838
// You can now connect the gateway to any MCP client, for example claude:
3939
// This also works for your local claude!
@@ -55,7 +55,7 @@ import dotenv
5555
dotenv.load_dotenv()
5656

5757
async def main():
58-
sbx = await AsyncSandbox.beta_create(mcp={
58+
sbx = await AsyncSandbox.create(mcp={
5959
"browserbase": {
6060
"apiKey": os.getenv("BROWSERBASE_API_KEY"),
6161
"geminiApiKey": os.getenv("GEMINI_API_KEY"),
@@ -69,8 +69,8 @@ async def main():
6969
},
7070
})
7171

72-
mcp_url = sbx.beta_get_mcp_url()
73-
mcp_token = await sbx.beta_get_mcp_token()
72+
mcp_url = sbx.get_mcp_url()
73+
mcp_token = await sbx.get_mcp_token()
7474

7575
# You can now connect the gateway to any MCP client, for example claude:
7676
# This also works for your local claude!

docs/mcp/custom-servers.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The `runCmd` must start an MCP server that follows the [MCP specification](https
2121
```typescript TypeScript
2222
import Sandbox from 'e2b'
2323

24-
const sandbox = await Sandbox.betaCreate({
24+
const sandbox = await Sandbox.create({
2525
mcp: {
2626
'github/modelcontextprotocol/servers': {
2727
installCmd: 'npm install',
@@ -35,7 +35,7 @@ const sandbox = await Sandbox.betaCreate({
3535
from e2b import Sandbox
3636
import os
3737

38-
sbx = Sandbox.beta_create(
38+
sbx = Sandbox.create(
3939
mcp={
4040
"github/modelcontextprotocol/servers": {
4141
"install_cmd": "npm install",

docs/mcp/custom-templates.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You must use the MCP gateway enabled template (`mcp-gateway`) as your base templ
1414

1515
## Building a template with MCP servers
1616

17-
Use the `betaAddMcpServer()` method (TypeScript) or `beta_add_mcp_server()` method (Python) to prepull MCP server images during template build. You can pass a single server or an array of servers.
17+
Use the `addMcpServer()` method (TypeScript) or `add_mcp_server()` method (Python) to prepull MCP server images during template build. You can pass a single server or an array of servers.
1818

1919
The server names (like `"browserbase"` and `"exa"`) correspond to the keys defined in the [Available Servers](/docs/mcp/available-servers) documentation.
2020

@@ -26,7 +26,7 @@ import { Template } from "e2b";
2626

2727
export const template = Template()
2828
.fromTemplate("mcp-gateway")
29-
.betaAddMcpServer(["browserbase", "exa"]);
29+
.addMcpServer(["browserbase", "exa"]);
3030

3131
await Template.build(template, {
3232
alias: "my-mcp-gateway",
@@ -45,7 +45,7 @@ load_dotenv()
4545
template = (
4646
Template()
4747
.from_template("mcp-gateway")
48-
.beta_add_mcp_server(["browserbase", "exa"])
48+
.add_mcp_server(["browserbase", "exa"])
4949
)
5050

5151
Template.build(
@@ -67,7 +67,7 @@ Once built, create sandboxes from your template alias. You still need to provide
6767
```typescript JavaScript & TypeScript
6868
import { Sandbox } from "e2b";
6969

70-
const sandbox = await Sandbox.betaCreate({
70+
const sandbox = await Sandbox.create({
7171
template: "my-mcp-gateway",
7272
mcp: {
7373
browserbase: {
@@ -87,7 +87,7 @@ const sandbox = await Sandbox.betaCreate({
8787
from e2b import Sandbox
8888
import os
8989

90-
sbx = Sandbox.beta_create(
90+
sbx = Sandbox.create(
9191
template="my-mcp-gateway",
9292
mcp={
9393
"browserbase": {

docs/mcp/quickstart.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ You can connect to the MCPs running inside the sandbox both from outside and ins
77

88
## From outside the sandbox
99

10-
To connect to the MCPs running inside the sandbox, use the `sandbox.betaGetMcpUrl()` in JavaScript and `sandbox.beta_get_mcp_url()` in Python.
10+
To connect to the MCPs running inside the sandbox, use the `sandbox.getMcpUrl()` in JavaScript and `sandbox.get_mcp_url()` in Python.
1111
<CodeGroup>
1212
```typescript TypeScript
1313
import Sandbox from 'e2b'
1414
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
1515
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
1616

17-
const sandbox = await Sandbox.betaCreate({
17+
const sandbox = await Sandbox.create({
1818
mcp: {
1919
browserbase: {
2020
apiKey: process.env.BROWSERBASE_API_KEY!,
@@ -36,11 +36,11 @@ const client = new Client({
3636
});
3737

3838
const transport = new StreamableHTTPClientTransport(
39-
new URL(sandbox.betaGetMcpUrl()),
39+
new URL(sandbox.getMcpUrl()),
4040
{
4141
requestInit: {
4242
headers: {
43-
'Authorization': `Bearer ${await sandbox.betaGetMcpToken()}`
43+
'Authorization': `Bearer ${await sandbox.getMcpToken()}`
4444
}
4545
}
4646
}
@@ -66,7 +66,7 @@ from mcp.client.session import ClientSession
6666
from mcp.client.streamable_http import streamablehttp_client
6767

6868
async def main():
69-
sandbox = await AsyncSandbox.beta_create(
69+
sandbox = await AsyncSandbox.create(
7070
mcp={
7171
"browserbase": {
7272
"apiKey": os.environ["BROWSERBASE_API_KEY"],
@@ -83,8 +83,8 @@ async def main():
8383
)
8484

8585
async with streamablehttp_client(
86-
url=sandbox.beta_get_mcp_url(),
87-
headers={"Authorization": f"Bearer {await sandbox.beta_get_mcp_token()}"},
86+
url=sandbox.get_mcp_url(),
87+
headers={"Authorization": f"Bearer {await sandbox.get_mcp_token()}"},
8888
timeout=timedelta(seconds=600)
8989
) as (read_stream, write_stream, _):
9090
async with ClientSession(read_stream, write_stream) as session:
@@ -124,7 +124,7 @@ const mcp = new MCPServerStreamableHttp({
124124
name: 'E2B MCP Gateway',
125125
requestInit: {
126126
headers: {
127-
'Authorization': `Bearer ${await sandbox.betaGetMcpToken()}`
127+
'Authorization': `Bearer ${await sandbox.getMcpToken()}`
128128
}
129129
},
130130
});
@@ -140,8 +140,8 @@ async def main():
140140
async with MCPServerStreamableHttp(
141141
name="e2b-mcp-client",
142142
params={
143-
"url": sandbox.beta_get_mcp_url(),
144-
"headers": {"Authorization": f"Bearer {await sandbox.beta_get_mcp_token()}"},
143+
"url": sandbox.get_mcp_url(),
144+
"headers": {"Authorization": f"Bearer {await sandbox.get_mcp_token()}"},
145145
},
146146
) as server:
147147
tools = await server.list_tools()
@@ -167,11 +167,11 @@ const client = new Client({
167167
});
168168

169169
const transport = new StreamableHTTPClientTransport(
170-
new URL(sandbox.betaGetMcpUrl()),
170+
new URL(sandbox.getMcpUrl()),
171171
{
172172
requestInit: {
173173
headers: {
174-
'Authorization': `Bearer ${await sandbox.betaGetMcpToken()}`
174+
'Authorization': `Bearer ${await sandbox.getMcpToken()}`
175175
}
176176
}
177177
}
@@ -186,8 +186,8 @@ from mcp.client.streamable_http import streamablehttp_client
186186

187187
async def main():
188188
async with streamablehttp_client(
189-
url=sandbox.beta_get_mcp_url(),
190-
headers={"Authorization": f"Bearer {await sandbox.beta_get_mcp_token()}"},
189+
url=sandbox.get_mcp_url(),
190+
headers={"Authorization": f"Bearer {await sandbox.get_mcp_token()}"},
191191
timeout=timedelta(seconds=600)
192192
) as (read_stream, write_stream, _):
193193
async with ClientSession(read_stream, write_stream) as session:

0 commit comments

Comments
 (0)