npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yankeguo/dsh-xcode-mcp

v0.1.0

Published

Mount the Xcode MCP server into DeepSeek Harness sessions whose working directory is inside an Xcode project.

Readme

dsh-xcode-mcp

A minimal DeepSeek Harness (DSH) bundle that mounts the Xcode MCP server and Xcode's official skills only in Sessions that work inside an Xcode project. Pure TypeScript — no Python, no uv, no extra runtime dependencies beyond a YAML parser.

DSH has no workspace-level MCP configuration: a profile-level mcp-client entry starts one server with a fixed working directory. This bundle closes that gap natively. It watches the live Agent registry, reads each Agent's working directory, finds the nearest ancestor containing a *.xcodeproj directory, and loads one mcp-client instance through that Agent's own Context, starting xcrun mcpbridge with the project root as its working directory. The resulting mcp__xcode__* tools are visible only to that Agent, and the child process is disconnected when the Agent is disposed. The same Agents also receive Xcode's official skills (SwiftUI, App Intents, device interaction, xctrace, …), exported from the locally installed Xcode at activation.

Behavior

  • Per Agent, at creation. Existing Agents are backfilled when the plugin activates (concurrently); every later agent/created event is handled. Subagents get their own Agent and therefore their own MCP process. Creating an Agent waits for the whole attach task, not only the MCP handshake: discovery has no built-in timeout, the bridge probe is bounded by 10s, and the handshake is bounded by startupTimeoutMs (default 30s). Tools therefore normally exist before the first turn, but a hung project filesystem can delay creation; only the handshake has a watchdog.
  • Discovery. Starting at the Session's current working directory, walk upward and return the first directory that contains a directory named *.xcodeproj (symlinked project directories count). The walk checks the .git root itself and then stops; it also stops at the filesystem root. If several projects share one directory, the lexicographically first name is used.
  • Embedded Xcode skills. Once per activation the plugin runs xcrun agent skills export --replace-existing into its cache directory and registers a skill provider through each Xcode Agent's own Context. The skills appear only in Xcode-workspace Sessions, match the Xcode selected by the export's xcrun/DEVELOPER_DIR, and refresh without a restart when a fresh export lands. See Embedded Xcode skills.
  • No project, no mount. At creation time, Sessions outside an Xcode project get no Xcode tools, no Xcode skills, and no placeholder server. (A Session moved out of its project later keeps its creation-time mount; see below.)
  • Bridge preflight. With the default xcrun mcpbridge launcher, the plugin first runs xcrun --find mcpbridge (bounded by 10s). When the bridge is missing (no Xcode 26+, or xcode-select points at the Command Line Tools), the mount and the skills export are skipped with a clear diagnostic instead of MCP connection-failure noise. Custom command/args are trusted as configured and validated by the MCP client itself. When command itself is an xcrun path, the skills export reuses that exact executable; a different custom launcher falls back to the system xcrun for skills. config.env (for example DEVELOPER_DIR) is applied to both, but only an xcrun launcher guarantees that the MCP server and the skills export use the same Xcode.
  • First-use approval. Xcode's MCP server does not bind a project from the process working directory alone. In each new Session, the first Xcode tool call must be XcodeOpenWorkspace with the project's .xcodeproj (or .xcworkspace) path; that call is what makes Xcode show its approval prompt. Until approval is granted, other Xcode tools return This agent isn't approved to use Xcode's tools yet.
  • Bounded writes. The plugin has no manifest file and no Web UI; its only filesystem writes are the skills export into its own cache directory (see below).
  • Clean teardown. Disposing the Agent or disabling the bundle disposes the corresponding mcp-client fiber and skill provider, which closes the stdio transport and removes the skills. The MCP handshake and the skills export are abort-aware, including during the initial backfill; discovery and the bounded bridge probe are not signal-aware, so unloading may still wait for those phases (the probe at most 10s).
  • Failure isolation. A missing working directory, failed probe, failed skills export, or MCP startup failure is logged and never fails Agent creation — including when cleaning up a failed mount itself fails. An unreadable project directory is treated as project-less and the upward walk continues (fail-soft, no diagnostic). A failed export leaves the cache usable: bundles it did not replace remain available.
  • Creation-time decision. Discovery and the mount run once when the Agent is created; a transient failure is not retried for that Agent (recreate the Session or re-enable the bundle). Moving an existing Session to another directory (workingDirectory.set) does not re-evaluate the mount in this version: the previous project's mcp__xcode__* tools and skills stay attached to that Agent, even if the new directory is outside an Xcode project, until the Agent is recreated.

Defaults

| Field | Value | | --- | --- | | serverName | xcode | | command | xcrun | | args | ["mcpbridge"] | | env | {} | | startupTimeoutMs | 30000 (integer milliseconds, 1–2147483647) | | skills | true |

xcrun ships with macOS at /usr/bin/xcrun; mcpbridge requires Xcode 26 or newer. Every field is overridable through the bundle row's config in the profile patch:

- id: xcode-mcp-autoload
  name: '@yankeguo/dsh-xcode-mcp'
  config:
    serverName: xcode
    command: xcrun
    args:
      - mcpbridge
    env: {}
    startupTimeoutMs: 30000
    skills: true

Embedded Xcode skills

Installing the bundle is enough — no manual skill installation. Xcode 26 ships official skills (for example swiftui-specialist, app-intents-specialist, device-interaction, xctrace, modernize-tests, audit-xcode-security-settings); the plugin exports them with xcrun agent skills export and serves them through DSH's skill registry:

  • Export timing. Once per plugin activation, asynchronously (it blocks neither activation nor Agent creation), into $DSH_HOME/cache/dsh-xcode-mcp/skills (default ~/.dsh/cache/dsh-xcode-mcp/skills), with --replace-existing; only a successful export replaces the cache. A failed or aborted export can leave a partially replaced cache, and a non-xcrun launcher exports through the system xcrun (see Bridge preflight). The export is bounded by 60s and skipped when mcpbridge is unavailable. The package ships no Apple content: everything is generated locally from your own Xcode.
  • Scope. The provider is registered through each Xcode Agent's own Context, so the skills are visible only to Sessions whose creation-time directory is inside an Xcode project — exactly like the mcp__xcode__* tools. Subagents get their own registration. Cold (not-yet-started) Session catalogs do not include them.
  • Precedence. Exported skills sit at rank 600 (BUNDLED_SKILL_RANK) and win same-name packaged contributions inside their own layer. In DSH's default composition the filesystem project/user roots live in the global layer while this provider is registered in the Agent's layer, so nearest-layer-wins makes the exported Xcode skill shadow same-name global project/user skills inside Xcode Sessions, regardless of rank. Set skills: false if a project-local skill must win.
  • Freshness. Skill bodies are re-read from the cache on every load; when a new export lands, registered providers are invalidated and the session catalog refreshes automatically.
  • Failure behavior. A failed or timed-out export logs one diagnostic and leaves the cache usable: bundles the export did not replace remain available. A malformed or unreadable skill bundle is skipped with a diagnostic without hiding its siblings; a profile without the skills service keeps the MCP feature fully working (the provider stays pending).
  • Opt out. Set skills: false in the bundle row's config.

Requirements

  • macOS with Xcode 26 or newer (xcrun --find mcpbridge must succeed), and Xcode running while the Session uses the tools.
  • DSH >=0.2.1-rc.1 <0.3.0 (API surface checked against tags dsh-v0.2.1-rc.1 and dsh-v0.2.2-rc.5; runtime baseline 0.2.2-rc.5). See docs/COMPATIBILITY.md for the exact compatibility matrix, including the rc.1 platform-field and Node caveats.

Installation

# CLI (desktop profile). 0.1.0 is the first stable release; after approval the
# default install (latest) resolves to it:
dsh plugin --profile desktop add @yankeguo/[email protected]
dsh plugin --profile desktop add @yankeguo/dsh-xcode-mcp

# Until 0.1.0 is approved, latest still points at the public 0.1.0-rc.3:
dsh plugin --profile desktop add @yankeguo/[email protected]

# or in the Web UI: Plugins → Add plugin → @yankeguo/dsh-xcode-mcp

Current registry state (2026-11-21): 0.1.0-rc.3 is public and latest and next both point at it; 0.0.0-stage and 0.1.0-rc.1 are earlier public versions, and 0.1.0-rc.2 was staged but rejected, so it was never published. 0.1.0 is the first stable release: its v0.1.0 tag workflow stages it with the latest dist-tag, and a maintainer approves it afterwards (CI only stages). After approval, unversioned installs resolve to 0.1.0.

For local development, install this checkout as a linked bundle through DSH's plugin manager (install_bundle pointed at this directory); run pnpm build first so lib/index.js exists, and rebuild after source changes.

Troubleshooting

  • No mcp__xcode__* tools in an Xcode project. Check the Host log for xcode-mcp-autoload diagnostics. cannot find mcpbridge means Xcode 26+ is not installed or xcode-select points elsewhere; fix with sudo xcode-select -s /Applications/Xcode.app. Discovery stops at the .git root: a project outside the Session's repository is intentionally not mounted.
  • Xcode authorization gate. Xcode does not authorize a client merely because it connected. In each new Session, call mcp__xcode__XcodeOpenWorkspace with the project path first; that call is what makes Xcode show the approval prompt. Grant it in Xcode. Until then other Xcode tools return This agent isn't approved to use Xcode's tools yet. If the prompt was dismissed, call XcodeOpenWorkspace again (or restart Xcode). Xcode must be running.
  • Tools time out. The initial connection plus tool sync is bounded by startupTimeoutMs (default 30s); individual tool calls use the MCP client's toolCallTimeoutMs (default 60s). Large builds may need a longer tool-call timeout in a custom mcp-client setup.

Verify

  1. Install the bundle into the profile and enable it.
  2. Open a new Session whose workspace (or an ancestor up to the .git root) contains a *.xcodeproj.
  3. Call mcp__xcode__XcodeOpenWorkspace with the project path and approve the prompt in Xcode, then call other mcp__xcode__* tools — for example XcodeListSchemes or BuildProject. The tools must be present only in that Session. The session's skill catalog must also list the exported Xcode skills (for example swiftui-specialist), loadable with the skill tool.
  4. Open a new Session in a workspace without an Xcode project. It must have no mcp__xcode__* tools and no Xcode skills.
  5. Disable the bundle or close the Agent and confirm the mcpbridge child process is gone and the Xcode skills left the catalog.

Development

pnpm install
pnpm verify   # typecheck + unit tests + build

The build emits lib/index.js, which the bundle manifest exports. Publishing uses the staged model (CI stages, a maintainer approves with 2FA, then the GitHub Release is created); see docs/PUBLISHING.md.

Layout

src/index.ts        project discovery, bridge probe, MCP mount, skills export/provider, Agent lifecycle
tests/              discovery, configuration, lifecycle, skills unit tests
cordis.patch.yml    bundle row
locale/en.json      Plugin Manager metadata (English)
locale/zh.json      Plugin Manager metadata (Chinese)
icon.svg            bundle icon
scripts/            staged-publish tooling (stage / promote / trust / checks)
.github/workflows/  verify.yml (CI checks) and publish.yml (staged publishing)
docs/               publishing guide, audit record, and release notes