XcodeMCPWrapper
A Python wrapper that makes Xcode's MCP bridge compatible with strict spec-compliant clients like Cursor by fixing response formatting. It enables AI assistants to build projects, run tests, and query Xcode project data through the Model Context Protocol.
README
XcodeMCPWrapper - mcpbridge-wrapper
<!-- mcp-name: io.github.SoundBlaster/xcode-mcpbridge-wrapper -->
A Python wrapper that makes Xcode 26.3's MCP bridge compatible with Cursor and other strict MCP-spec-compliant clients.
The Problem
Xcode's mcpbridge returns tool responses in the content field but omits the required structuredContent field when a tool declares an outputSchema. According to the MCP specification, when outputSchema is declared, responses must include structuredContent.
- ✅ Claude Code and Codex CLI work (they have special handling for Apple's responses)
- ❌ Cursor strictly follows the spec and rejects non-compliant responses
The Solution
mcpbridge-wrapper intercepts responses from xcrun mcpbridge and copies the data from content into structuredContent, making Xcode's MCP tools fully compatible with all MCP clients.
┌─────────────┐ MCP Protocol ┌──────────────────┐ MCP Protocol ┌────────────┐ XPC ┌─────────┐
│ Cursor │ ◄────────────────► │ mcpbridge-wrapper│ ◄──────────────► │ mcpbridge │ ◄───────► │ Xcode │
│ (MCP Client)│ │ (This Project) │ │ (Bridge) │ │ (IDE) │
└─────────────┘ └──────────────────┘ └────────────┘ └─────────┘
Quick Start
Prerequisites
- macOS with Xcode 26.3+
- Python 3.7+
- Xcode Tools MCP Server enabled (see below)
⚠️ Important: You MUST enable Xcode Tools MCP in Xcode settings:
- Open Xcode > Settings (⌘,)
- Select Intelligence in the sidebar
- Under Model Context Protocol, toggle Xcode Tools ON
If you see "Found 0 tools" in your MCP client logs, this setting is not enabled.
Installation
Option 1: Using uvx (Recommended - Easiest)
The fastest way to install is using uvx (requires uv to be installed):
# No manual installation needed - uvx will automatically download and run
uvx --from mcpbridge-wrapper mcpbridge-wrapper
Or add to your MCP client configuration directly (see configuration sections below).
Option 2: Via MCP Registry
If your MCP client supports the MCP Registry:
Server name: io.github.SoundBlaster/xcode-mcpbridge-wrapper
# Using mcp-publisher CLI
mcp-publisher install io.github.SoundBlaster/xcode-mcpbridge-wrapper
Option 3: Using pip
pip install mcpbridge-wrapper
Then use mcpbridge-wrapper or xcodemcpwrapper command.
Option 4: Manual Installation (Development)
For development or if you prefer to install from source:
git clone https://github.com/SoundBlaster/XcodeMCPWrapper.git
cd XcodeMCPWrapper
./scripts/install.sh
Add the following to your ~/.bashrc or ~/.zshrc:
export PATH="$HOME/bin:$PATH"
Then reload:
source ~/.zshrc
# or
. ~/.zshrc
Uninstallation
To remove xcodemcpwrapper from your system:
./scripts/uninstall.sh
Options:
--dry-runor-n: Show what would be removed without removing--yesor-y: Skip confirmation prompt
Configuration
Cursor
Using uvx (Recommended):
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"xcode-tools": {
"command": "uvx",
"args": ["--from", "mcpbridge-wrapper", "mcpbridge-wrapper"]
}
}
}
Using manual installation:
{
"mcpServers": {
"xcode-tools": {
"command": "/Users/YOUR_USERNAME/bin/xcodemcpwrapper",
"args": []
}
}
}
Claude Code
Using uvx (Recommended):
claude mcp add --transport stdio xcode -- uvx --from mcpbridge-wrapper mcpbridge-wrapper
Using manual installation:
claude mcp add --transport stdio xcode -- ~/bin/xcodemcpwrapper
Codex CLI
Using uvx (Recommended):
codex mcp add xcode -- uvx --from mcpbridge-wrapper mcpbridge-wrapper
Using manual installation:
codex mcp add xcode -- ~/bin/xcodemcpwrapper
Zed Agent
Using uvx (Recommended):
Edit ~/.zed/settings.json:
{
"xcode-tools": {
"command": "uvx",
"args": ["--from", "mcpbridge-wrapper", "mcpbridge-wrapper"],
"env": {}
}
}
Using manual installation:
{
"xcode-tools": {
"command": "/Users/YOUR_USERNAME/bin/xcodemcpwrapper",
"args": [],
"env": {}
}
}
Kimi CLI
Using uvx (Recommended):
Edit ~/.kimi/mcp.json:
{
"xcode-tools": {
"command": "uvx",
"args": ["--from", "mcpbridge-wrapper", "mcpbridge-wrapper"],
"env": {}
}
}
Using manual installation:
{
"xcode-tools": {
"command": "/Users/YOUR_USERNAME/bin/xcodemcpwrapper",
"args": [],
"env": {}
}
}
Usage
Once configured, ask your AI assistant to use Xcode tools:
"Build my project"
"Run the tests"
"Find all Swift files in the project"
"Show me the build errors"
Documentation
- Installation Guide
- Cursor Setup
- Claude Code Setup
- Codex CLI Setup
- Troubleshooting
- Tools Reference
- Architecture
- Contributing - Development guide and quality gates
Development
See CONTRIBUTING.md for development setup and contribution guidelines.
Quick quality gate check:
make test # Run tests with coverage
make lint # Run ruff linter
make typecheck # Run mypy type checker
Or run all gates:
make test && make lint && make typecheck
Performance
- Overhead: <0.01ms per transformation
- Memory: <10MB footprint
- Coverage: 98.2% test coverage
License
MIT License - see LICENSE for details.
Acknowledgments
- Apple's Xcode team for the MCP bridge functionality
- The MCP protocol specification
- The Cursor, Claude, and Codex teams for AI-powered development tools
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.