{"_id":"@baochuquan/xcode-mcp","_rev":"3-a5c58e2a63b2669db0539d1ba47554b5","name":"@baochuquan/xcode-mcp","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@baochuquan/xcode-mcp","version":"0.1.0","keywords":["xcode","mcp","model-context-protocol","ios","swift","ai","llm"],"author":{"name":"baochuquan"},"license":"MIT","_id":"@baochuquan/xcode-mcp@0.1.0","maintainers":[{"name":"baochuquan","email":"baochuquan@163.com"}],"contributors":[{"url":"original xcode-mcp-server author","name":"R.Huijts"}],"bin":{"xcode-mcp":"dist/index.js"},"dist":{"shasum":"3ec27debeedd4648deaa340da089a71d933f2a28","tarball":"https://registry.npmjs.org/@baochuquan/xcode-mcp/-/xcode-mcp-0.1.0.tgz","fileCount":22,"integrity":"sha512-FCX6t23yu9XuCbWgrvDyHLzW3qlfe70415YjeJ4Uo4swvShuEPDGJWdipxgdLN9r9l92EBqedMeQqbpRVhfhjA==","signatures":[{"sig":"MEQCIB2cLIphmExULWcLplZMFQugtIXXEJOZQNPlYbB/dfBBAiA29SSEHT4McvMtFexq4owzw2Mh249n4cdmWyDjVHXI6g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":303788},"type":"module","engines":{"node":">=16.0.0"},"gitHead":"b03f2423a81fc56fb6960d87f8db999c429e6e6b","scripts":{"test":"node --test test/*.test.js","build":"node scripts/build.mjs","clean":"rm -rf dist","start":"node dist/index.js","prebuild":"npm run clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"baochuquan","email":"baochuquan@163.com"},"_npmVersion":"11.5.1","description":"MCP server for Xcode integration, installable via npx","directories":{},"_nodeVersion":"24.5.0","dependencies":{"zod":"3.24.2","glob":"^11.0.1","@modelcontextprotocol/sdk":"1.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^5.8.2","@types/glob":"^8.1.0","@types/node":"^20.17.28"},"_npmOperationalInternal":{"tmp":"tmp/xcode-mcp_0.1.0_1777003151410_0.6114756619569508","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@baochuquan/xcode-mcp","version":"0.1.1","keywords":["xcode","mcp","model-context-protocol","ios","swift","ai","llm"],"author":{"name":"baochuquan"},"license":"MIT","_id":"@baochuquan/xcode-mcp@0.1.1","maintainers":[{"name":"baochuquan","email":"baochuquan@163.com"}],"contributors":[{"url":"original xcode-mcp-server author","name":"R.Huijts"}],"bin":{"xcode-mcp":"dist/index.js"},"dist":{"shasum":"572628537d35f1650f56f7b70acdce2fba6a31ac","tarball":"https://registry.npmjs.org/@baochuquan/xcode-mcp/-/xcode-mcp-0.1.1.tgz","fileCount":22,"integrity":"sha512-chGPXi2KHZcO7Tsz7gzbqr4z0Ww98O4qxhhK2Leo7fMhzyMyT9FTiWTZIPO7uLONMx75joaDLcTj62l66n7KlQ==","signatures":[{"sig":"MEQCIFIQ94E5hW28wrHXFbjLYYVyf1cV9i+qASJT4PZ9eR6XAiB++dDvKZnUl0MOE+mhprYTHJf9yVinycH6DZvNHn9uBg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":303786},"type":"module","engines":{"node":">=16.0.0"},"gitHead":"b03f2423a81fc56fb6960d87f8db999c429e6e6b","scripts":{"test":"node --test test/*.test.js","build":"node scripts/build.mjs","clean":"rm -rf dist","start":"node dist/index.js","prebuild":"npm run clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"baochuquan","email":"baochuquan@163.com"},"_npmVersion":"11.5.1","description":"MCP server for Xcode integration, installable via npx","directories":{},"_nodeVersion":"24.5.0","dependencies":{"zod":"3.24.2","glob":"^11.0.1","@modelcontextprotocol/sdk":"1.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^5.8.2","@types/glob":"^8.1.0","@types/node":"^20.17.28"},"_npmOperationalInternal":{"tmp":"tmp/xcode-mcp_0.1.1_1777013591818_0.6793845998453429","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@baochuquan/xcode-mcp","version":"0.2.0","description":"MCP server for Xcode integration, installable via npx","type":"module","bin":{"xcode-mcp":"dist/index.js"},"scripts":{"clean":"rm -rf dist","prebuild":"npm run clean","build":"node scripts/build.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build && npm test && npm run smoke","start":"node dist/index.js","test":"node --test test/*.test.js","smoke":"node scripts/smoke-test.mjs"},"keywords":["xcode","mcp","model-context-protocol","ios","swift","ai","llm"],"author":{"name":"baochuquan"},"contributors":[{"name":"R.Huijts","url":"original xcode-mcp-server author"}],"license":"MIT","publishConfig":{"access":"public"},"engines":{"node":">=16.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"1.9.0","glob":"^11.0.1","xcode":"^3.0.1","zod":"3.24.2"},"devDependencies":{"@types/glob":"^8.1.0","@types/node":"^20.17.28","@types/xcode":"^3.0.0","esbuild":"^0.28.0","typescript":"^5.8.2"},"_id":"@baochuquan/xcode-mcp@0.2.0","gitHead":"52783da593e8bf3ddc8cace6e14c503eca942df1","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-1KdDb3x8FAt7sMAsyN6YPqsfJm0z1TmXk25RvqrM1sQDMTWoAutEKYE8taN1oyFBJSRVlG0UWpLqoAwlcMdsaQ==","shasum":"d22cd7235b486ba24bcc28357003b22db2af69be","tarball":"https://registry.npmjs.org/@baochuquan/xcode-mcp/-/xcode-mcp-0.2.0.tgz","fileCount":23,"unpackedSize":306944,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC/zcU/8SkTYZAYyW/zv34H/sJJn9M43h/Te36jueZjjgIgVIpNKmVJaJjMLWquzFRH4aT8zK94bChEAkIbE2V9eug="}]},"_npmUser":{"name":"baochuquan","email":"baochuquan@163.com"},"directories":{},"maintainers":[{"name":"baochuquan","email":"baochuquan@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/xcode-mcp_0.2.0_1777024346501_0.5185723733120446"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-24T03:59:11.277Z","modified":"2026-04-24T09:52:26.747Z","0.1.0":"2026-04-24T03:59:11.552Z","0.1.1":"2026-04-24T06:53:11.981Z","0.2.0":"2026-04-24T09:52:26.633Z"},"author":{"name":"baochuquan"},"license":"MIT","keywords":["xcode","mcp","model-context-protocol","ios","swift","ai","llm"],"description":"MCP server for Xcode integration, installable via npx","contributors":[{"name":"R.Huijts","url":"original xcode-mcp-server author"}],"maintainers":[{"name":"baochuquan","email":"baochuquan@163.com"}],"readme":"# @baochuquan/xcode-mcp\n\nAn MCP (Model Context Protocol) server that exposes Xcode tooling — project\ninspection, file operations, builds, archives, simulator control, CocoaPods\nand Swift Package Manager — to AI assistants.\n\nInstallable via `npx`. No clone, no local build, no `.env` file.\n\n> Derived from [r-huijts/xcode-mcp-server](https://github.com/r-huijts/xcode-mcp-server)\n> (MIT). The tool surface is preserved 1:1; the installation, configuration\n> and entry point are repackaged for one-line distribution.\n\n---\n\n## Quick start\n\nAdd this to your MCP client config (Claude Desktop, Cursor, Cline, …):\n\n```json\n{\n  \"mcpServers\": {\n    \"xcode\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@baochuquan/xcode-mcp\"],\n      \"env\": {\n        \"PROJECTS_BASE_DIR\": \"/Users/you/Code\"\n      }\n    }\n  }\n}\n```\n\nRestart your MCP client. Done.\n\n> First launch downloads the package (~few MB) and may take 5–15 seconds.\n> Subsequent launches use the npx cache and start in milliseconds.\n\n### Lock to a specific version\n\n```json\n\"args\": [\"-y\", \"@baochuquan/xcode-mcp@0.1.0\"]\n```\n\n### Upgrade\n\n```bash\nnpm cache clean --force                  # optional, forces a fresh fetch\nnpx -y @baochuquan/xcode-mcp@latest      # next client launch picks it up\n```\n\n---\n\n## Configuration\n\nAll configuration is read at startup from environment variables (set in your\nMCP client's `env` block) or CLI flags. The server never reads `process.cwd()`\nor a `.env` file — every value comes from the client config, so the same\nconfig travels across machines.\n\n| Variable | CLI flag | Required | Description |\n|---|---|---|---|\n| `PROJECTS_BASE_DIR` | `--projects-dir=` | yes | Absolute path to the directory containing your Xcode projects. Used as the default file-access boundary. |\n| `XCODE_MCP_TOOLS` | — | no | Comma-separated list of tool groups to expose. Defaults to all. Example: `project,file,build`. Unknown names are warned-about but tolerated. |\n| `ALLOWED_PATHS` | `--allowed-paths=` | no | Extra absolute paths that tools may read/write. Comma-separated. |\n| `DEBUG` | `--debug` | no | `true` enables verbose stderr diagnostics. |\n| `LOG_LEVEL` | `--log-level=` | no | One of `error|warn|info|debug`. Default `info`. |\n\nCLI flags override environment variables when both are present.\n\n### Tool groups\n\n| Id | Tools | External requirement |\n|---|---|---|\n| `project` | project discovery, scheme/target listing, set active project | none |\n| `file` | read/write/list/search project files | none |\n| `build` | `xcodebuild` build/test/clean/archive | Xcode |\n| `xcode` | misc Xcode utilities (devicectl, app icons, etc.) | Xcode |\n| `cocoapods` | `pod install`, `pod update` | CocoaPods (lazy-checked) |\n| `spm` | Swift Package Manager commands | Swift toolchain |\n| `simulator` | iOS Simulator control via `simctl` | Xcode |\n\nOptional dependencies (e.g. CocoaPods) are checked **at tool invocation\ntime**, not at startup — so a missing `pod` does not prevent the rest of the\nserver from working.\n\n---\n\n## Examples\n\n### Restrict to inspection-only tools\n\n```json\n\"env\": {\n  \"PROJECTS_BASE_DIR\": \"/Users/you/Code\",\n  \"XCODE_MCP_TOOLS\": \"project,file\"\n}\n```\n\n### Allow access to a sibling configuration directory\n\n```json\n\"env\": {\n  \"PROJECTS_BASE_DIR\": \"/Users/you/Code\",\n  \"ALLOWED_PATHS\": \"/Users/you/.config/fastlane,/Users/you/Library/Developer/Xcode/DerivedData\"\n}\n```\n\n### Debug a startup failure\n\n```json\n\"env\": {\n  \"PROJECTS_BASE_DIR\": \"/Users/you/Code\",\n  \"DEBUG\": \"true\",\n  \"LOG_LEVEL\": \"debug\"\n}\n```\n\n---\n\n## Migration from `r-huijts/xcode-mcp-server`\n\nIf you previously cloned the upstream and configured Claude Desktop with an\nabsolute `node` path:\n\n1. Replace your `mcpServers.xcode` block with the JSON above.\n2. Move whatever you had in `.env` into the `env` block.\n3. Restart your MCP client.\n\nThere is no need to touch the upstream clone; the two packages can coexist.\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/baochuquan/xcode-mcp.git\ncd xcode-mcp\nnpm install\nnpm run build      # esbuild → dist/\nnpm test           # node --test\nnpm run typecheck  # optional, scoped tsc --noEmit\n```\n\nThe `build` step uses esbuild rather than `tsc` because the combination of\nzod's recursive types and the SDK's deep generics exhausts >8GB of TypeScript\nheap on this codebase. Type checking is available as an opt-in lint via\n`npm run typecheck`.\n\n### Publishing\n\nTagged commits trigger an npm publish via GitHub Actions:\n\n```bash\nnpm version patch  # or minor / major\ngit push --follow-tags\n```\n\n---\n\n## License\n\nMIT. Original copyright remains with R.Huijts and the Xcode MCP Server\nContributors. See `LICENSE` for the derived-work statement.\n","readmeFilename":"README.md"}