Python wrapper for xcrun mcpbridge that adds structuredContent to MCP responses
Project description
XcodeMCPWrapper - 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: Via MCP Registry (Recommended)
If your MCP client supports the MCP Registry, you can install directly:
Server name: io.github.SoundBlaster/mcpbridge-wrapper
# Using mcp-publisher CLI
mcp-publisher install io.github.SoundBlaster/mcpbridge-wrapper
# Or via your MCP client's registry browser
Option 2: Manual Installation
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 config:
source ~/.zshrc
or use shortcut:
. ~/.zshrc
Uninstallation
To remove mcpbridge-wrapper from your system:
./scripts/uninstall.sh
Options:
--dry-runor-n: Show what would be removed without removing--yesor-y: Skip confirmation prompt
Configuration
Cursor
Edit ~/.cursor/mcp.json with replacing YOUR_USERNAME with your real username:
{
"mcpServers": {
"xcode-tools": {
"command": "/Users/YOUR_USERNAME/bin/mcpbridge-wrapper",
"args": []
}
}
}
Claude Code
claude mcp add --transport stdio xcode -- ~/bin/mcpbridge-wrapper
Codex CLI
codex mcp add xcode -- ~/bin/mcpbridge-wrapper
Zed Agent
Edit ~/.zed/settings.json (or use the Zed > Settings menu):
{
"xcode-tools": {
"command": "/Users/YOUR_USERNAME/bin/mcpbridge-wrapper",
"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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcpbridge_wrapper-0.1.6.tar.gz.
File metadata
- Download URL: mcpbridge_wrapper-0.1.6.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cdaa275ebc7afb68bf77f05344736caf7215486c0719b97f1e5d28cc335bb47
|
|
| MD5 |
16f279c9516a6e42e79274302a7aaab9
|
|
| BLAKE2b-256 |
8b3f76917e57c8a5ea4ad2e42a13d0e5c197a1bba8cefaa3b1f0beb3076cd4e2
|
Provenance
The following attestation bundles were made for mcpbridge_wrapper-0.1.6.tar.gz:
Publisher:
publish-mcp.yml on SoundBlaster/XcodeMCPWrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpbridge_wrapper-0.1.6.tar.gz -
Subject digest:
0cdaa275ebc7afb68bf77f05344736caf7215486c0719b97f1e5d28cc335bb47 - Sigstore transparency entry: 928234766
- Sigstore integration time:
-
Permalink:
SoundBlaster/XcodeMCPWrapper@5fa23d40cca0fe3b114c3169012bd1cb55a775c6 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/SoundBlaster
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mcp.yml@5fa23d40cca0fe3b114c3169012bd1cb55a775c6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcpbridge_wrapper-0.1.6-py3-none-any.whl.
File metadata
- Download URL: mcpbridge_wrapper-0.1.6-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2db001cc4049400a8e1cca2b927b63e0c8d30b74cb288d4ae70c70d0822aa317
|
|
| MD5 |
d3925e8463e3faf646b165f0413ee97f
|
|
| BLAKE2b-256 |
32a0da8e9c026a534fc91a81cc7b8b127c3c9caf22a24c49e385beb0d2e7b6d8
|
Provenance
The following attestation bundles were made for mcpbridge_wrapper-0.1.6-py3-none-any.whl:
Publisher:
publish-mcp.yml on SoundBlaster/XcodeMCPWrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpbridge_wrapper-0.1.6-py3-none-any.whl -
Subject digest:
2db001cc4049400a8e1cca2b927b63e0c8d30b74cb288d4ae70c70d0822aa317 - Sigstore transparency entry: 928234767
- Sigstore integration time:
-
Permalink:
SoundBlaster/XcodeMCPWrapper@5fa23d40cca0fe3b114c3169012bd1cb55a775c6 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/SoundBlaster
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mcp.yml@5fa23d40cca0fe3b114c3169012bd1cb55a775c6 -
Trigger Event:
push
-
Statement type: