You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[<imgsrc="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF"alt="Install in VS Code">](https://insiders.vscode.dev/redirect/mcp/install?name=XcodeBuildMCP&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22xcodebuildmcp%40latest%22%5D%7D)
126
-
-[<imgalt="Install in VS Code Insiders"src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect/mcp/install?name=XcodeBuildMCP&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22xcodebuildmcp%40latest%22%5D%7D&quality=insiders)
[<imgsrc="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF"alt="Install in VS Code">](https://insiders.vscode.dev/redirect/mcp/install?name=XcodeBuildMCP&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22xcodebuildmcp%40latest%22%5D%7D)
129
+
130
+
[<imgalt="Install in VS Code Insiders"src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect/mcp/install?name=XcodeBuildMCP&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22xcodebuildmcp%40latest%22%5D%7D&quality=insiders)
127
131
128
-
#### Manual installation
132
+
#### General installation
129
133
130
-
Configure your MCP client (Windsurf, Cursor, Claude Desktop, Claude Code etc.) to use the XcodeBuildMCP server by ammending your client application's MCP configuration.
134
+
Most MCP clients (Cursor, VS Code, Windsurf, Claude Desktop etc) have standardised on the following JSON configuration format, just add the the following to your client's JSON configuration's `mcpServers` object:
131
135
132
136
```json
133
-
{
134
-
"mcpServers": {
135
-
"XcodeBuildMCP": {
136
-
"command": "npx",
137
-
"args": [
138
-
"-y",
139
-
"xcodebuildmcp@latest"
140
-
]
141
-
}
142
-
}
137
+
"XcodeBuildMCP": {
138
+
"command": "npx",
139
+
"args": [
140
+
"-y",
141
+
"xcodebuildmcp@latest"
142
+
]
143
143
}
144
144
```
145
145
146
-
#### Alternative installation method using mise
146
+
#### Specific client installation instructions
147
147
148
-
Alternatively, you can use XcodeBuildMCP without a specific installation of Node.js by using `mise` to install it:
148
+
##### OpenAI Codex CLI
149
149
150
-
```bash
151
-
# macOS (Homebrew)
152
-
brew install mise
150
+
Codex uses a toml configuration file to configure MCP servers. To configure XcodeBuildMCP with [OpenAI's Codex CLI](https://github.com/openai/codex), add the following configuration to your Codex CLI config file:
Then configure your MCP client to use mise to install XcodeBuildMCP:
159
+
For more information see [OpenAI Codex MCP Server Configuration](https://github.com/openai/codex/blob/main/codex-rs/config.md#mcp_servers) documentation.
159
160
160
-
```json
161
-
{
162
-
"mcpServers": {
163
-
"XcodeBuildMCP": {
164
-
"command": "mise",
165
-
"args": [
166
-
"x",
167
-
"npm:xcodebuildmcp@1.12.2",
168
-
"--",
169
-
"xcodebuildmcp"
170
-
]
171
-
}
172
-
}
173
-
}
174
-
```
161
+
##### Claude Code CLI
175
162
176
-
> [!NOTE]
177
-
> When using mise avoid using the @latest tag as mise will cache the package and may not update to the latest version automatically, instead prefer an explicit version number.
163
+
To use XcodeBuildMCP with [Claude Code](https://code.anthropic.com), you can add it via the command line:
178
164
179
-
> [!IMPORTANT]
180
-
> Please note that XcodeBuildMCP will request xcodebuild to skip macro validation. This is to avoid errors when building projects that use Swift Macros.
165
+
```bash
166
+
# Add XcodeBuildMCP server to Claude Code
167
+
claude mcp add XcodeBuildMCP npx xcodebuildmcp@latest
181
168
182
-
#### Installing via Smithery
169
+
# Or with environment variables
170
+
claude mcp add XcodeBuildMCP npx xcodebuildmcp@latest -H INCREMENTAL_BUILDS_ENABLED=false -H XCODEBUILDMCP_SENTRY_DISABLED=false
171
+
```
172
+
173
+
##### Smithery
183
174
184
175
To install XcodeBuildMCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@cameroncooke/XcodeBuildMCP):
185
176
186
177
```bash
187
178
npx -y @smithery/cli install @cameroncooke/XcodeBuildMCP --client claude
188
179
```
189
180
181
+
> [!IMPORTANT]
182
+
> Please note that XcodeBuildMCP will request xcodebuild to skip macro validation. This is to avoid errors when building projects that use Swift Macros.
183
+
190
184
#### MCP Compatibility
191
185
192
186
XcodeBuildMCP supports both MCP tools, resources and sampling. At time of writing the following editors have varying levels of MCP feature support:
@@ -205,20 +199,12 @@ XcodeBuildMCP includes experimental support for incremental builds. This feature
205
199
206
200
To enable incremental builds, set the `INCREMENTAL_BUILDS_ENABLED` environment variable to `true`:
207
201
208
-
Example MCP client configuration:
202
+
Example MCP configuration:
209
203
```json
210
-
{
211
-
"mcpServers": {
212
-
"XcodeBuildMCP": {
213
-
"command": "npx",
214
-
"args": [
215
-
"-y",
216
-
"xcodebuildmcp@latest"
217
-
],
218
-
"env": {
219
-
"INCREMENTAL_BUILDS_ENABLED": "true"
220
-
}
221
-
}
204
+
"XcodeBuildMCP": {
205
+
...
206
+
"env": {
207
+
"INCREMENTAL_BUILDS_ENABLED": "true"
222
208
}
223
209
}
224
210
```
@@ -245,39 +231,42 @@ To enable dynamic tools, set the `XCODEBUILDMCP_DYNAMIC_TOOLS` environment varia
245
231
246
232
Example MCP client configuration:
247
233
```json
248
-
{
249
-
"mcpServers": {
250
-
"XcodeBuildMCP": {
251
-
"command": "npx",
252
-
"args": [
253
-
"-y",
254
-
"xcodebuildmcp@latest"
255
-
],
256
-
"env": {
257
-
"XCODEBUILDMCP_DYNAMIC_TOOLS": "true"
258
-
}
259
-
}
234
+
"XcodeBuildMCP": {
235
+
...
236
+
"env": {
237
+
"XCODEBUILDMCP_DYNAMIC_TOOLS": "true"
260
238
}
261
239
}
262
240
```
263
241
242
+
### Usage Example
243
+
244
+
Once enabled, AI agents automatically discover and load relevant tools based on context. For example, when you mention working on an iOS app or the agent detects iOS development tasks in your workspace, it will automatically use the `discover_tools` tool to load the appropriate simulator and project tools needed for your workflow.
245
+
246
+
### Client Compatibility
247
+
248
+
Dynamic Tools requires MCP clients that support **MCP Sampling** for the AI-powered tool discovery to function:
249
+
250
+
| Editor | Dynamic Tools Support |
251
+
|--------|----------------------|
252
+
|**VS Code**| ✅ |
253
+
|**Cursor**| ❌ (No MCP Sampling) |
254
+
|**Windsurf**| ❌ (No MCP Sampling) |
255
+
|**Claude Code**| ❌ (No MCP Sampling) |
256
+
|**Claude Desktop**| ❌ (No MCP Sampling) |
257
+
258
+
> [!NOTE]
259
+
> For clients that don't support MCP Sampling, XcodeBuildMCP will automatically fall back to Static Mode, loading all tools at startup regardless of the `XCODEBUILDMCP_DYNAMIC_TOOLS` setting.
260
+
264
261
### Selective Workflow Loading (Static Mode)
265
262
266
263
For clients that don't support MCP Sampling but still want to reduce context window usage, you can selectively load only specific workflows using the `XCODEBUILDMCP_ENABLED_WORKFLOWS` environment variable:
@@ -299,25 +288,6 @@ For clients that don't support MCP Sampling but still want to reduce context win
299
288
> [!NOTE]
300
289
> The `XCODEBUILDMCP_ENABLED_WORKFLOWS` setting only works in Static Mode. If `XCODEBUILDMCP_DYNAMIC_TOOLS=true` is set, the selective workflow setting will be ignored.
301
290
302
-
### Usage Example
303
-
304
-
Once enabled, AI agents automatically discover and load relevant tools based on context. For example, when you mention working on an iOS app or the agent detects iOS development tasks in your workspace, it will automatically use the `discover_tools` tool to load the appropriate simulator and project tools needed for your workflow.
305
-
306
-
### Client Compatibility
307
-
308
-
Dynamic Tools requires MCP clients that support **MCP Sampling** for the AI-powered tool discovery to function:
309
-
310
-
| Editor | Dynamic Tools Support |
311
-
|--------|----------------------|
312
-
|**VS Code**| ✅ |
313
-
|**Cursor**| ❌ (No MCP Sampling) |
314
-
|**Windsurf**| ❌ (No MCP Sampling) |
315
-
|**Claude Code**| ❌ (No MCP Sampling) |
316
-
|**Claude Desktop**| ❌ (No MCP Sampling) |
317
-
318
-
> [!NOTE]
319
-
> For clients that don't support MCP Sampling, XcodeBuildMCP will automatically fall back to Static Mode, loading all tools at startup regardless of the `XCODEBUILDMCP_DYNAMIC_TOOLS` setting.
320
-
321
291
## Code Signing for Device Deployment
322
292
323
293
For device deployment features to work, code signing must be properly configured in Xcode **before** using XcodeBuildMCP device tools:
@@ -366,18 +336,10 @@ This project uses [Sentry](https://sentry.io/) for error monitoring and diagnost
0 commit comments