XcodeMCPKit
An MCP proxy for Xcode MCP (mcpbridge).
Designed so the Xcode permission dialog appears once when the proxy starts.
Quick Start
- Start the proxy server
xcode-mcp-proxy-server - Click Allow in Xcode’s permission dialog
Architecture
See Architecture for the process overview.
Installation
swift run -c release xcode-mcp-proxy-install
Replace xcrun mcpbridge with one of the following:
Codex
codex mcp remove xcode
# Recommended: Streamable HTTP
codex mcp add xcode --url http://localhost:8765/mcp
# Alternative: STDIO
codex mcp add xcode -- xcode-mcp-proxy
Claude Code
claude mcp remove xcode
claude mcp add --transport stdio xcode -- xcode-mcp-proxy
By default, xcode-mcp-proxy and xcode-mcp-proxy-server are installed to ~/.local/bin. Add it to your PATH if needed.
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
To change the destination:
./.build/release/xcode-mcp-proxy-install --prefix "$HOME/.local"
# or
./.build/release/xcode-mcp-proxy-install --bindir "$HOME/bin"
Usage
Proxy Server: xcode-mcp-proxy-server
See Quick Start for how to launch.
Defaults
- command:
xcrun - args:
mcpbridge - upstream processes:
1(spawns multiplemcpbridgeprocesses when increased) - listen:
localhost:8765 - request timeout:
300seconds (0disables) - max body size:
1048576bytes - initialization: eager at startup
- discovery:
~/Library/Caches/XcodeMCPProxy/endpoint.json
Environment Variables
MCP_XCODE_PID(alternative to--xcode-pid)MCP_XCODE_SESSION_ID(fixes the Xcode MCP session ID; usually not needed)MCP_LOG_LEVEL(log level: trace|debug|info|notice|warning|error|critical)
Logs are written to stderr.
Note: when using --upstream-processes > 1, fixing the session id via --session-id / MCP_XCODE_SESSION_ID can help reduce permission dialog prompts in Xcode.
Options
| Option | Description |
|---|---|
--upstream-command cmd | mcpbridge command |
--upstream-args a,b,c | mcpbridge args (comma-separated) |
--upstream-arg value | Append a single mcpbridge arg |
--upstream-processes n | Spawn n upstream mcpbridge processes (default: 1, max: 10) |
--xcode-pid pid | Xcode PID |
--session-id id | Xcode MCP session ID (usually not needed) |
--max-body-bytes n | Max request body size |
--request-timeout seconds | Request timeout (0 disables) |
--lazy-init | Delay initialization until first request |
--force-restart | If the listen port is in use, terminate an existing xcode-mcp-proxy-server and restart |
Adapter: xcode-mcp-proxy
Options
| Option | Description |
|---|---|
--request-timeout seconds | HTTP request timeout (0 disables) |
--url url | Explicit upstream URL (example: http://localhost:9000/mcp) |
Environment Variables
XCODE_MCP_PROXY_ENDPOINT(override upstream URL;--urltakes precedence)