UBox MCP服务器
快速上手
# 安装提供的 wheel 文件
uv tool install --python 3.10.12 ubox_mcp_server-0.1.0-py3-none-any.whl --index-url https://pypi.tuna.tsinghua.edu.cn/simple
ubox-mcp-server \
--ubox-secret-id your_id \
--ubox-secret-key your_key \
--ubox-mode normal
在cline中添加如下配置:
{
"mcpServers": {
"ubox-mcp-server": {
"transport": "http",
"url": "http://localhost:8000/mcp",
"description": "UBox MCP Server"
}
}
}
安装(来自打包文件)
# 安装提供的 wheel 文件
uv tool install --python 3.10.12 ubox_mcp_server-0.1.0-py3-none-any.whl --index-url https://pypi.tuna.tsinghua.edu.cn/simple
配置与启动
方式1:使用 .env 文件
# 创建配置文件
cat > .env << EOF
UBOX_SECRET_ID=your_secret_id
UBOX_SECRET_KEY=your_secret_key
UBOX_MODE=local
MCP_MODE=streamable-http
MCP_HOST=localhost
MCP_PORT=8000
EOF
# 启动(会自动读取当前目录的 .env 文件)
ubox-mcp-server
方式2:纯命令行(跨平台)
- macOS/Linux:
ubox-mcp-server \
--ubox-secret-id your_id \
--ubox-secret-key your_key \
--ubox-mode normal \
--mcp-mode streamable-http \
--mcp-port 8000 \
--log-level DEBUG
- Windows PowerShell:
ubox-mcp-server `
--ubox-secret-id your_id `
--ubox-secret-key your_key `
--ubox-mode normal `
--mcp-mode streamable-http `
--mcp-port 8000 `
--log-level DEBUG
方式3:全部环境变量
export UBOX_SECRET_ID=your_secret_id
export UBOX_SECRET_KEY=your_secret_key
export UBOX_MODE=local
export MCP_MODE=streamable-http
export MCP_HOST=localhost
export MCP_PORT=8000
ubox-mcp-server
简单校验
# 列出工具
curl -X POST http://localhost:8000/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
获取帮助
ubox-mcp-server --help
在 Cline 中使用(VS Code)
- 启动服务器
- macOS/Linux:
ubox-mcp-server \
--ubox-secret-id your_id \
--ubox-secret-key your_key \
--ubox-mode local \
--mcp-mode streamable-http \
--mcp-port 8000 \
--log-level DEBUG
- Windows PowerShell:
ubox-mcp-server `
--ubox-mode local `
--mcp-mode streamable-http `
--mcp-port 8000 `
--log-level DEBUG
- 配置 Cline
- VS Code 命令面板 → “Cline: Configure MCP Servers” → 添加:
{
"mcpServers": {
"ubox-mcp-server": {
"transport": "http",
"url": "http://localhost:8000/mcp",
"description": "UBox MCP Server"
}
}
}
(如你的 Cline 支持 SSE,也可改为:)
{
"mcpServers": {
"ubox-mcp-server": {
"transport": "sse",
"url": "http://localhost:8000/sse"
}
}
}
- 使用与验证
- Cline 面板应显示 “ubox-mcp-server” 已连接
- 在对话中输入任务(如“获取设备列表”“连接设备并截图”),Cline 会调用对应工具
可配置项一览
以下所有配置可通过三种方式设置(优先级从高到低):
- 命令行参数(仅标注了有对应 --flag 的项);2) 环境变量;3) .env 文件。
UBox SDK
- UBox 运行模式
- 环境变量/.env:
UBOX_MODE(local|normal)默认local - CLI:
--ubox-mode - 必填: 否
- 环境变量/.env:
- 本地模式 Base URL(当
UBOX_MODE=local时生效)- 环境变量/.env:
UBOX_BASE_URL(默认127.0.0.1:26000) - CLI:
--ubox-base-url - 必填: 否
- 环境变量/.env:
- UBox 环境
- 环境变量/.env:
UBOX_ENV(formal|test,默认formal) - CLI:
--ubox-env - 必填: 否
- 环境变量/.env:
- 默认设备可选参数(若你的流程需要默认值)
- 环境变量/.env:
UBOX_DEFAULT_UDID、UBOX_DEFAULT_OS_TYPE(默认android)、UBOX_AUTH_CODE - CLI: 无
- 环境变量/.env:
MCP 服务器
- 运行模式
- 环境变量/.env:
MCP_MODE(sse|streamable-http,默认streamable-http) - CLI:
--mcp-mode - 必填: 否
- 环境变量/.env:
- 主机地址
- 环境变量/.env:
MCP_HOST(默认localhost) - CLI:
--mcp-host - 必填: 否
- 环境变量/.env:
- 端口
- 环境变量/.env:
MCP_PORT(默认8000) - CLI:
--mcp-port - 必填: 否
- 环境变量/.env:
- 日志级别
- 环境变量/.env:
LOG_LEVEL(DEBUG|INFO|WARNING|ERROR,默认INFO) - CLI:
--log-level - 必填: 否
- 环境变量/.env:
- 写入日志文件
- 环境变量/.env:
LOG_TO_FILE(true|false,默认false) - CLI: 无
- 必填: 否
- 环境变量/.env:
Metadata
Release files for ubox-mcp-server 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ubox_mcp_server-0.1.6.tar.gz | 77.9 kB | Without provenance | Details for ubox_mcp_server-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ubox_mcp_server-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for ubox_mcp_server-0.1.6-py3-none-any.whl |
Total release size: 122.8 kB
Release files / ubox_mcp_server-0.1.6.tar.gz
| Download URL | ubox_mcp_server-0.1.6.tar.gz |
|---|---|
| Size | 77.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f8fe5ff6198820601adacd892698a02b44706d739e55652e604b1f384dd93b1
|
|
BLAKE2b-256 checksum How to use checksums |
ac47146b9190846a324c4d3ba3931f5550eda387232ba87edc67b5f444ab607d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ubox_mcp_server-0.1.6-py3-none-any.whl
| Download URL | ubox_mcp_server-0.1.6-py3-none-any.whl |
|---|---|
| Size | 44.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f230b887f08877ac54174b4ca097c9d3b0b878e202fad0c6350072dde8cd701c
|
|
BLAKE2b-256 checksum How to use checksums |
a26ab6785002071201e8687d203d9b1ec6d9f1d69e03256f98aedba21eb08d19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ubox-mcp-server 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.