update github & e2bdev mcp descriptions (#2107)

This commit is contained in:
mirror
2025-04-23 20:08:21 +08:00
committed by GitHub
parent 8752a763c2
commit 38f718b965
4 changed files with 218 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
# E2BDev MCP Server
An implementation of the Model Context Protocol (MCP) server that integrates E2B Code Interpreter API, providing sandbox environment management capabilities, which enables execution of Python code.
## Usage Guide
### Get API-KEY
1. Register for an E2B account [Resigter Entry](https://e2b.dev/auth/sign-up). Each new account will receive 100 credits for free.
2. Generate API Key in Dashboard [Manage API-KEY](https://e2b.dev/dashboard?tab=keys)
### Configure MCP Client
On the user's MCP Client interface, add E2BDev MCP Server configuration.
```json
"mcpServers": {
"e2bdev": {
"url": "http://mcp.higress.ai/mcp-e2bdev/{generate_key}",
}
}
```
### Tools
- **create_sandbox**: Create E2B sandbox environment
- Parameters:
- timeout: Sandbox timeout in seconds, sandbox will be terminated after timeout
- Returns: Sandbox ID
- **execute_code_sandbox**: Execute code in sandbox
- Parameters:
- sandbox_id: Sandbox ID, obtained from create_sandbox
- code: Python code to execute
- Returns: Execution result
- **kill_sandbox**: Terminate sandbox environment
- Parameters:
- sandbox_id: Sandbox ID to terminate
- Returns: Termination result

View File

@@ -0,0 +1,39 @@
# E2BDev MCP Server
基于E2B Code Interpreter API 的MCP服务器实现提供沙盒环境管理功能沙盒环境中可执行Python代码。
## 使用教程
### 获取 API-KEY
1. 注册E2B账号 [注册入口](https://e2b.dev/auth/sign-up),每位新用户有$100的免费额度。
2. 在DashBoard中生成 API Key [生成 API Key](https://e2b.dev/dashboard?tab=keys)
### 配置 MCP Client
在用户的 MCP Client 界面,添加 E2BDev MCP Server 配置。
```json
"mcpServers": {
"e2bdev": {
"url": "http://mcp.higress.ai/mcp-e2bdev/{generate_key}",
}
}
```
### 工具使用
- **create_sandbox**: 创建E2B沙盒环境
- 参数:
- timeout: 沙盒超时时间(秒),超时后沙盒将被终止
- 返回: 沙盒ID
- **execute_code_sandbox**: 在沙盒中执行代码
- 参数:
- sandbox_id: 沙盒ID从create_sandbox获取
- code: 要执行的Python代码
- 返回: 执行结果
- **kill_sandbox**: 终止沙盒环境
- 参数:
- sandbox_id: 要终止的沙盒ID
- 返回: 终止结果

View File

@@ -0,0 +1,87 @@
server:
name: e2bdev-api-server
config:
apiKey: ""
tools:
- name: create_sandbox
description: Create e2b sandbox and return sandboxID
args:
- name: templateID
description: "type of sandbox, fixed parameter"
type: string
enum: ["code-interpreter-beta"]
- name: timeout
description: "sanbox timeout in seconds, sanbox will be killed after timeout."
type: int
required: true
default: 300
requestTemplate:
url: https://api.e2b.dev/sandboxes
method: POST
argsToJsonBody: true
headers:
- key: Content-Type
value: "application/json"
- key: X-API-key
value: "{{.config.apiKey}}"
responseTemplate:
body: |
{
"sandboxID": "{{.sandboxID}}-{{.clientID}}"
}
- name: execute_code_sandbox
description: Execute code in e2b sandbox
args:
- name: sandbox_id
description: "create sandbox id, get from create_sandbox"
type: string
required: true
position: path
- name: code
description: "python code to execute"
type: string
required: true
position: body
requestTemplate:
url: "https://49999-{{.args.sandbox_id}}.e2b.dev/execute"
method: POST
argsToJsonBody: true
headers:
- key: Content-Type
value: "application/json"
- key: Authorization
value: "Bearer {{.config.apiKey}}"
responseTemplate:
prependBody: |+
# API Response Information
Below is the response from an API call. To help you understand the data, I've provided:
1. A detailed description of all fields in the response structure
2. The complete API response
## Response Structure
> Content-Type: application/json
result.type is valid only when in ["stdout", "stdout", "result", "error"]
- **result: **: (Type: object)
- **result.type**: (Type: string)
- **result.text**: (Type: string)
## Original Response
- name: kill_sandbox
description: Kill e2b sandbox
args:
- name: sandbox_id
description: "sandbox id, get from get_sandbox_id"
type: string
required: true
position: path
requestTemplate:
url: https://api.e2b.dev/sandboxes/{{.args.sandbox_id}}
method: DELETE
headers:
- key: X-API-key
value: "{{.config.apiKey}}"