Xcode MCP

Resolved 💬 13 comments Opened Feb 5, 2026 by BlindsidedGames Closed Mar 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

Version 260204.1342 (531)

What subscription do you have?

PRO

What issue are you seeing?

<img width="328" height="350" alt="Image" src="https://github.com/user-attachments/assets/c948fa0a-5d59-4d14-8ea0-35f02991e30a" />

I grabbed Xcode 26.3 for the Xcode map, not sure why it's so hard to get codex to be able to see warnings and errors in Xcode but designing an app without this is just intolerable. Anyway got that working but I get spammed with these request I presume from the fact that there are multiple agents. ?

I spent the better part of the last 4 hours trying to debug it via multiple agents assistance searched online everywhere and cannot find a solution.

I opened a single instance of codex from the terminal and it asked one time.

It isn't usable from the codex app when it pops up every 3 seconds asking permission again with the same ID.

Codex also fails to discover the tools repeatedly and try to convince me I am crazy when I can see them listed right there. It's incredibly frustrating to be told I am wrong about something the app itself is showing access to.

I have successfully managed to retrieve warnings and errors now multiple times from individual chats but honestly this is a nightmare and needs to be fixed before Xcode 26.3 is released (currently a release candidate) This is definitely a codex issue though. MacOS isn't adding it to automations either.

What steps can reproduce the bug?

Install Xcode 26.3 get the codex stuff. enable MCP Xcode tools. configure codex to use them, watch the resulting spam.

What is the expected behavior?

I expect not to be repeatedly asked 10's of times to press approve while trying to work on a new app.

Additional information

NA

View original on GitHub ↗

13 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #10735

Powered by Codex Action

BlindsidedGames · 5 months ago

Sorry I am exhausted it's now midnight and this has been an extremely trying experience. If I came across rude I don't mean to.

No that issue isn't a duplicate.

tabletcorry contributor · 5 months ago

As a temporary workaround, running a MCP proxy (find one that does stdio to streaming HTTP) more or less works. The proxy holds the "single connection" that keeps Xcode happy and lets Codex constantly open new sessions on its side.

Which reveals the core issue here: Xcode wants a single persistent connection while Codex is _constantly_ creating new connections to MCP, with any excuse at all. So Xcode sees each new MCP connection as requiring a new approval, which isn't really wrong. Codex should maintain a single connection.

BlindsidedGames · 5 months ago

I see, thanks for the insight and workaround. Hopefully they can fix it properly soon. Do you have any recommendations?

llk23r · 4 months ago

Following on the comment by @tabletcorry, I was able to get the following approach working for me. Hope this helps:

npm install -g mcp-proxy
mcp-proxy --port 9876 -- xcrun mcpbridge &
codex mcp remove xcode 2>/dev/null
codex mcp add --url http://localhost:9876/mcp xcode-proxy

Update Xcode to 26.3 RC2 (17C528) to fix MCP error -32600 on 26.3 RC1. Refer: Known Limitation in Xcode 26.3 RC 1 (Fixed in RC 2)

The TCC dialog should only fire once after this and you should be able to see mcp-proxy in the list on Xcode under Agent Activity:

<img width="364" height="212" alt="Image" src="https://github.com/user-attachments/assets/218f0a87-c965-4a21-900f-a792d991e0a2" />

---
A script to manage this for both codex and claude: xcode-mcp-proxy-manager.sh

nannestad · 4 months ago

I have this problem too with the Xcode 26.4 Beta. The right solution here would be that Codex maintains one single connection to the Xcode MCP. Urgent fix would be very appreciated.

opsroller · 4 months ago

Or, look at the Xcode.app and see they simply have poor documentation.

``` shell
find /Applications/Xcode.app -type f -iname 'mcp*'

-rwxr-xr-x 1 501 80 398336 Jan 29 02:36 /Applications/Xcode.app/Contents/Developer/usr/bin/mcpbridge


Then 

mcpbridge -h


yields

mcpbridge - STDIO Bridge for Xcode MCP Tools

USAGE:
xcrun mcpbridge

DESCRIPTION:
Acts as a STDIO bridge between MCP (Model Context Protocol) clients and Xcode's MCP tool service.
Reads JSON-RPC 2.0 messages from stdin and forwards responses to stdout.

ENVIRONMENT VARIABLES:
MCP_XCODE_PID Optional. The process ID of the Xcode instance to connect to.

If not set, auto-detection uses the following fallback logic:

  1. If exactly one Xcode process is running, use that
  2. If multiple Xcode processes are running, use xcode-select

to determine which Xcode is selected and connect to that

  1. If no Xcode processes found, exit with error

MCP_XCODE_SESSION_ID Optional. A UUID identifying an Xcode tool session.

EXAMPLES:
# Run with auto-detected Xcode instance
xcrun mcpbridge

# Run with specific Xcode PID
MCP_XCODE_PID=12345 xcrun mcpbridge

OPTIONS:
-h, -help, --help Show this help message


and there's how we use it correctly.

Then ask the local AGENT to give correct instructions on configuration of this so that it doesn't incorrectly keep respawning.
sstklen · 4 months ago

Hey! I ran into a similar pattern in our bug knowledge base and thought this might help.

What's happening: Xcode's MCP bridge (xcrun mcpbridge) uses stdio transport, which only supports a single connection. Codex's multi-agent architecture causes each agent to independently spawn its own mcpbridge process. Each spawned process triggers a macOS security permission prompt, producing the dialog spam shown in the screenshot. On Xcode 26.3 RC1, the bridge also returns MCP error -32600 on certain requests, causing agents to retry and re-spawn connections in a loop — amplifying the spam.

What worked for us:

Do NOT kill Codex agents — they are working as designed. Instead, run a single mcpbridge instance behind mcp-proxy (HTTP/SSE transport) so all agents share one bridge process and one permission grant. Then register the proxy URL in Codex instead of the raw stdio bridge. Also update to Xcode 26.3 RC2 (build 17C528) which fixes the -32600 protocol error that causes retry storms.

# 1. Install mcp-proxy globally
npm install -g mcp-proxy

# 2. Start a single mcpbridge behind the proxy (background)
mcp-proxy --port 9876 -- xcrun mcpbridge &

# 3. Replace the stdio-based xcode MCP with the proxied HTTP endpoint
codex mcp remove xcode 2>/dev/null
codex mcp add --url http://localhost:9876/mcp xcode-proxy

# 4. Update Xcode to 26.3 RC2 (build 17C528) via Xcode > Settings > Components
#    or download from developer.apple.com — fixes MCP -32600 error

Hope this helps! Let me know if it doesn't match your case — happy to dig deeper. 🦞

_Disclosure: This analysis is from Confucius Debug, an AI-powered community KB for agent bugs. Please verify before applying._

---
<sub>🦞 Confucius Debug — community knowledge base for AI agent bugs. Free to search via MCP.</sub>

ilaikim99 · 4 months ago

The root issue is that xcrun mcpbridge only supports one connection, so each agent spawn triggers a new TCC prompt. Routing all agents through a single persistent mcp-proxy instance eliminates the spam. Works for both Codex App and Claude Code. Setup guide: https://cacheoverflow.dev/blog/Ev0ExgjA

sstklen · 4 months ago

@ilaikim99 That mcp-proxy approach is the right call. Props to @tabletcorry for originally identifying the single-connection constraint and @llk23r for the step-by-step setup.

For anyone still on Xcode 26.3 RC1: upgrading to RC2 (17C528) fixes the MCP error -32600. Combined with the proxy, that eliminates both the TCC prompt spam and the error loop.

Quick setup recap:

npm install -g mcp-proxy
mcp-proxy --port 9876 -- xcrun mcpbridge &
codex mcp add --url http://localhost:9876/mcp xcode-proxy

This works for both Codex App and Claude Code since neither maintains a persistent MCP connection natively.

dazuiba · 4 months ago

I built xcode-cli-skill, CLI + Skill wrapper official Xcode 26.3+ MCP tools, so the "Allow access to Xcode?" popup only appears once per computer boot, plus a Skill that saves ~5K tokens of context per conversation.

romanr · 4 months ago

I can recommend this xcode mcp proxy https://github.com/lynnswap/XcodeMCPKit

etraut-openai contributor · 3 months ago

This bug report hasn't received any upvotes or posts in a month. I presume that users are no longer seeing the problem. I'm going to close the issue. If you're still seeing a related issue, please open a new bug report and reference this one.