MCP Directory

How to add Xcode MCP Server to Windsurf

Comprehensive Xcode integration for AI assistants: projects, builds, tests, simulators, SPM and CocoaPods. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 380 · stdio · no auth

Windsurf config for Xcode MCP Server

git clone https://github.com/r-huijts/xcode-mcp-server.git && cd xcode-mcp-server && npm install && npm run build
{
  "mcpServers": {
    "xcode-mcp-server": {
      "command": "node",
      "args": [
        "/path/to/xcode-mcp-server/dist/index.js"
      ]
    }
  }
}

Setup steps

  1. 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the Xcode MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5Xcode MCP Server's tools become available to Cascade.

Before you start

  • macOS with Xcode 14.0 or higher installed
  • Node.js 16 or higher
  • npm or yarn
  • Swift 5.5+ for Swift Package Manager features
  • CocoaPods (optional, for CocoaPods integration)
  • PROJECTS_BASE_DIR set to your projects base directory

What Xcode MCP Server can do in Windsurf

create_xcode_project

Create a new Xcode project from a template (e.g. ios-app, macOS, watchOS, tvOS) with options for name, output directory, organization name/identifier, language, tests, and setting it active.

add_swift_package

Add a Swift Package Manager dependency to the active project by URL with a version requirement (e.g. 'from: 5.0.0').

read_file

Read a file's contents with a specified encoding (e.g. utf-8); supports binary files via base64.

write_file

Write content to a file, optionally creating it if missing.

search_in_files

Search for text content within files in a directory using a file pattern and optional regex matching.

build_project

Build the active project with customizable options such as scheme and configuration (e.g. Debug/Release).

test_project

Run tests for a scheme with detailed failure reporting, optionally specifying a test plan.

Security

All file operations are restricted to allowed directories via path validation (PROJECTS_BASE_DIR plus optional ALLOWED_PATHS). Input parameters are validated with Zod schemas, and external processes are executed with error handling. The server can read, write, and execute build/Xcode commands within the configured directories, so scope PROJECTS_BASE_DIR and ALLOWED_PATHS carefully.

Xcode MCP Server + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Xcode MCP Server config there under the "mcpServers" key and restart the client.

Is Xcode MCP Server safe to use with Windsurf?

All file operations are restricted to allowed directories via path validation (PROJECTS_BASE_DIR plus optional ALLOWED_PATHS). Input parameters are validated with Zod schemas, and external processes are executed with error handling. The server can read, write, and execute build/Xcode commands within the configured directories, so scope PROJECTS_BASE_DIR and ALLOWED_PATHS carefully.

How do I connect it to Claude Desktop?

Edit ~/Library/Application Support/Claude/claude_desktop_config.json and add an mcpServers entry named 'xcode' with command 'node' and args pointing to the built dist/index.js. An included setup.sh script can configure this automatically.

Is there a published npm package?

No. You install by cloning the repository, running npm install, and building with npm run build; then point the config at the compiled dist/index.js.

What platforms are supported?

macOS only, with Xcode 14.0+ installed. It requires Node.js 16+, and Swift 5.5+ for Swift Package Manager features (CocoaPods optional).

View repo Full Xcode MCP Server page