docs: add mcp references
This commit is contained in:
parent
0a5c3f22ef
commit
8f7cae08ba
@ -31,6 +31,15 @@ Open a Kotlin file and add:
|
||||
### Example Request
|
||||
"Refactor this repository to reduce duplication. Keep the public API the same and list tests to update."
|
||||
|
||||
## MCP For Android (High-Level)
|
||||
MCP tools can automate Android tasks like builds, tests, and diagnostics. The exact tool depends on your team setup.
|
||||
|
||||
### What To Add Here
|
||||
When you identify the approved Android MCP tool(s), add:
|
||||
- Install steps
|
||||
- VS Code configuration
|
||||
- Example prompts
|
||||
|
||||
### Starter Prompts
|
||||
- "Create a Kotlin data class and mapper for this API response."
|
||||
- "Write unit tests for this repository using JUnit."
|
||||
|
||||
@ -63,3 +63,27 @@ Scoped: "Refactor this file to remove duplication. Do not change behavior."
|
||||
|
||||
### Example Summary Request
|
||||
"Summarize the decisions so far in 6 bullets so I can start a new chat."
|
||||
|
||||
## MCP (Model Context Protocol) - Cross-Platform Overview
|
||||
MCP is an open standard that lets tools and agents interact with real systems. In plain language, MCP lets the assistant "do" things (like run builds or fetch logs) instead of just talking about them.
|
||||
|
||||
### How MCP Helps In A Workflow
|
||||
Think of MCP as a set of safe, structured buttons the assistant can press. You ask a question, the assistant calls a tool, and it returns a clear result.
|
||||
|
||||
### Common MCP Use Cases (All Platforms)
|
||||
- Run builds and tests
|
||||
- Fetch logs or diagnostics
|
||||
- Query project configuration
|
||||
- Generate previews or reports
|
||||
|
||||
### Example Workflow
|
||||
1. Ask the assistant to run a build.
|
||||
2. The MCP tool runs it and returns the result.
|
||||
3. You ask for a summary and next steps.
|
||||
|
||||
### Example Prompt
|
||||
"Use the build MCP tool to run the build and summarize any errors."
|
||||
|
||||
### Where To Learn More
|
||||
- iOS examples: see [iOS Setup](ios.md)
|
||||
- Android examples: see [Android Setup](android.md)
|
||||
|
||||
@ -25,11 +25,14 @@ Follow the steps in order. Do not skip ahead if this is your first time.
|
||||
- [Android Setup](android.md)
|
||||
|
||||
## Usage Guides
|
||||
- [Cross-Platform AI Usage](cross-platform.md)
|
||||
- [Cross-Platform AI Usage](cross-platform.md) - Agents, prompting patterns, MCP overview, and workflow tips
|
||||
- [Skills Library](skills.md)
|
||||
- [Usage and Token Budgeting](usage-tokens.md)
|
||||
- [Troubleshooting and FAQ](troubleshooting.md)
|
||||
- [Governance, Privacy, and Policy](governance.md)
|
||||
|
||||
## iOS MCP Details
|
||||
- [XcodeBuildMCP (iOS)](ios-xcodebuildmcp.md) - Full MCP setup and usage for Xcode workflows
|
||||
|
||||
## Confluence Mapping
|
||||
This folder maps 1:1 to Confluence pages so content can be copied without rework.
|
||||
|
||||
109
docs/ai/ios-xcodebuildmcp.md
Normal file
109
docs/ai/ios-xcodebuildmcp.md
Normal file
@ -0,0 +1,109 @@
|
||||
# XcodeBuildMCP (iOS)
|
||||
|
||||
This page focuses on MCP-based Xcode workflows and the XcodeBuildMCP setup.
|
||||
|
||||
## What XcodeBuildMCP Is (Plain Language)
|
||||
+XcodeBuildMCP can run build and test tasks without you switching into Xcode for every step. This reduces context switching and makes workflows repeatable.
|
||||
+
|
||||
+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:
|
||||
+- Run a build for a target or scheme
|
||||
+- Run tests and return failures
|
||||
+- Capture build output so the assistant can summarize errors
|
||||
+
|
||||
+### Example Requests
|
||||
+- "Use XcodeBuildMCP to build the app and summarize any errors."
|
||||
+- "Run tests with XcodeBuildMCP and list the failing tests."
|
||||
+- "Build with XcodeBuildMCP and extract the first error message."
|
||||
+
|
||||
+## Xcode 26.3 MCP Setup (Detailed)
|
||||
+These steps reflect a common setup as of February 2026. Wording may vary slightly in release candidates.
|
||||
+
|
||||
+### Prerequisites
|
||||
+- Xcode 26.3 (RC or full release), opened at least once with your project
|
||||
+- VS Code installed (stable or Insiders)
|
||||
+- GitHub Copilot extension installed and signed in
|
||||
+- Node.js and npm installed (for XcodeBuildMCP)
|
||||
+
|
||||
+### Step 1: Enable Xcode MCP Server
|
||||
+1. Open Xcode.
|
||||
+2. Go to Settings.
|
||||
+3. Open the Intelligence tab.
|
||||
+4. Find the Model Context Protocol section.
|
||||
+5. Toggle on Xcode Tools (or Allow external connections).
|
||||
+
|
||||
+### Step 2: Install And Configure XcodeBuildMCP (Recommended Bridge)
|
||||
+Install:
|
||||
+
|
||||
+```bash
|
||||
+npm install -g xcodebuildmcp@latest
|
||||
+```
|
||||
+
|
||||
+Add to VS Code (create or edit .vscode/mcp.json):
|
||||
+
|
||||
+```json
|
||||
+{
|
||||
+ "servers": {
|
||||
+ "XcodeBuildMCP": {
|
||||
+ "command": "npx",
|
||||
+ "args": ["-y", "xcodebuildmcp@latest", "mcp"]
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+```
|
||||
+
|
||||
+Restart VS Code or reload the window. Copilot should discover the tools.
|
||||
+
|
||||
+### Step 3: Optional Native Xcode MCP Bridge
|
||||
+Xcode 26.3 includes a native MCP bridge. This exposes Xcode tools directly.
|
||||
+
|
||||
+Add to VS Code:
|
||||
+
|
||||
+```json
|
||||
+{
|
||||
+ "servers": {
|
||||
+ "XcodeNative": {
|
||||
+ "command": "xcrun",
|
||||
+ "args": ["mcpbridge"]
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+```
|
||||
+
|
||||
+### Using MCP In VS Code With Copilot
|
||||
+1. Open your iOS project in VS Code.
|
||||
+2. Use Copilot Chat in agent mode for multi-step tasks.
|
||||
+3. MCP tools appear as slash commands once discovered.
|
||||
+
|
||||
+Example:
|
||||
+"Use XcodeBuildMCP to build and summarize errors. Then suggest fixes."
|
||||
+
|
||||
+### Tips And Caveats
|
||||
+- Xcode must be running (or launchable) for MCP tools to respond.
|
||||
+- Native Xcode MCP is often best for previews.
|
||||
+- XcodeBuildMCP is often best for heavy builds and automation.
|
||||
+
|
||||
+### Install And Setup (Official)
|
||||
+Follow the official instructions: https://github.com/getsentry/XcodeBuildMCP
|
||||
+
|
||||
+### References
|
||||
+- 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/getsentry/XcodeBuildMCP
|
||||
+- https://code.visualstudio.com/docs/copilot/customization/mcp-servers
|
||||
+
|
||||
+## 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.
|
||||
+
|
||||
+### What This Means (Plain Language)
|
||||
+- Xcode can be controlled by MCP-enabled tools.
|
||||
+- Agents can access more of Xcode's capabilities without you manually clicking through the UI.
|
||||
+
|
||||
+### Example Workflow
|
||||
+1. You ask an agent to build the project.
|
||||
+2. The agent uses MCP to run the build inside Xcode.
|
||||
+3. The agent summarizes errors and suggests fixes.
|
||||
+
|
||||
+### Source
|
||||
+https://www.apple.com/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/
|
||||
@ -60,6 +60,11 @@ Open a Swift file and add:
|
||||
- "Write unit tests for this view model using XCTest."
|
||||
- "Refactor this view to reduce duplication without changing behavior."
|
||||
|
||||
## MCP For iOS
|
||||
The detailed MCP setup and XcodeBuildMCP guidance is in a dedicated page:
|
||||
|
||||
- [XcodeBuildMCP (iOS)](ios-xcodebuildmcp.md)
|
||||
|
||||
## iOS Troubleshooting
|
||||
- If suggestions are missing, confirm sign-in and access.
|
||||
- If the plugin is not visible, verify extension compatibility.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user