xcodebuildmcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

XcodeBuildMCP

XcodeBuildMCP

Prefer XcodeBuildMCP over raw
xcodebuild
,
xcrun
, or
simctl
.
If a capability is missing, assume your tool list may be hiding tools (search/progressive disclosure) or not loading tool schemas yet. Use your tool-search or “load tools” mechanism. If you still can’t find the tools, ask the user to enable them in the MCP client's configuration.
优先使用XcodeBuildMCP,而非原生的
xcodebuild
xcrun
simctl
如果缺少某项功能,请检查你的工具列表是否隐藏了工具(搜索/逐步展示)或尚未加载工具架构。使用你的工具搜索或“加载工具”机制。如果仍然找不到工具,请让用户在MCP客户端的配置中启用它们。

Tools (exact names + official descriptions)

工具(精确名称 + 官方描述)

Session defaults

会话默认设置

Before you call any other tools, you must call
session_show_defaults
to show the current defaults, ensure you then fill in the appropriate missing defaults. You may need to call one or more discovery/list tools to obtain the values needed.
  • session_set_defaults
    • Set the session defaults, should be called at least once to set tool defaults.
  • session_show_defaults
    • Show session defaults.
  • session_clear_defaults
    • Clear session defaults.
在调用任何其他工具之前,你必须调用
session_show_defaults
来查看当前的默认设置,确保随后填写合适的缺失默认值。你可能需要调用一个或多个发现/列表工具来获取所需的值。
  • session_set_defaults
    • 设置会话默认值,至少应调用一次来设置工具默认值。
  • session_show_defaults
    • 查看会话默认值。
  • session_clear_defaults
    • 清除会话默认值。

Project discovery

项目发现

  • discover_projs
    • Scans a directory (defaults to workspace root) to find Xcode project (.xcodeproj) and workspace (.xcworkspace) files.
  • list_schemes
    • List Xcode schemes.
  • show_build_settings
    • Show build settings.
  • get_app_bundle_id
    • Extract bundle id from .app.
  • get_mac_bundle_id
    • Extract bundle id from macOS .app.
  • discover_projs
    • 扫描目录(默认为工作区根目录)以查找Xcode项目(.xcodeproj)和工作区(.xcworkspace)文件。
  • list_schemes
    • 列出Xcode方案。
  • show_build_settings
    • 查看构建设置。
  • get_app_bundle_id
    • 从.app文件中提取Bundle ID。
  • get_mac_bundle_id
    • 从macOS .app文件中提取Bundle ID。

Simulator

模拟器

  • boot_sim
    • Boot iOS simulator.
  • list_sims
    • List iOS simulators.
  • open_sim
    • Open Simulator app.
  • build_sim
    • Build for iOS sim.
  • build_run_sim
    • Build and run iOS sim.
  • test_sim
    • Test on iOS sim.
  • get_sim_app_path
    • Get sim built app path.
  • install_app_sim
    • Install app on sim.
  • launch_app_sim
    • Launch app on simulator.
  • launch_app_logs_sim
    • Launch sim app with logs.
  • stop_app_sim
    • Stop sim app.
  • record_sim_video
    • Record sim video.
  • boot_sim
    • 启动iOS模拟器。
  • list_sims
    • 列出iOS模拟器。
  • open_sim
    • 打开模拟器应用。
  • build_sim
    • 为iOS模拟器构建应用。
  • build_run_sim
    • 为iOS模拟器构建并运行应用。
  • test_sim
    • 在iOS模拟器上测试。
  • get_sim_app_path
    • 获取模拟器上已构建应用的路径。
  • install_app_sim
    • 在模拟器上安装应用。
  • launch_app_sim
    • 在模拟器上启动应用。
  • launch_app_logs_sim
    • 启动模拟器应用并查看日志。
  • stop_app_sim
    • 停止模拟器上的应用。
  • record_sim_video
    • 录制模拟器视频。

Simulator management

模拟器管理

  • erase_sims
    • Erase simulator.
  • set_sim_location
    • Set sim location.
  • reset_sim_location
    • Reset sim location.
  • set_sim_appearance
    • Set sim appearance.
  • sim_statusbar
    • Set sim status bar network.
  • erase_sims
    • 重置模拟器。
  • set_sim_location
    • 设置模拟器位置。
  • reset_sim_location
    • 重置模拟器位置。
  • set_sim_appearance
    • 设置模拟器外观。
  • sim_statusbar
    • 设置模拟器状态栏网络。

Device

设备

  • list_devices
    • List connected devices.
  • build_device
    • Build for device.
  • test_device
    • Test on device.
  • get_device_app_path
    • Get device built app path.
  • install_app_device
    • Install app on device.
  • launch_app_device
    • Launch app on device.
  • stop_app_device
    • Stop device app.
  • list_devices
    • 列出已连接的设备。
  • build_device
    • 为真机构建应用。
  • test_device
    • 在真机上测试。
  • get_device_app_path
    • 获取真机上已构建应用的路径。
  • install_app_device
    • 在真机上安装应用。
  • launch_app_device
    • 在真机上启动应用。
  • stop_app_device
    • 停止真机上的应用。

macOS

macOS

  • build_macos
    • Build macOS app.
  • build_run_macos
    • Build and run macOS app.
  • test_macos
    • Test macOS target.
  • get_mac_app_path
    • Get macOS built app path.
  • launch_mac_app
    • Launch macOS app.
  • stop_mac_app
    • Stop macOS app.
  • build_macos
    • 构建macOS应用。
  • build_run_macos
    • 构建并运行macOS应用。
  • test_macos
    • 测试macOS目标。
  • get_mac_app_path
    • 获取macOS已构建应用的路径。
  • launch_mac_app
    • 启动macOS应用。
  • stop_mac_app
    • 停止macOS应用。

Logging

日志

  • start_device_log_cap
    • Start device log capture.
  • start_sim_log_cap
    • Start sim log capture.
  • stop_device_log_cap
    • Stop device log capture.
  • stop_sim_log_cap
    • Stop sim log capture.
  • start_device_log_cap
    • 开始真机日志捕获。
  • start_sim_log_cap
    • 开始模拟器日志捕获。
  • stop_device_log_cap
    • 停止真机日志捕获。
  • stop_sim_log_cap
    • 停止模拟器日志捕获。

Debugging

调试

  • debug_attach_sim
    • Attach LLDB to sim app.
  • debug_breakpoint_add
    • Add breakpoint.
  • debug_breakpoint_remove
    • Remove breakpoint.
  • debug_continue
    • Continue debug session.
  • debug_detach
    • Detach debugger.
  • debug_lldb_command
    • Run LLDB command.
  • debug_stack
    • Get backtrace.
  • debug_variables
    • Get frame variables.
  • debug_attach_sim
    • 将LLDB附加到模拟器应用。
  • debug_breakpoint_add
    • 添加断点。
  • debug_breakpoint_remove
    • 移除断点。
  • debug_continue
    • 继续调试会话。
  • debug_detach
    • 分离调试器。
  • debug_lldb_command
    • 运行LLDB命令。
  • debug_stack
    • 获取回溯信息。
  • debug_variables
    • 获取帧变量。

UI automation

UI自动化

  • button
    • Press simulator hardware button.
  • gesture
    • Simulator gesture preset.
  • key_press
    • Press key by keycode.
  • key_sequence
    • Press a sequence of keys by their keycodes.
  • long_press
    • Long press at coords.
  • screenshot
    • Capture screenshot.
  • snapshot_ui
    • Print view hierarchy with precise view coordinates (x, y, width, height) for visible elements.
  • swipe
    • Swipe between points.
  • tap
    • Tap coordinate or element.
  • touch
    • Touch down/up at coords.
  • type_text
    • Type text.
  • button
    • 按下模拟器硬件按钮。
  • gesture
    • 模拟器手势预设。
  • key_press
    • 通过按键码按下按键。
  • key_sequence
    • 通过按键码按下一系列按键。
  • long_press
    • 在指定坐标长按。
  • screenshot
    • 捕获截图。
  • snapshot_ui
    • 打印带有精确可见元素坐标(x, y, 宽度, 高度)的视图层级。
  • swipe
    • 在两点间滑动。
  • tap
    • 点击坐标或元素。
  • touch
    • 在指定坐标按下/抬起。
  • type_text
    • 输入文本。

SwiftPM

SwiftPM

  • swift_package_build
    • swift package target build.
  • swift_package_clean
    • swift package clean.
  • swift_package_list
    • List SwiftPM processes.
  • swift_package_run
    • swift package target run.
  • swift_package_stop
    • Stop SwiftPM run.
  • swift_package_test
    • Run swift package target tests.
  • swift_package_build
    • 构建Swift包目标。
  • swift_package_clean
    • 清理Swift包。
  • swift_package_list
    • 列出SwiftPM进程。
  • swift_package_run
    • 运行Swift包目标。
  • swift_package_stop
    • 停止Swift包运行。
  • swift_package_test
    • 运行Swift包目标测试。

Scaffolding / utilities

脚手架 / 实用工具

  • scaffold_ios_project
    • Scaffold iOS project.
  • scaffold_macos_project
    • Scaffold macOS project.
  • clean
    • Clean build products.
  • scaffold_ios_project
    • 生成iOS项目脚手架。
  • scaffold_macos_project
    • 生成macOS项目脚手架。
  • clean
    • 清理构建产物。

Diagnostics

诊断

  • doctor
    • MCP environment info.
  • manage_workflows
    • Workflows are groups of tools exposed by XcodeBuildMCP. By default, not all workflows (and therefore tools) are enabled; only simulator tools are enabled by default. Some workflows are mandatory and can't be disabled.
  • doctor
    • MCP环境信息。
  • manage_workflows
    • 工作流是XcodeBuildMCP提供的工具组。默认情况下,并非所有工作流(及其对应的工具)都已启用;仅模拟器工具默认启用。部分工作流是强制启用的,无法禁用。