XcodeMCP MCP Server

Model Context Protocol server for Xcode build automation and log parsing

Local serverstdioTypeScript

What is the XcodeMCP MCP server?

Model Context Protocol server for Xcode build automation and log parsing. The xcodemcp mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 14 defined tools rather than through you.

What it actually does

Model Context Protocol (MCP) server that controls Xcode directly through JavaScript for Automation (JXA). Available as both an MCP server and a standalone CLI.

  • Controls Xcode directly through JavaScript for Automation (not xcodebuild CLI)
  • Opens projects, builds, runs, tests, and debugs from within Xcode
  • Parses build logs with precise error locations using XCLogParser
  • Provides comprehensive environment validation and health checks
  • Supports graceful degradation when optional dependencies are missing
  • NEW — Includes a full-featured CLI with 100% MCP server feature parity

Its toolset

Everything the assistant can do here goes through one of these:

  • xcode_open_project — Open projects and workspaces
  • xcode_get_workspace_info — Get workspace status and details
  • xcode_get_projects — List projects in workspace
  • xcode_open_file — Open files with optional line number
  • xcode_build — Build with detailed error parsing
  • xcode_clean — Clean build artifacts
  • xcode_test — Run tests with optional arguments
  • xcode_build_and_run — Build and run the active scheme
  • xcode_debug — Start debugging session
  • xcode_stop — Stop current operation
  • xcode_get_schemes — List available schemes
  • xcode_set_active_scheme — Switch active scheme

Configuration

You will need 5 environment variables: XCODE_MCP_PREFERRED_SCHEME, XCODE_MCP_PREFERRED_XCODEPROJ, LOG_LEVEL, XCODEMCP_LOG_FILE, XCODEMCP_CONSOLE_LOGGING. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • macOS with Xcode installed - Node.js 18+ - XCLogParser (recommended): brew install xclogparser

Adding it to your client

The server ships on npm as xcodemcp, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

When to reach for it

Among the monitoring and observability options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. XcodeMCP's toolset — xcode_open_project, xcode_get_workspace_info, xcode_get_projects and 11 more — is a fair guide to whether it matches your workflow. It is maintained by lapfelix; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch XcodeMCP.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the xcodemcp mcp server does with a few real requests.

Available tools

ToolWhat it does
xcode_open_projectOpen projects and workspaces
xcode_get_workspace_infoGet workspace status and details
xcode_get_projectsList projects in workspace
xcode_open_fileOpen files with optional line number
xcode_buildBuild with detailed error parsing
xcode_cleanClean build artifacts
xcode_testRun tests with optional arguments
xcode_build_and_runBuild and run the active scheme
xcode_debugStart debugging session
xcode_stopStop current operation
xcode_get_schemesList available schemes
xcode_set_active_schemeSwitch active scheme
xcode_get_run_destinationsList simulators and devices
xcresult_browseBrowse test results and analyze failures

How to install the XcodeMCP MCP server

{
  "mcpServers": {
    "xcodemcp": {
      "command": "npx",
      "args": ["-y", "xcodemcp@latest"],
      "env": {
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • macOS with Xcode installed - Node.js 18+ - XCLogParser (recommended): brew install xclogparser
VariableDescriptionRequired
XCODE_MCP_PREFERRED_SCHEMEConfiguration value read at startup.Optional
XCODE_MCP_PREFERRED_XCODEPROJConfiguration value read at startup.Optional
LOG_LEVELConfiguration value read at startup.Optional
XCODEMCP_LOG_FILEConfiguration value read at startup.Optional
XCODEMCP_CONSOLE_LOGGINGConfiguration value read at startup.Optional

Example prompts to try

  • Use XcodeMCP to xcode open project.
  • Use XcodeMCP to xcode get workspace info.
  • Use XcodeMCP to xcode get projects.

Frequently asked questions

It connects XcodeMCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (xcode_open_project, xcode_get_workspace_info, xcode_get_projects, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with XcodeMCP directly.