Skip to content

Commit 164e2d2

Browse files
committed
Update README for Xcode MCP config
1 parent 512d16c commit 164e2d2

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,61 @@ Add XcodeBuildMCP to your MCP client configuration. Most clients use JSON config
153153
<br />
154154
</details>
155155

156+
<details>
157+
<summary>Xcode (Codex Agent)</summary>
158+
<br />
159+
160+
Requires Xcode 26.3 or later. Codex agent must be installed and configured in Xcode Settings -> Intelligence -> Open AI.
161+
162+
The only way at the time of writing to add an MCP server is to use a project scoped `.codex/config.toml` file in the root of your project workspace:
163+
`/path/to/your/project/.codex/config.toml`
164+
165+
```toml
166+
[mcp_servers.XcodeBuildMCP]
167+
args = [
168+
"-lc",
169+
"PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin; export NVM_DIR=\"$HOME/.nvm\"; [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; nvm use --silent >/dev/null 2>&1 || true; npx -y xcodebuildmcp@beta mcp"
170+
]
171+
command = "/bin/zsh"
172+
enabled = true
173+
tool_timeout_sec = 10000
174+
```
175+
176+
> [!NOTE]
177+
> Codex Agent when running in Xcode has a limted PATH by default. The above example should work for most users but if you find the server doesn't start or is not available, it's likely because npx is not found so you might have to adjust the above configuration accordingly.
178+
179+
<br />
180+
</details>
181+
182+
<details>
183+
<summary>Xcode (Claude Code Agent)</summary>
184+
<br />
185+
186+
Requires Xcode 26.3 or later. Claude Code agent must be installed and configured in Xcode Settings -> Intelligence -> Anthropic.
187+
188+
Add to the end or replace the existing `mcpServers` object in Xcode's Claude Code agent config at:
189+
`~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/.claude.json`
190+
191+
```json
192+
# rest of file...
193+
"mcpServers": {
194+
"XcodeBuildMCP": {
195+
"command": "/bin/zsh",
196+
"args": [
197+
"-lc",
198+
"PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin; export NVM_DIR=\"$HOME/.nvm\"; [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; nvm use --silent >/dev/null 2>&1 || true; npx -y xcodebuildmcp@beta mcp"
199+
]
200+
}
201+
}
202+
}
203+
```
204+
205+
> [!NOTE]
206+
> Claude Code Agent when running in Xcode has a limted PATH by default. The above example should work for most users but if you find the server doesn't start or is not available, it's likely because npx is not found so you might have to adjust the above configuration accordingly.
207+
208+
<br />
209+
</details>
210+
156211
<br />
157212

158213
For other installation options see [Getting Started](docs/GETTING_STARTED.md)

0 commit comments

Comments
 (0)