XcodeMCPWrapper AGENTS.md

A Python wrapper that lets AI coding tools connect to Xcode through the Model Context Protocol, a standard way for programs to expose tools to one another. It fixes a response-format problem in Xcode's built-in bridge.

In plain words
What is it for?
Use it when connecting Cursor or another compatible AI client to Xcode for project and development operations.
Why use it?
It allows clients that strictly check the protocol, such as Cursor, to use Xcode tools that would otherwise be rejected.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/soundblaster/xcodemcpwrapper/agents-md
Clone the repo
git clone --depth 1 https://github.com/SoundBlaster/XcodeMCPWrapper

Made for: Codex, OpenCode.

Per session 3,421 This file is loaded in full into every session.
When invoked 3,421 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03421 $0.03421
Opus 5 $0.01710 $0.01710
Sonnet 5 $0.00684 $0.00684
Haiku 4.5 $0.00342 $0.00342

Measured 2d ago against content hash 483119a9c22a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

XcodeMCPWrapper AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 431 lines

How it starts

The opening of the file, as written. The whole thing — 431 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Xcode MCP Wrapper

Project Overview

This project provides a wrapper solution that enables external AI agents (Cursor, Claude CLI, Codex) to connect to Xcode via the Model Context Protocol (MCP). Xcode 26.3+ includes an MCP bridge (xcrun mcpbridge) that exposes Xcode's internal capabilities to MCP clients, but it has a protocol compatibility issue that prevents it from working with strict MCP spec followers like Cursor.

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 because they have special handling for Apple's responses; Cursor strictly follows the spec and rejects non-compliant responses.

The Solution

A Python wrapper (xcodemcpwrapper) that intercepts responses from xcrun mcpbridge and copies the data from content into structuredContent, making Xcode's MCP tools fully compatible with all MCP clients.

Architecture

┌─────────────┐    MCP Protocol    ┌──────────────────┐   MCP Protocol   ┌────────────┐    XPC    ┌─────────┐
│   Cursor    │ ◄────────────────► │  xcodemcpwrapper │ ◄──────────────► │ mcpbridge  │ ◄───────► │  Xcode  │
│ (MCP Client)│                    │  (This Project)  │                  │  (Bridge)  │           │  (IDE)  │
└─────────────┘                    └──────────────────┘                  └────────────┘           └─────────┘

Project Status

✅ COMPLETE - 2026-02-08

Phase Tasks Status
Phase 1: Foundation & Scaffolding 6/6 ✅ Complete
Phase 2: Core Bridge Implementation 7/7 ✅ Complete
Phase 3: Response Transformation Engine 10/10 ✅ Complete
Phase 4: Edge Case Handling 9/9 ✅ Complete
Phase 5: Testing & Verification 14/14 ✅ Complete
Phase 6: Packaging & Distribution 8/8 ✅ Complete
Phase 7: Documentation 11/11 ✅ Complete
Phase 8: Documentation Publishing 2/2 ✅ Complete
Phase 10: Web UI Dashboard 1/1 ✅ Complete
Total 68/68 ✅ 100%

Read the full file on GitHub · 431 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 431 lines · 3,421 tokens per session scan A 483119a9c22a

Subscribe to this mod's changes

XcodeMCPWrapper AGENTS.md is an instructions file published in the GitHub repository SoundBlaster/XcodeMCPWrapper (20 stars, last pushed 2mo ago), licensed MIT. It adds 3,421 tokens to every session, about $0.0171 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.