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}}"

View File

@@ -52,6 +52,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: search_repositories
description: 搜索GitHub仓库
@@ -78,6 +80,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: create_repository
description: 在您的账户中创建新的GitHub仓库
@@ -115,6 +119,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: get_file_contents
description: 从GitHub仓库获取文件或目录内容
@@ -145,6 +151,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: push_files
description: 在单个提交中推送多个文件到GitHub仓库
@@ -192,6 +200,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: create_issue
description: 在GitHub仓库创建新Issue
@@ -246,6 +256,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: create_pull_request
description: 在GitHub仓库创建新的Pull Request
@@ -301,6 +313,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: fork_repository
description: 将GitHub仓库fork到您的账户或指定组织
@@ -331,6 +345,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: create_branch
description: 在GitHub仓库创建新分支
@@ -366,6 +382,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: list_commits
description: 获取GitHub仓库分支的提交列表
@@ -400,6 +418,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: list_issues
description: 列出并过滤GitHub仓库的Issues
@@ -452,6 +472,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: update_issue
description: 更新GitHub仓库中的现有Issue
@@ -515,6 +537,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: add_issue_comment
description: 在GitHub Issue中添加评论
@@ -549,6 +573,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: search_code
description: 在GitHub仓库中搜索代码
@@ -583,6 +609,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: search_issues
description: 在GitHub仓库中搜索Issues和Pull Requests
@@ -617,6 +645,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: search_users
description: 在GitHub中搜索用户
@@ -651,6 +681,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: get_issue
description: 获取GitHub仓库中特定Issue的详细信息
@@ -677,6 +709,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: get_pull_request
description: 获取GitHub仓库中特定Pull Request的详细信息
@@ -703,6 +737,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: list_pull_requests
description: 列出并过滤GitHub仓库的Pull Requests
@@ -753,6 +789,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: create_pull_request_review
description: 在GitHub Pull Request上创建review
@@ -814,6 +852,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: merge_pull_request
description: 合并GitHub Pull Request
@@ -858,6 +898,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: get_pull_request_files
description: 获取GitHub Pull Request中更改的文件列表
@@ -884,6 +926,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: get_pull_request_status
description: 获取GitHub Pull Request的状态检查结果
@@ -910,6 +954,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: update_pull_request_branch
description: 使用base分支的最新更改更新Pull Request分支
@@ -944,6 +990,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: get_pull_request_comments
description: 获取GitHub Pull Request的review评论
@@ -970,6 +1018,8 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"
- name: get_pull_request_reviews
description: 获取GitHub Pull Request的reviews
@@ -996,3 +1046,5 @@ tools:
value: "application/vnd.github+json"
- key: X-GitHub-Api-Version
value: "2022-11-28"
- key: User-Agent
value: "higress-mcp"