docs: fix xcodebuildmcp markdown
This commit is contained in:
parent
70f9bcdcd0
commit
e292e74931
@ -8,14 +8,14 @@ XcodeBuildMCP can run build and test tasks without you switching into Xcode for
|
|||||||
Think of it as a remote control for Xcode build actions. Instead of clicking around in Xcode, you ask the assistant to run the action and report the result.
|
Think of it as a remote control for Xcode build actions. Instead of clicking around in Xcode, you ask the assistant to run the action and report the result.
|
||||||
|
|
||||||
Common uses include:
|
Common uses include:
|
||||||
+- Run a build for a target or scheme
|
- Run a build for a target or scheme
|
||||||
+- Run tests and return failures
|
- Run tests and return failures
|
||||||
+- Capture build output so the assistant can summarize errors
|
- Capture build output so the assistant can summarize errors
|
||||||
|
|
||||||
### Example Requests
|
### Example Requests
|
||||||
+- "Use XcodeBuildMCP to build the app and summarize any errors."
|
- "Use XcodeBuildMCP to build the app and summarize any errors."
|
||||||
+- "Run tests with XcodeBuildMCP and list the failing tests."
|
- "Run tests with XcodeBuildMCP and list the failing tests."
|
||||||
+- "Build with XcodeBuildMCP and extract the first error message."
|
- "Build with XcodeBuildMCP and extract the first error message."
|
||||||
|
|
||||||
## What It Can Do (Detailed Examples)
|
## What It Can Do (Detailed Examples)
|
||||||
Below are common tasks and how to ask for them. Adjust the wording to match your project.
|
Below are common tasks and how to ask for them. Adjust the wording to match your project.
|
||||||
@ -54,68 +54,68 @@ Example:
|
|||||||
These steps reflect a common setup as of February 2026. Wording may vary slightly in release candidates.
|
These steps reflect a common setup as of February 2026. Wording may vary slightly in release candidates.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
+- Xcode 26.3 (RC or full release), opened at least once with your project
|
- Xcode 26.3 (RC or full release), opened at least once with your project
|
||||||
+- VS Code installed (stable or Insiders)
|
- VS Code installed (stable or Insiders)
|
||||||
+- GitHub Copilot extension installed and signed in
|
- GitHub Copilot extension installed and signed in
|
||||||
+- Node.js and npm installed (for XcodeBuildMCP)
|
- Node.js and npm installed (for XcodeBuildMCP)
|
||||||
|
|
||||||
### Step 1: Enable Xcode MCP Server
|
### Step 1: Enable Xcode MCP Server
|
||||||
+1. Open Xcode.
|
1. Open Xcode.
|
||||||
+2. Go to Settings.
|
2. Go to Settings.
|
||||||
+3. Open the Intelligence tab.
|
3. Open the Intelligence tab.
|
||||||
+4. Find the Model Context Protocol section.
|
4. Find the Model Context Protocol section.
|
||||||
+5. Toggle on Xcode Tools (or Allow external connections).
|
5. Toggle on Xcode Tools (or Allow external connections).
|
||||||
|
|
||||||
### Step 2: Install And Configure XcodeBuildMCP (Recommended Bridge)
|
### Step 2: Install And Configure XcodeBuildMCP (Recommended Bridge)
|
||||||
+Install:
|
Install:
|
||||||
+
|
|
||||||
+```bash
|
```bash
|
||||||
+npm install -g xcodebuildmcp@latest
|
npm install -g xcodebuildmcp@latest
|
||||||
+```
|
```
|
||||||
+
|
|
||||||
+Add to VS Code (create or edit .vscode/mcp.json):
|
Add to VS Code (create or edit .vscode/mcp.json):
|
||||||
+
|
|
||||||
+```json
|
```json
|
||||||
+{
|
{
|
||||||
+ "servers": {
|
"servers": {
|
||||||
+ "XcodeBuildMCP": {
|
"XcodeBuildMCP": {
|
||||||
+ "command": "npx",
|
"command": "npx",
|
||||||
+ "args": ["-y", "xcodebuildmcp@latest", "mcp"]
|
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
|
||||||
+ }
|
}
|
||||||
+ }
|
}
|
||||||
+}
|
}
|
||||||
+```
|
```
|
||||||
+
|
|
||||||
+Restart VS Code or reload the window. Copilot should discover the tools.
|
Restart VS Code or reload the window. Copilot should discover the tools.
|
||||||
|
|
||||||
### Step 3: Optional Native Xcode MCP Bridge
|
### Step 3: Optional Native Xcode MCP Bridge
|
||||||
+Xcode 26.3 includes a native MCP bridge. This exposes Xcode tools directly.
|
Xcode 26.3 includes a native MCP bridge. This exposes Xcode tools directly.
|
||||||
+
|
|
||||||
+Add to VS Code:
|
Add to VS Code:
|
||||||
+
|
|
||||||
+```json
|
```json
|
||||||
+{
|
{
|
||||||
+ "servers": {
|
"servers": {
|
||||||
+ "XcodeNative": {
|
"XcodeNative": {
|
||||||
+ "command": "xcrun",
|
"command": "xcrun",
|
||||||
+ "args": ["mcpbridge"]
|
"args": ["mcpbridge"]
|
||||||
+ }
|
}
|
||||||
+ }
|
}
|
||||||
+}
|
}
|
||||||
+```
|
```
|
||||||
+
|
|
||||||
+### Using MCP In VS Code With Copilot
|
### Using MCP In VS Code With Copilot
|
||||||
+1. Open your iOS project in VS Code.
|
1. Open your iOS project in VS Code.
|
||||||
+2. Use Copilot Chat in agent mode for multi-step tasks.
|
2. Use Copilot Chat in agent mode for multi-step tasks.
|
||||||
+3. MCP tools appear as slash commands once discovered.
|
3. MCP tools appear as slash commands once discovered.
|
||||||
+
|
|
||||||
+Example:
|
Example:
|
||||||
+"Use XcodeBuildMCP to build and summarize errors. Then suggest fixes."
|
"Use XcodeBuildMCP to build and summarize errors. Then suggest fixes."
|
||||||
|
|
||||||
### Tips And Caveats
|
### Tips And Caveats
|
||||||
+- Xcode must be running (or launchable) for MCP tools to respond.
|
- Xcode must be running (or launchable) for MCP tools to respond.
|
||||||
+- Native Xcode MCP is often best for previews.
|
- Native Xcode MCP is often best for previews.
|
||||||
+- XcodeBuildMCP is often best for heavy builds and automation.
|
- XcodeBuildMCP is often best for heavy builds and automation.
|
||||||
|
|
||||||
## Standardize The Simulator (Avoid Back-And-Forth)
|
## Standardize The Simulator (Avoid Back-And-Forth)
|
||||||
Pin a simulator name and OS version in your project guidance so the assistant always uses the same target.
|
Pin a simulator name and OS version in your project guidance so the assistant always uses the same target.
|
||||||
@ -133,25 +133,25 @@ When running iOS builds or tests, always use XcodeBuildMCP with the iOS simulato
|
|||||||
- Keeps build outputs consistent across developers
|
- Keeps build outputs consistent across developers
|
||||||
|
|
||||||
### Install And Setup (Official)
|
### Install And Setup (Official)
|
||||||
+Follow the official instructions: https://github.com/getsentry/XcodeBuildMCP
|
Follow the official instructions: https://github.com/getsentry/XcodeBuildMCP
|
||||||
|
|
||||||
### References
|
### References
|
||||||
+- https://www.apple.com/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/
|
- https://www.apple.com/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/
|
||||||
+- https://github.com/cameroncooke/XcodeBuildMCP
|
- https://github.com/cameroncooke/XcodeBuildMCP
|
||||||
+- https://github.com/getsentry/XcodeBuildMCP
|
- https://github.com/getsentry/XcodeBuildMCP
|
||||||
+- https://code.visualstudio.com/docs/copilot/customization/mcp-servers
|
- https://code.visualstudio.com/docs/copilot/customization/mcp-servers
|
||||||
|
|
||||||
## Xcode 26.3 And MCP Integration
|
## Xcode 26.3 And MCP Integration
|
||||||
+Apple announced that Xcode 26.3 exposes Xcode capabilities through the Model Context Protocol (MCP), which enables compatible agents and tools to interact with Xcode features directly.
|
Apple announced that Xcode 26.3 exposes Xcode capabilities through the Model Context Protocol (MCP), which enables compatible agents and tools to interact with Xcode features directly.
|
||||||
|
|
||||||
### What This Means (Plain Language)
|
### What This Means (Plain Language)
|
||||||
+- Xcode can be controlled by MCP-enabled tools.
|
- Xcode can be controlled by MCP-enabled tools.
|
||||||
+- Agents can access more of Xcode's capabilities without you manually clicking through the UI.
|
- Agents can access more of Xcode's capabilities without you manually clicking through the UI.
|
||||||
|
|
||||||
### Example Workflow
|
### Example Workflow
|
||||||
+1. You ask an agent to build the project.
|
1. You ask an agent to build the project.
|
||||||
+2. The agent uses MCP to run the build inside Xcode.
|
2. The agent uses MCP to run the build inside Xcode.
|
||||||
+3. The agent summarizes errors and suggests fixes.
|
3. The agent summarizes errors and suggests fixes.
|
||||||
|
|
||||||
### Source
|
### Source
|
||||||
+https://www.apple.com/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/
|
https://www.apple.com/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user