Skip to main content

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)

  1. 启动服务器
  • 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
  1. 配置 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"
    }
  }
}
  1. 使用与验证
  • Cline 面板应显示 “ubox-mcp-server” 已连接
  • 在对话中输入任务(如“获取设备列表”“连接设备并截图”),Cline 会调用对应工具

可配置项一览

以下所有配置可通过三种方式设置(优先级从高到低):

  1. 命令行参数(仅标注了有对应 --flag 的项);2) 环境变量;3) .env 文件。

UBox SDK

  • UBox 运行模式
    • 环境变量/.env: UBOX_MODE(local|normal)默认 local
    • CLI: --ubox-mode
    • 必填: 否
  • 本地模式 Base URL(当 UBOX_MODE=local 时生效)
    • 环境变量/.env: UBOX_BASE_URL(默认 127.0.0.1:26000)
    • CLI: --ubox-base-url
    • 必填: 否
  • UBox 环境
    • 环境变量/.env: UBOX_ENV(formal|test,默认 formal)
    • CLI: --ubox-env
    • 必填: 否
  • 默认设备可选参数(若你的流程需要默认值)
    • 环境变量/.env: UBOX_DEFAULT_UDID、UBOX_DEFAULT_OS_TYPE(默认 android)、UBOX_AUTH_CODE
    • CLI: 无

MCP 服务器

  • 运行模式
    • 环境变量/.env: MCP_MODE(sse|streamable-http,默认 streamable-http)
    • CLI: --mcp-mode
    • 必填: 否
  • 主机地址
    • 环境变量/.env: MCP_HOST(默认 localhost)
    • CLI: --mcp-host
    • 必填: 否
  • 端口
    • 环境变量/.env: MCP_PORT(默认 8000)
    • CLI: --mcp-port
    • 必填: 否
  • 日志级别
    • 环境变量/.env: LOG_LEVEL(DEBUG|INFO|WARNING|ERROR,默认 INFO)
    • CLI: --log-level
    • 必填: 否
  • 写入日志文件
    • 环境变量/.env: LOG_TO_FILE(true|false,默认 false)
    • CLI: 无
    • 必填: 否

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)

Source distribution for ubox-mcp-server 0.1.6
File Size Uploaded
ubox_mcp_server-0.1.6.tar.gz 77.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ubox-mcp-server 0.1.6
File Interpreter ABI Platform
ubox_mcp_server-0.1.6-py3-none-any.whl Python 3 none any Details

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}

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page