Skip to content

Instantly share code, notes, and snippets.

@ksm
Last active February 21, 2026 01:24
Show Gist options
  • Select an option

  • Save ksm/4fea3e2db548b0aec4b1e57c56f9eeb7 to your computer and use it in GitHub Desktop.

Select an option

Save ksm/4fea3e2db548b0aec4b1e57c56f9eeb7 to your computer and use it in GitHub Desktop.
Xcode MCP Remote Access Options

Xcode MCP Remote Access Options

Options for connecting to Xcode's MCP server from an agent on a different machine on your network.

Background

  • xcrun mcpbridge: Apple's built-in MCP bridge that connects to Xcode. Uses stdio only, must run on the Mac where Xcode is installed.
  • Xcode MCP Tools: Enable in Xcode → Settings → Intelligence → Model Context Protocol.

Option 1: Custom Python Proxy

Files: xcode-mcp-proxy.py (server) + xcode-mcp-client.py (client)

Transport Raw TCP relay
Remote binding Yes (0.0.0.0)
Dependencies Python 3
Xcode auth prompts New prompt per connection

Setup

On Xcode Mac:

python3 xcode-mcp-proxy.py [port]   # default: 3847

On remote machine (e.g. ~/.cursor/mcp.json):

{
  "mcpServers": {
    "xcode": {
      "command": "python3",
      "args": ["/path/to/xcode-mcp-client.py", "<XCODE-MAC-IP>", "3847"]
    }
  }
}

Option 2: XCodeMCPService

Repo: https://github.com/ljh740/XCodeMCPService

Transport Streamable HTTP
Remote binding Unclear (docs say localhost only)
Dependencies Swift 6, macOS 15+, Xcode 26.3+
Xcode auth prompts Single process, one prompt

Setup

On Xcode Mac:

# Build and install
git clone git@github.com:ljh740/XCodeMCPService.git
cd XCodeMCPService
bash build-app.sh
cp -r "build/XCode MCP Service.app" /Applications/

# Config: ~/Library/Application Support/XCodeMCPService/config.json
# Change "host" to "0.0.0.0" for remote (if supported)

On remote machine:

{
  "mcpServers": {
    "xcode": {
      "type": "http",
      "url": "http://<XCODE-MAC-IP>:13339/mcp"
    }
  }
}

Alternative: Use SSH port forwarding if host binding is restricted:

ssh -L 13339:127.0.0.1:13339 user@xcode-mac
# Then connect to http://127.0.0.1:13339/mcp

Option 3: XcodeMCPKit

Repo: https://github.com/lynnswap/XcodeMCPKit

Transport Streamable HTTP
Remote binding Yes (--listen 0.0.0.0:8765)
Dependencies Swift 6, macOS 15+
Xcode auth prompts Single process, one prompt

Setup

On Xcode Mac:

# Install
git clone https://github.com/lynnswap/XcodeMCPKit.git
cd XcodeMCPKit
swift run -c release xcode-mcp-proxy-install

# Start server with remote access
xcode-mcp-proxy-server --listen 0.0.0.0:8765

On remote machine:

{
  "mcpServers": {
    "xcode": {
      "type": "http",
      "url": "http://<XCODE-MAC-IP>:8765/mcp"
    }
  }
}

Option 4: mcp-proxy (Generic)

Repo: https://github.com/sparfenyuk/mcp-proxy

Transport stdio → SSE/Streamable HTTP
Remote binding Yes (--host=0.0.0.0)
Dependencies Python (uv tool install mcp-proxy or pipx install mcp-proxy)
Xcode auth prompts New prompt per connection

Setup

On Xcode Mac:

mcp-proxy --port=8080 --host=0.0.0.0 xcrun mcpbridge

On remote machine:

{
  "mcpServers": {
    "xcode": {
      "type": "http",
      "url": "http://<XCODE-MAC-IP>:8080/sse"
    }
  }
}

Named servers (multiple stdio servers behind one proxy):

mcp-proxy --port=8080 --host=0.0.0.0 \
  --named-server xcode 'xcrun mcpbridge' \
  --named-server fetch 'uvx mcp-server-fetch'
# xcode at /servers/xcode/sse, fetch at /servers/fetch/sse

Option 5: XcodeBuildMCP (Different Tool)

Repo: https://github.com/getsentry/XcodeBuildMCP

What it is Standalone MCP server (not a proxy for mcpbridge)
Uses xcodebuild CLI, not Xcode's internal tools
Transport stdio only (no built-in network)
Needs Xcode running No

XcodeBuildMCP provides its own tools for builds, simulators, testing, etc. It does not wrap xcrun mcpbridge. For remote access, wrap it with mcp-proxy:

mcp-proxy --port=8080 --host=0.0.0.0 npx -y xcodebuildmcp@latest mcp

Comparison Table

Option Remote binding Single mcpbridge Native HTTP Ease of install
Python proxy ✗ (TCP) Easy
XCodeMCPService ? Build from source
XcodeMCPKit swift run + install
mcp-proxy uv tool install
XcodeBuildMCP Via mcp-proxy N/A Homebrew / npx

Firewall

Allow inbound TCP on the proxy port on the Xcode Mac (e.g. System Settings → Network → Firewall).


Recommendation

  • Fewest Xcode prompts: XcodeMCPKit (single mcpbridge, explicit 0.0.0.0 support)
  • Quickest setup: mcp-proxy (uv tool install mcp-proxy)
  • No extra deps: Custom Python proxy (uses only stdlib)

Running Persistently on the Xcode Mac

xcrun mcpbridge (Options 1–4)

Requires Xcode GUI running and a user session. Works when:

Scenario Works?
User logged in, Xcode running, screen locked ✓ Yes
User logged in, Xcode running, Mac awake ✓ Yes
All users logged out ✗ No
Mac sleeping ✗ Network connections drop

Setup: User LaunchAgent in ~/Library/LaunchAgents/ (no admin). Starts when user logs in. Add Xcode to Login Items if you want both to auto-start.

XcodeBuildMCP (Option 5)

Uses xcodebuild CLI, does not need Xcode GUI. Can run with no one logged in.

Setup: LaunchDaemon in /Library/LaunchDaemons/ (one-time admin). Use UserName to run as non-admin. Starts at boot.

Locked screen

Locked = session still active, only display locked. Xcode and the proxy keep running. MCP works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment