55
66 <p >
77 A Model Context Protocol (MCP) server and CLI for Bazel-based Apple platform development.
8- Ships 112 tools across 19 workflow categories covering iOS, macOS, tvOS, watchOS,
8+ Ships 125 tools across 21 workflow categories covering iOS, macOS, tvOS, watchOS,
99 visionOS, and Swift Package Manager.
1010 </p >
1111
12- [ ![ CI] ( https://github.com/XcodeBazelMCP/XcodeBazelMCP/actions/workflows/ci.yml/badge.svg )] ( https://github.com/XcodeBazelMCP/XcodeBazelMCP/actions/workflows/ci.yml )
13- [ ![ npm package] ( https://img.shields.io/npm/v/xcodebazelmcp )] ( https://www.npmjs.com/package/xcodebazelmcp )
14- [ ![ License MIT] ( https://img.shields.io/npm/l/xcodebazelmcp )] ( https://github.com/XcodeBazelMCP/XcodeBazelMCP/blob/main/LICENSE )
15- [ ![ node >=18.x] ( https://img.shields.io/node/v/xcodebazelmcp )] ( https://nodejs.org/ )
16- [ ![ Xcode 16] ( https://img.shields.io/badge/Xcode-16-blue )] ( https://developer.apple.com/xcode/ )
17- [ ![ platform macOS] ( https://img.shields.io/badge/platform-macOS-lightgrey )] ( https://github.com/XcodeBazelMCP/XcodeBazelMCP )
18- [ ![ MCP Compatible] ( https://img.shields.io/badge/MCP-Compatible-green )] ( https://modelcontextprotocol.io )
19- [ ![ codecov] ( https://codecov.io/gh/XcodeBazelMCP/XcodeBazelMCP/branch/main/graph/badge.svg )] ( https://codecov.io/gh/XcodeBazelMCP/XcodeBazelMCP )
20- [ ![ Socket Badge] ( https://badge.socket.dev/npm/package/xcodebazelmcp/0.1.0 )] ( https://badge.socket.dev/npm/package/xcodebazelmcp/0.1.0 )
21- [ ![ Ask DeepWiki] ( https://img.shields.io/badge/Ask-DeepWiki-blue?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bTEgMTVoLTJ2LTJoMnYyem0wLTRoLTJWN2gydjZ6IiBmaWxsPSJ3aGl0ZSIvPjwvc3ZnPg== )] ( https://deepwiki.com/XcodeBazelMCP/XcodeBazelMCP )
12+ [ ![ CI] ( https://github.com/XcodeBazelMCP/XcodeBazelMCP/actions/workflows/ci.yml/badge.svg )] ( https://github.com/XcodeBazelMCP/XcodeBazelMCP/actions/workflows/ci.yml )
13+ [ ![ npm package] ( https://img.shields.io/npm/v/xcodebazelmcp )] ( https://www.npmjs.com/package/xcodebazelmcp )
14+ [ ![ License MIT] ( https://img.shields.io/npm/l/xcodebazelmcp )] ( https://github.com/XcodeBazelMCP/XcodeBazelMCP/blob/main/LICENSE )
15+ [ ![ node >=18.x] ( https://img.shields.io/node/v/xcodebazelmcp )] ( https://nodejs.org/ )
16+ [ ![ Xcode 16] ( https://img.shields.io/badge/Xcode-16-blue )] ( https://developer.apple.com/xcode/ )
17+ [ ![ platform macOS] ( https://img.shields.io/badge/platform-macOS-lightgrey )] ( https://github.com/XcodeBazelMCP/XcodeBazelMCP )
18+ [ ![ MCP Compatible] ( https://img.shields.io/badge/MCP-Compatible-green )] ( https://modelcontextprotocol.io )
19+ [ ![ codecov] ( https://codecov.io/gh/XcodeBazelMCP/XcodeBazelMCP/branch/main/graph/badge.svg )] ( https://codecov.io/gh/XcodeBazelMCP/XcodeBazelMCP )
20+ [ ![ Socket Badge] ( https://badge.socket.dev/npm/package/xcodebazelmcp/0.1.0 )] ( https://badge.socket.dev/npm/package/xcodebazelmcp/0.1.0 )
21+ [ ![ Ask DeepWiki] ( https://img.shields.io/badge/Ask-DeepWiki-blue?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bTEgMTVoLTJ2LTJoMnYyem0wLTRoLTJWN2gydjZ6IiBmaWxsPSJ3aGl0ZSIvPjwvc3ZnPg== )] ( https://deepwiki.com/XcodeBazelMCP/XcodeBazelMCP )
22+
2223</div >
2324
2425<br >
@@ -147,7 +148,7 @@ npm run build
147148
148149XcodeBazelMCP needs to know which Bazel workspace to operate on. There are several ways to set it, in order of precedence:
149150
150- 1 . ** MCP tool at runtime** — ` bazel_ios_set_workspace ` (or CLI ` set-defaults --target //app:app ` )
151+ 1 . ** MCP tool at runtime** — ` bazel_ios_set_workspace ` (sets the workspace for later tool calls )
1511522 . ** CLI flag** — ` xcodebazelmcp mcp --workspace /path/to/workspace `
1521533 . ** Environment variable** — ` BAZEL_IOS_WORKSPACE=/path/to/workspace `
1531544 . ** Config file** — ` .xcodebazelmcp/config.yaml ` in the workspace root (supports profiles)
@@ -158,16 +159,31 @@ For multi-workspace setups, use **profiles** in `config.yaml`:
158159``` yaml
159160profiles :
160161 app :
161- target : ' //app:app'
162- platform : simulator
163- buildMode : debug
162+ defaultTarget : ' //app:app'
163+ defaultPlatform : simulator
164+ defaultBuildMode : debug
164165 mac :
165- target : ' //mac:mac'
166- platform : macos
166+ defaultTarget : ' //mac:mac'
167+ defaultPlatform : macos
167168` ` `
168169
169170Then switch at runtime: ` xcodebazelmcp set-defaults --profile app`
170171
172+ # # Environment Variables
173+
174+ | Variable | Purpose |
175+ | ------------------------------ | ----------------------------------------------------------------------- |
176+ | `BAZEL_IOS_WORKSPACE` | Bazel workspace root (highest-precedence workspace source). |
177+ | `BAZEL_PATH` / `MCP_BAZEL_PATH`| Path to the Bazel/Bazelisk binary (defaults to `bazel` on `PATH`). |
178+ | `BAZEL_IOS_STARTUP_ARGS` | Bazel startup args prepended to every invocation (quote-aware). |
179+ | `BAZEL_IOS_MCP_MAX_OUTPUT` | Max captured command output in characters (default 200000). |
180+ | `BAZEL_IOS_SIMULATOR_CPU` | Override the iOS simulator CPU (`sim_arm64` / `x86_64`; default : host). |
181+ | `BAZEL_IOS_DISCOVER_SCOPE` | Default `discover` query scope for non-monorepo workspaces (e.g. `//...`). |
182+ | `BAZEL_IOS_COMMAND_LOG` | Path to the persistent NDJSON command log. |
183+ | `BAZEL_IOS_COMMAND_LOG_MAX_BYTES` | Rotate the command log past this size (default 5 MiB). |
184+ | `BAZEL_IOS_COMMAND_LOG_DISABLE`| Set to `1` to disable command logging. |
185+ | `IDB_PATH` | Path to the `idb` binary for UI automation (else discovered on `PATH`). |
186+
171187# # CLI Examples
172188
173189` ` ` sh
@@ -207,31 +223,33 @@ xcodebazelmcp set-defaults --target //app:app --simulator-name "iPhone 16 Pro"
207223xcodebazelmcp workflows
208224` ` `
209225
210- # # Workflow Categories (112 tools)
226+ # # Workflow Categories (125 tools)
211227
212228Workflows control which tools are advertised to MCP clients. Smart defaults enable the most common workflows; use `toggle-workflow` to customize.
213229
214- | Category | Tools | Description |
215- | ----------------- | ----- | ----------------------------------------------------- |
216- | **build** | 2 | Build iOS targets for simulator or device |
217- | **test** | 2 | Run iOS tests with optional coverage |
218- | **simulator** | 10 | Manage simulator lifecycle and settings |
219- | **app_lifecycle** | 5 | Install, launch, stop apps on simulator |
220- | **capture** | 5 | Screenshot, video recording, log capture (simulator) |
221- | **ui_automation** | 9 | Tap, swipe, type, drag, accessibility snapshot |
222- | **deep_links** | 2 | Open URLs and send push notifications |
223- | **device** | 13 | Physical device build, deploy, test, screenshot, logs |
224- | **lldb** | 10 | LLDB debugger : breakpoints, variables, stepping |
225- | **macos** | 13 | macOS build, run, test, discover |
226- | **tvos** | 4 | tvOS build, run, test, discover |
227- | **watchos** | 4 | watchOS build, run, test, discover |
228- | **visionos** | 4 | visionOS build, run, test, discover |
229- | **spm** | 7 | Swift Package Manager operations |
230- | **project** | 6 | Target discovery, query, deps, rdeps |
231- | **scaffold** | 2 | Generate new Bazel projects |
232- | **session** | 7 | Workspace, defaults, profiles, health |
233- | **daemon** | 3 | Background daemon management |
234- | **update** | 2 | Self-update and version check |
230+ | Category | Tools | Description |
231+ | ----------------- | ----- | -------------------------------------------------------------------------------------- |
232+ | **build** | 2 | Build iOS targets for simulator or device |
233+ | **test** | 2 | Run iOS tests with optional coverage |
234+ | **simulator** | 12 | Manage simulator lifecycle, settings, media, and containers |
235+ | **app_lifecycle** | 6 | Install, launch, stop, uninstall apps on simulator |
236+ | **capture** | 5 | Screenshot, video recording, log capture (simulator) |
237+ | **agent_debug** | 4 | NDJSON agent debug logs (Cursor DEBUG MODE) |
238+ | **ui_automation** | 9 | Tap, swipe, type, drag, accessibility snapshot |
239+ | **deep_links** | 2 | Open URLs and send push notifications |
240+ | **device** | 16 | Physical device build, deploy, test, screenshot, logs, uninstall, list apps |
241+ | **lldb** | 10 | LLDB debugger : breakpoints, variables, stepping |
242+ | **macos** | 13 | macOS build, run, test, discover |
243+ | **tvos** | 4 | tvOS build, run, test, discover |
244+ | **watchos** | 4 | watchOS build, run, test, discover |
245+ | **visionos** | 4 | visionOS build, run, test, discover |
246+ | **spm** | 7 | Swift Package Manager operations |
247+ | **project** | 6 | Target discovery, query, deps, rdeps |
248+ | **scaffold** | 2 | Generate new Bazel projects |
249+ | **session** | 7 | Workspace, defaults, profiles, health |
250+ | **daemon** | 3 | Background daemon management |
251+ | **update** | 2 | Self-update and version check |
252+ | **xcode** | 3 | Apple-native Xcode MCP detection, DeviceHub, skills ([docs](docs/xcode-native-mcp.md)) |
235253
236254# # iOS 17+ Device Notes
237255
0 commit comments