Skip to content

[Bug]: Error with Claude Code #69

@tareksabry1337

Description

@tareksabry1337

Bug Description

When telling Claude Code to build and run the project it shows the following output which is unexpected.

⏺ I can see the project has several schemes including "[REDACTED]" and "[REDACTED]". Let me build the development scheme for iOS simulator:

⏺ XcodeBuildMCP:build_sim_name_proj (MCP)(projectPath: "/Users/tareksabry/Desktop/Projects/[REDACTED].xcodeproj", scheme: "[REDACTED]
Development", simulatorName: "iPhone 16")
⎿  Error: ℹ️ xcodemake is enabled and available, using it for incremental builds.

⏺ Let me try building with xcodebuild instead by setting the preferXcodebuild flag:

⏺ XcodeBuildMCP:build_sim_name_proj (MCP)(projectPath: "/Users/tareksabry/Desktop/Projects/[REDACTED].xcodeproj", scheme: "[REDACTED]
Development", simulatorName: "iPhone 16", preferXcodebuild: true)

Debug Output

Running XcodeBuildMCP Diagnostic Tool (v1.10.4)...
Collecting system information and checking dependencies...

[2025-06-23T20:13:13.469Z] [INFO] [Diagnostic]: Running diagnostic tool
[2025-06-23T20:13:13.763Z] [INFO] Executing command: which xcodemake
[2025-06-23T20:13:13.778Z] [DEBUG] xcodemake found in PATH

XcodeBuildMCP Diagnostic Report

Generated: 2025-06-23T20:13:13.778Z
Server Version: 1.10.4

System Information

  • platform: darwin
  • release: 24.1.0
  • arch: arm64
  • cpus: 10 x Apple M1 Pro
  • memory: 16 GB
  • hostname: MacBookPro
  • username: tareksabry
  • homedir: /Users/tareksabry
  • tmpdir: /var/folders/bg/85cb5kyn1ts30c3vw2y2ndn40000gn/T

Node.js Information

  • version: v20.18.1
  • execPath: /opt/homebrew/Cellar/node@20/20.18.1/bin/node
  • pid: 93603
  • ppid: 84320
  • platform: darwin
  • arch: arm64
  • cwd: /Users/tareksabry/Desktop/Projects/[REDACTED]
  • argv: /opt/homebrew/Cellar/node@20/20.18.1/bin/node /Users/tareksabry/.local/share/mise/installs/npm-xcodebuildmcp/1.10.4/bin/xcodebuildmcp-diagnostic

Xcode Information

  • version: Xcode 16.2 - Build version 16C5032a
  • path: /Applications/Xcode-16.2.0.app/Contents/Developer
  • selectedXcode: /Applications/Xcode-16.2.0.app/Contents/Developer/usr/bin/xcodebuild
  • xcrunVersion: xcrun version 70.

Dependencies

  • axe: ❌ Not found
  • xcodemake: ✅ Available (version info not available)
  • mise: ✅ 2025.5.1 macos-arm64 (2025-05-05)

Environment Variables

  • XCODEBUILDMCP_DEBUG: true
  • INCREMENTAL_BUILDS_ENABLED: 1
  • DEVELOPER_DIR: (not set)
  • HOME: /Users/tareksabry
  • USER: tareksabry
  • TMPDIR: /var/folders/bg/85cb5kyn1ts30c3vw2y2ndn40000gn/T/
  • NODE_ENV: (not set)
  • SENTRY_DISABLED: (not set)

PATH

/Users/tareksabry/.local/share/mise/installs/npm-xcodebuildmcp/1.10.4/bin
/Users/tareksabry/.sdkman/candidates/java/current/bin
/opt/homebrew/opt/openjdk@17/bin
/Users/tareksabry/.codeium/windsurf/bin
/Users/tareksabry/.rbenv/shims
/Users/tareksabry/.rbenv/bin
/opt/homebrew/opt/node@14/bin
/opt/homebrew/bin
/opt/homebrew/sbin
/usr/local/bin
/System/Cryptexes/App/usr/bin
/usr/bin
/bin
/usr/sbin
/sbin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/Library/Apple/usr/bin
/Users/tareksabry/Library/Application Support/JetBrains/Toolbox/scripts
/Users/tareksabry/.local/bin
/Users/tareksabry/.local/bin

Feature Status

UI Automation (axe)

  • Available: ✅ Yes
  • UI Automation Supported: ✅ Yes

Incremental Builds

  • Enabled: ✅ Yes
  • Available: ✅ Yes
  • Makefile exists: ✅ Yes

Mise Integration

  • Running under mise: ❌ No
  • Mise available: ✅ Yes

Tool Groups Status

  • All tool groups are enabled (selective mode is disabled).

Individually Enabled Tools

  • All tools are enabled (selective mode is disabled).

Tool Availability Summary

  • Build Tools: ✅ Available
  • UI Automation Tools: ✅ Available
  • Incremental Build Support: ✅ Available & Enabled

Sentry

  • Sentry enabled: ✅ Yes

Troubleshooting Tips

  • If UI automation tools are not available, install axe: brew tap cameroncooke/axe && brew install axe
  • If incremental build support is not available, you can download the tool from https://github.com/cameroncooke/xcodemake. Make sure it's executable and available in your PATH
  • To enable xcodemake, set environment variable: export INCREMENTAL_BUILDS_ENABLED=1
  • For mise integration, follow instructions in the README.md file
  • To enable specific tool groups, set the appropriate environment variables (e.g., export XCODEBUILDMCP_GROUP_DISCOVERY=true)
  • If you're having issues with environment variables, make sure to use the correct prefix:
    • Use XCODEBUILDMCP_GROUP_NAME=true to enable a tool group
    • Use XCODEBUILDMCP_TOOL_NAME=true to enable an individual tool
    • Common mistake: Using XCODEBUILDMCP_BUILD_IOS_SIM=true instead of XCODEBUILDMCP_GROUP_BUILD_IOS_SIM=true

Diagnostic complete. Please include this output when reporting issues.

Editor/Client

Claude Code

MCP Server Version

1.14.1

LLM

Claude 4 Sonnet / Oppus

MCP Configuration

{
  "mcpServers": {
    "XcodeBuildMCP": {
      "command": "mise",
      "args": [
        "x",
        "npm:xcodebuildmcp@1.10.4",
        "--",
        "xcodebuildmcp"
      ],
      "env": {
        "INCREMENTAL_BUILDS_ENABLED": "true"
      }
    }
  }
}

Steps to Reproduce

  1. Ask AI agent to build the project using XcodeBuildMCP in ClaudeCode
  2. It assumes there's an error and switches over to XcodeBuild

Expected Behavior

  1. It should build successfully especially since it works fine in Windsurf

Actual Behavior

  1. It attempts to use XcodeBuild

Error Messages

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions