claude-xcode-agent
Use Claude Code as the coding agent inside Xcode 27, with your own API key or gateway. A small launcher script bridges Xcode's agent protocol to Claude Code without pulling in your global Claude settings.
View on GitHub ↗- Stars
- ★ 82
- Last commit
- 9 Nov 2026
- Maintenance
- Active
- Licence
- MIT
- Category
- Xcode & IDE
- GitHub
- yusuke-114/
claude-xcode-agent
Overview
claude-xcode-agent is a personal project, not from Apple or Anthropic. Xcode 27 talks to coding agents over ACP, the Agent Client Protocol. An adapter, claude-agent-acp, bridges ACP to Claude Code. The README says that, used on its own, the adapter has two problems: Xcode starts the agent from the GUI, so there is no shell environment to hold a key or gateway URL, and the adapter always loads your global ~/.claude/settings.json into Xcode too.
claude-xcode-agent fixes both with one script, claude-acp.sh. The key, gateway, model and extra MCP servers come from a config.json file next to the script, and your global Claude settings are not read unless you opt in. The script runs in two roles: once per agent launch it loads the config and starts the adapter, and once per session it starts the real claude with the right settings and MCP servers. Both steps hand over the process, so no wrapper stays running.
claude-xcode-agent is licensed under the MIT licence.
Features
- Point Xcode at the Anthropic API with api_key, or at a gateway with base_url plus auth_token (Bearer auth) or api_key (x-api-key auth).
- Set a default model with model, using a full ID or an alias such as opus, and map aliases to your gateway's model names through env.
- Add your own MCP servers with mcp_servers, in the same format as Claude Code's mcpServers. They sit alongside the servers Xcode provides.
- Keeps ~/.claude/settings.json out of Xcode by default (setting_sources defaults to project,local). Set user,project,local to load it.
- Pass any other environment variables, such as HTTPS_PROXY, through env, since Xcode doesn't start the agent with your shell's environment.
- Without a config.json, Claude Code uses its own login.
- Logs go to .runtime/agent.log, including which MCP servers each session loaded.
Requirements
- Xcode 27.
- Node.js and Claude Code. The setup script installs them if missing, preferring Homebrew.
- An Anthropic API key, a gateway, or an existing Claude Code login.
Install
Run git clone https://github.com/yusuke-114/claude-xcode-agent.git, then cd claude-xcode-agent.
Run ./setup.sh. It installs Node and Claude Code if needed, installs the ACP adapter into .runtime/ in that folder (not globally), runs a handshake test and prints the path for Xcode.
Optional: run cp config.example.json config.json and chmod 600 config.json, then fill in your key, gateway, model or MCP servers.
In Xcode, open Settings > Intelligence > Add an Agent and set Executable to the printed claude-acp.sh path.
The script rereads config.json each time Xcode launches the agent. Restart Xcode if a change doesn't show up. To remove the adapter, delete the .runtime folder.
Example
To route Xcode's agent through your company gateway, create config.json with base_url set to the gateway root (without /v1/messages) and auth_token set to your token. Add Claude as an agent in Xcode's Intelligence settings, then start a new agent session in Xcode. Use absolute paths for any local MCP servers, because Xcode doesn't start the agent with your shell's PATH.
Works with
Listed in
- github.com/yusuke-114/claude-xcode-agent
- github.com/yusuke-114/claude-xcode-agent/blob/main/README.md
Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.
More in this category
Copilot for Xcode (intitni)
Open-source Xcode extension that brings GitHub Copilot and chat-model features into Xcode.
Copilot for Xcode (GitHub)
GitHub's official Copilot extension for Xcode, with completions, agent mode and code review.
SweetPad
A command-line tool that builds, runs, debugs and tests Apple platform apps from the terminal without opening Xcode. Its short output and JSON mode suit coding agents, and it comes with agent skills that teach your agent to use it.
SwiftAgents