Skip to content

[Bug]: Trying to figure out whats missing for the MCP reasoning #143

@adamhill

Description

@adamhill

Bug Description

Very consistantly build_sim fails in KiloCode both during normal agentic loops and specifically generating this repro.

The LLM sends this as the arguments: (Opus 4.5 and Sonnet 4.5)

{
  "projectPath": "/Users/adamhill/dev/apple/TheElectricSlideV3/sources/TheElectricSlide/TheElectricSlide.xcodeproj",
  "scheme": "TheElectricSlide",
  "simulatorName": "iPhone 16"
}

And gets this error:

Error
Error executing MCP tool:
MCP error -32001: Request timed out

This is with me directly telling it "run the build_sim tool in Xcodebuild MCP"

Then the LLM immediately tries running xcodebuild from the command line and it succeeds. I have seen this in various SOTA models, Opus 4.5, Sonnet 4.5 and GPT 5.1.

If I get the error during an agentic loop ithe call is the same, but there is no full path, just the .xcodeproj but the error is the same

Naiively I am thinking the full path is the culprit. I was curious, since you see errors more than me from XCB-MCP. All the other tools perform very well - installing, running, taping, screenshots.

So why this specific one fails is a bit puzzling.

Kilo is OSS, so I could make a PR to fix this if our prompt needs the CWD or some other piece of information. Just curious how to approach debugging this and have you seen it in other agents.

Thanks for this awesome MCP!. The dynamic discovery abilities is inspiring me to figure out how to add Sampling to Kilo's MCP support.

Debug Output

XcodeBuildMCP Doctor

Generated: 2025-11-26T23:48:56.883Z
Server Version: 1.14.1

System Information

  • platform: darwin
  • release: 25.1.0
  • arch: arm64
  • cpus: 16 x Apple M3 Max
  • memory: 128 GB
  • hostname: Thorough-But-Unreliable.local
  • username: adamhill
  • homedir: /Users/adamhill
  • tmpdir: /tmp

Node.js Information

  • version: v25.2.1
  • execPath: /opt/homebrew/Cellar/node/25.2.1/bin/node
  • pid: 80960
  • ppid: 80918
  • platform: darwin
  • arch: arm64
  • cwd: /Users/adamhill/dev/apple/TheElectricSlideV3/sources/TheElectricSlide
  • argv: /opt/homebrew/Cellar/node/25.2.1/bin/node /Users/adamhill/.npm/_npx/99336612077b7094/node_modules/.bin/xcodebuildmcp

Xcode Information

  • version: Xcode 26.2 - Build version 17C5038g
  • path: /Applications/Xcode-26.2.0-beta.2.app/Contents/Developer
  • selectedXcode: /Applications/Xcode-26.2.0-beta.2.app/Contents/Developer/usr/bin/xcodebuild
  • xcrunVersion: xcrun version 72.

Dependencies

  • axe: ✅ Bundled
  • xcodemake: ❌ Not found
  • mise: ✅ 2025.11.8 macos-arm64 (2025-11-26)

Environment Variables

  • INCREMENTAL_BUILDS_ENABLED: (not set)
  • DEVELOPER_DIR: (not set)
  • HOME: /Users/adamhill
  • USER: adamhill
  • TMPDIR: (not set)
  • NODE_ENV: (not set)
  • SENTRY_DISABLED: (not set)
  • XCODEBUILDMCP_DYNAMIC_TOOLS: false
  • XCODEBUILDMCP_SILENCE_LOGS: true

PATH

/Users/adamhill/.npm/_npx/99336612077b7094/node_modules/.bin
/Users/adamhill/dev/apple/TheElectricSlideV3/sources/TheElectricSlide/node_modules/.bin
/Users/adamhill/dev/apple/TheElectricSlideV3/sources/node_modules/.bin
/Users/adamhill/dev/apple/TheElectricSlideV3/node_modules/.bin
/Users/adamhill/dev/apple/node_modules/.bin
/Users/adamhill/dev/node_modules/.bin
/Users/adamhill/node_modules/.bin
/Users/node_modules/.bin
/node_modules/.bin
/opt/homebrew/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin
/Users/adamhill/.antigravity/antigravity/bin
/Users/adamhill/.bun/bin
/Users/adamhill/.sdkman/candidates/java/current/bin
/Users/adamhill/.pixi/bin
/Users/adamhill/.console-ninja/.bin
/Users/adamhill/Library/Android/sdk/emulator
/Users/adamhill/Library/Android/sdk/tools
/Users/adamhill/Library/pnpm
/Users/adamhill/.local/bin
/opt/homebrew/opt/[email protected]/libexec/bin
/opt/homebrew/opt/[email protected]/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
/opt/pmk/env/global/bin
/opt/X11/bin
//Applications/Topaz Photo AI.app/Contents/Resources/bin
/Library/Apple/usr/bin
/Library/TeX/texbin
/usr/local/share/dotnet
~/.dotnet/tools
/Library/Frameworks/Mono.framework/Versions/Current/Commands
/Users/adamhill/.cargo/bin
/Users/adamhill/Library/Application Support/JetBrains/Toolbox/scripts
/Users/adamhill/.cache/lm-studio/bin
/Users/adamhill/.dotnet/tools

Feature Status

UI Automation (axe)

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

Incremental Builds

  • Enabled: ❌ No
  • Available: ❌ No
  • Makefile exists: ❌ No

Mise Integration

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

Available Tools

  • Total Plugins: 83
  • Plugin Directories: 12
  • device: 14 tools
  • discovery: 1 tools
  • doctor: 1 tools
  • logging: 4 tools
  • macos: 11 tools
  • project-discovery: 5 tools
  • project-scaffolding: 2 tools
  • simulator: 19 tools
  • simulator-management: 8 tools
  • swift-package: 6 tools
  • ui-testing: 11 tools
  • utilities: 1 tools

Runtime Tool Registration

  • Mode: static
  • Enabled Workflows: 12
  • Registered Tools: 61
  • Workflows: device, discovery, doctor, logging, macos, project-discovery, project-scaffolding, simulator, simulator-management, swift-package, ui-testing, utilities

Tool Availability Summary

  • Build Tools: ✅ Available
  • UI Automation Tools: ✅ Available
  • Incremental Build Support: ❌ Not available

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

Editor/Client

Kilo 1.124.0

MCP Server Version

1.14.1

LLM

Opus 4.5, Sonnet 4.5, GPT 5.1

MCP Configuration

"XcodeBuildMCP": {
            "command": "npx",
            "args": [
                "-y",
                "xcodebuildmcp@latest"
            ],
            "env": {
                "XCODEBUILDMCP_DYNAMIC_TOOLS": "false"
            },
            "alwaysAllow": [
                "build_device",
                "clean",
                "discover_projs",
                "get_app_bundle_id",
                "get_device_app_path",
                "discover_tools",
                "build_run_macos",
                "build_sim",
                "install_app_sim",
                "launch_app_logs_sim",
                "list_schemes",
                "screenshot",
                "list_sims",
                "build_run_sim",
                "open_sim",
                "describe_ui",
                "build_macos",
                "tap",
                "get_sim_app_path",
                "launch_app_sim",
                "gesture",
                "swipe"
            ]
        }

Steps to Reproduce

  1. Ask the LLM to "Run the build_sim tool from XcodeBuildMCP to build the project for the simulator. Report the build result."

Expected Behavior

The call not to fail.

Actual Behavior

Call fails with the above error.

Error
Error executing MCP tool:
MCP error -32001: Request timed out

Error Messages

Error
Error executing MCP tool:
MCP error -32001: Request timed out

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions