🌐 Language: English | Español
git clone https://github.com/YanxReal/Xcode-MPC.git
cd Xcode-MPC
make install # yarn install
make doctor # verify toolchain
make lint # node --check
make test # smoke MCP
make dev # watch modeXcode-MPC/
├── index.js # single-file MCP server (2250 lines, 47 tools)
├── package.json # Yarn 4, type:module, bin
├── yarn.lock # immutable lockfile
├── .yarnrc.yml # vendored yarnPath
├── .yarn/releases/ # Yarn 4.18.0.cjs
├── Makefile # DX: install, lint, doctor, test, release
├── README.md # English (main)
├── README.es.md # Español
├── docs/ # English (main)
│ ├── installation.md
│ ├── tools.md
│ ├── opencode.md
│ ├── codex.md
│ ├── claude-code.md
│ ├── development.md # this file
│ └── architecture.md
├── docs/es/ # Español mirror
│ ├── installation.md
│ ├── tools.md
│ ├── opencode.md
│ ├── codex.md
│ ├── claude-code.md
│ ├── development.md
│ └── architecture.md
├── scripts/
│ ├── smoke_test.py # main smoke (python)
│ └── smoke_test.mjs # fallback node
├── .github/
│ ├── workflows/ci.yml # CI macOS + Linux
│ └── ISSUE_TEMPLATE/
└── LICENSE
make help # list targets
make install # yarn install + chmod
make reinstall # clean + install
make lint # node --check index.js
make check # alias lint
make doctor # xcodebuild, simctl, etc.
make test # smoke
make start # yarn start
make dev # yarn dev (--watch)
make inspect # npx @modelcontextprotocol/inspector
make clean # rm -rf node_modules .yarn/cache
make fmt # prettier (optional)
make release VERSION=1.0.1.github/workflows/ci.yml:
- macOS 14 (
macos-14):yarn install --immutable→make lint→make doctor→make test - Linux (
ubuntu-latest): onlynode --check(no Xcode)
Runs on push to main/develop and PRs to main.
- ES Modules (
import/export),type: "module" - StdioServerTransport — no HTTP, just stdio
- promisify(exec) with
maxBuffer: 10MB,shellEscapefor paths - Strict JSON Schema (
additionalProperties:false) - Global try/catch in
CallToolRequestSchema+ returnisError:true
- Define in
TOOLS(index.js:142) withname,description,inputSchema - Implement
handle_newwithrunCommand/formatResult/textContent/errorContent - Register in
HANDLERS(index.js:1147) - Document in
docs/tools.md(anddocs/es/tools.md) +README.md/README.es.md make lint && make test && yarn inspect→ testtools/call
Minimal example:
{
name: "xcode_version",
description: "Show xcodebuild -version",
inputSchema: { type:"object", properties:{}, additionalProperties:false }
}
async function handle_xcode_version(){ const r=await runCommand("xcodebuild -version"); return textContent(formatResult("xcode_version", r)); }
HANDLERS.xcode_version = handle_xcode_version;make release VERSION=1.1.0
# 1. npm version 1.1.0 --no-git-tag-version
# 2. yarn install (updates yarn.lock)
# 3. git commit + tag v1.1.0 + push --tagsThen create a GitHub Release with changelog.
No mandatory formatter. If you want:
npx --yes prettier --write "index.js" "docs/**/*.md"
# or
make fmtKeep single-file readable, no // TODO.