Preface

If you are writing Swift on macOS using DeepSeek Harness (dsh), you have likely encountered this awkward situation: The model can write SwiftUI code, but it cannot touch the Xcode project itself—creating new targets, changing build settings, switching schemes and run destinations, reading diagnostic information, editing String Catalogs, these tasks all have to be done manually in Xcode.

The idea behind dsh is “everything is a plugin”. Since Xcode 26, Apple has officially provided mcpbridge, allowing external tools to directly manipulate open projects. This article introduces jihongboo/dsh-apple-mode, an agent preset + installer that packs this capability into a DSH session.

What is it

The positioning of dsh-apple-mode is: DeepSeek Harness’s Xcode AI integration mode—an agent preset plus installation script, providing a complete Xcode AI toolstack for the selected DSH session. The repository is maintained by jihongboo and is licensed under MIT.

It maps three layers of capability to three mechanisms of DSH:

Layer Capability DSH Mechanism
Execution 26 mcp__xcode__* tools dsh-mcp-client (mounted inside preset)
Knowledge 10 Apple platform skills ~/.agents/skills/ (global, on-demand loading)
Behavior Xcode Intelligence style persona agent preset (this repo)

Core Features

26 Xcode MCP Tools

Provided via Apple’s official mcpbridge, all under the mcp__xcode__* namespace, grouped by function:

Group Tools
Project I/O XcodeRead XcodeWrite XcodeUpdate XcodeMV XcodeRM XcodeMakeDir
Search XcodeGlob XcodeGrep XcodeLS
Targets & settings XcodeNewTarget XcodeListTemplates XcodeListTargets UpdateTargetBuildSetting UpdateFileCompilerFlags
Scheme / destination / test plans XcodeListSchemes XcodeSwitchScheme XcodeListRunDestinations XcodeSwitchRunDestination XcodeListTestPlans XcodeSwitchTestPlan
Diagnostics XcodeListNavigatorIssues XcodeRefreshCodeIssuesInFile
Localization StringCatalogRead StringCatalogEdit
Windows XcodeListWindows XcodeGetCurrentFile

Xcode Intelligence style persona

The persona built into the preset is adapted from the IDEIntelligenceChat prompt template, featuring Swift-first, tool-assisted, and distinguishing between “Explain” and “Modify” request types.

10 Apple platform skills

Installed by running xcrun agent skills export on your local Xcode, then merged into ~/.agents/skills/ (DSH’s skill root directory, hot-loaded):

swiftui-specialist · swiftui-whats-new-27 · app-intents-specialist · app-intents-whats-new-27 · audit-xcode-security-settings · adopt-c-bounds-safety · uikit-app-modernization · modernize-tests · device-interaction · building-document-based-swiftui-applications

Skills themselves are Apple-authored content generated locally rather than included in the repository, to avoid redistributing Apple content—the repository only contains the author’s own code, configuration, and documentation.

Why preset instead of global mounting

If you mount the MCP server globally to a profile, about 26 large tool schemas (approx 6k+ tokens/request) will be injected into every session, even if that session never touches Xcode. Mounting inside a preset means this overhead only occurs in sessions that select Apple Mode; other sessions remain lightweight.

Installation and Activation

Prerequisites

  • macOS
  • DeepSeek Harness (developer preview, automation suggests fixing the exact dsh version): npx @deepseek-ai/dsh web
  • Xcode 26+ (includes mcpbridge and xcrun agent skills export)

Main Installation Path

git clone https://github.com/jihongboo/dsh-apple-mode.git
cd dsh-apple-mode
./install.sh

install.sh does three things:

  1. Scans Xcode installations in /Applications that provide mcpbridge (only Xcode 26+), with interactive selection if multiple versions are present;
  2. Installs the apple agent preset to ~/.dsh/.agent-presets/apple/ (existing copies are backed up first);
  3. Generates 10 skills locally and merges them into ~/.agents/skills/.

Selecting Xcode

When multiple Xcodes are installed on the machine (e.g., Xcode.app and Xcode-beta.app), the installer will list candidates:

Found Xcode installs providing mcpbridge:
  1) /Applications/Xcode-beta.app/Contents/Developer  (xcode-select default)
  2) /Applications/Xcode.app/Contents/Developer
Choose (1-2, default 1):
  • The default uses the version selected by xcode-select; the preset writes command: xcrun mcpbridge, following future xcode-select changes;
  • Selecting another version will bake the absolute path of the corresponding mcpbridge into the preset.

Non-interactive installation and candidate list:

./install.sh --xcode /Applications/Xcode.app
./install.sh --list-xcodes

If you want to switch at runtime without reinstalling, use:

./install.sh --runtime-selectable

Then set the environment variable when starting dsh to switch versions. The resolution order is DSH_XCODE_DEVELOPER_DIRxcrun → the latest /Applications/Xcode*.app:

DSH_XCODE_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer npx @deepseek-ai/dsh web

To drive a specific running Xcode instance, add this to the preset’s mcp-xcode line:

env: { MCP_XCODE_PID: '<pid>' }

Activation

  1. Restart dsh or create a new session—the preset can only be selected when creating a blank session.
  2. Select the Apple Mode preset when creating the session.
  3. Before using mcp__xcode__* tools, note two points: Xcode must be running, and the target project/workspace must be open. When connecting for the first time, Xcode will pop up an MCP access dialog; click Allow, otherwise tool calls will be rejected.

Typical Usage

Global bundle (alternative path): If you want the MCP server to enter every session of a profile, you can install the cordis.patch.yml global bundle via the plugin method:

dsh plugin --profile web add "github:jihongboo/dsh-apple-mode"

Note that you must choose one of the two installation paths: both register serverName: xcode, and duplicate server names will cause the later-loaded instance to fail on load. The cost of a global bundle is that every session must bear the overhead of approx 6k+ tokens of schema injection.

Daily usage: Within the session, let the model directly manipulate the open project, such as reading/writing files, creating new targets, updating build settings, switching schemes and run destinations, refreshing code diagnostics, and editing String Catalogs. Building, running, and testing still take place in the terminal (xcodebuild, can pipe to xcsift for structured output); the MCP toolset covers “in-project operations” like project surgery, build settings, diagnostics, run destinations, and localization.

Subsequent adjustments:

  • Switching Xcode: Run ./install.sh again (re-select), or modify the mcp-xcode line in ~/.dsh/.agent-presets/apple/agent.cordis.yml, or use runtime environment variables;
  • Modifying persona: Edit the persona line in the same file;
  • After Xcode update: Run ./install.sh again to sync skills (skills will be replaced, and the preset will be backed up first).

Applicable Scenarios and Notes

Suitable for people doing Apple platform development on macOS with DSH and who want the agent to directly manipulate Xcode projects. Since tool calls depend on Xcode being running and the project being open, it is not suitable for headless or Xcode-independent scenarios.

A few notes:

  • dsh is in developer preview; automation workflows suggest fixing the exact dsh version;
  • Choose between mounting the preset and the global bundle; do not install both;
  • The preset can only be selected when creating a session; old sessions need to be restarted or new ones created;
  • Regarding security, the plugin runs with the permissions of the current dsh process; it is recommended to check the repository source code and license before installing (this repository is MIT).

Closing

What makes dsh-apple-mode worth watching is its trade-off regarding mounting costs: the three layers of capability—tools, skills, and persona—are consolidated into a preset, so only the selected session pays the price, while avoiding the issue of redistributing Apple content via xcrun agent skills export. If you use both dsh and Xcode 26+, you can try it directly.

  • Plugin directory page: https://www.skillhub.cn/plugins/jihongboo/dsh-apple-mode
  • GitHub repository: https://github.com/jihongboo/dsh-apple-mode

(The directory page is an independent site maintained by the community and has no affiliation with DeepSeek.)