Skip to main content

如何在 Trae 中配置 jojo-remote-build-server

这是一个基于 MCP (Model Context Protocol) 的服务器,旨在为 Trae IDE 提供 Aweme 项目的自动化远程构建能力。它封装了复杂的 jojo 命令行操作,提供了智能的路径修复、错误分析和环境配置功能。

功能特性 (Available Tools)

该 MCP Server 提供了以下两个核心工具:

1. init_remote_build_environment (初始化远程环境)

用于一键配置远程构建所需的各项环境依赖。

  • 功能:
    • 自动执行 mbox jojo install --remote (含自动重试机制)。
    • 自动执行 mbox jojo recodesign 配置签名 (支持指定 device_udid)。
    • 自动开启 mbox jojo remote_mode --build-in-shell。
    • 包含智能容错处理(如忽略非致命的下载错误)。
  • 参数:
    • project_path (可选): 项目根目录,默认自动识别。
    • device_udid (可选): 指定用于签名的设备 UDID(推荐提供,以避免交互式选择)。

2. run_aweme_remote_build (执行远程构建)

用于执行 Aweme 项目的完整远程构建流程。

  • 功能:
    • 执行标准的 jojo build 命令 (arm64, Debug 模式)。
    • 支持构建前清理 (clean)。
    • 智能日志分析: 自动提取编译错误和链接错误,过滤冗余日志,直接展示关键问题。
    • 路径自适应: 自动纠正用户输入的非标准路径(如自动寻找 Aweme/Aweme 子目录)。
  • 参数:
    • project_path (可选): 项目根目录。
    • scheme (可选): 构建 Scheme,默认为 AwemeInhouseDebug。
    • clean (可选): 是否先执行 clean 操作,默认为 False。

1. 准备环境

确保已安装依赖。在终端中运行:

# 使用 uv 创建虚拟环境 (指定 Python 3.12)
uv venv .remote_build_mcp_venv --python 3.12

# 激活虚拟环境
source .remote_build_mcp_venv/bin/activate

# 安装依赖
uv pip install -r requirements.txt

2. 配置 Trae MCP Server

  1. 打开 Trae 设置 (Settings)。
  2. 导航到 Features -> MCP Servers。
  3. 点击 Add MCP Server (或者编辑配置文件)。
  4. 填写以下信息:
  • Type: stdio
  • Name: jojo-remote-build (或你喜欢的名字)
  • Command: /Users/bytedance/Desktop/jojoRemoteBuildMCP/.venv/bin/python3
    • 注意:请使用虚拟环境中的 Python 绝对路径,确保能找到 mcp 库。
  • Arguments:
    • /Users/bytedance/Desktop/jojoRemoteBuildMCP/mcp_server.py

JSON 配置示例 (如果是直接编辑 JSON)

{
  "mcpServers": {
    "jojo-remote-build": {
      "command": "/Users/bytedance/Desktop/jojoRemoteBuildMCP/.venv/bin/python3",
      "args": [
        "/Users/bytedance/Desktop/jojoRemoteBuildMCP/mcp_server.py"
      ]
    }
  }
}

3. 验证

配置完成后,Trae 应该会显示该 Server 为 "Connected" 状态。 你可以在 Chat 中尝试询问:"执行 Aweme 远程构建",或者手动调用 run_aweme_remote_build 工具。

Metadata

Release files for bd-jojo-remote-build-mcp 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bd-jojo-remote-build-mcp 0.1.3
File Size Uploaded Provenance
bd_jojo_remote_build_mcp-0.1.3.tar.gz 10.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bd-jojo-remote-build-mcp 0.1.3
File Interpreter ABI Platform
bd_jojo_remote_build_mcp-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / bd_jojo_remote_build_mcp-0.1.3.tar.gz

Download URL bd_jojo_remote_build_mcp-0.1.3.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d8c1b1edd5dba497a175c07e932d22012752bcce52d58d615662957690f5af72
BLAKE2b-256 checksum
How to use checksums
77a34466f7c3eb9f0cffbc2c62272a7de2adc906af1bb833f1667aae28e0af6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / bd_jojo_remote_build_mcp-0.1.3-py3-none-any.whl

Download URL bd_jojo_remote_build_mcp-0.1.3-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03e14d8d6ddaeb018ad9f44f6888c45ccb3053f2b95ad7bf64ae9a3d4ef41093
BLAKE2b-256 checksum
How to use checksums
7276719cafefd2f192be1bc6d184870949c226335e9ff6ae2d6fffd60e02b4f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Security for bd-jojo-remote-build-mcp 0.1.3

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.

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