Xcode MCP Server
Xcode MCP Server
Apple 생태계를 위한 Model Context Protocol Server
OpenCode, Codex, Claude Code를 Xcode에 연결하세요 — 단일 index.js로 제공되는 43개의 전문 도구
🌐 언어: English | Español
설치 • 도구 • OpenCode • Codex • Claude Code • 문서
이것은 무엇인가요?
Xcode MCP Server는 여러분의 AI IDE(OpenCode / Codex / Claude Code)와 Xcode + Apple 개발 도구를 연결하는 본격적이고 프로덕션 준비가 끝난 브리지입니다.
LLM은 이제 Swift 코드만 작성하지 않습니다. 빌드, 테스트, 프로파일링, 시뮬레이터·실기기 관리, 서명은 물론 정확한 라인의 Xcode 열기까지 수행합니다 — HTTP 서버 없이 MCP
stdio만으로 말이죠.
기술 스택: ES Modules · @modelcontextprotocol/sdk@1.30 · StdioServerTransport · promisify(exec) · Yarn 4 Berry · Make
✅ 단일 파일
index.js(2250줄) — 빌드 단계나 컴파일 없이 한 파일로 감사할 수 있습니다. 셔뱅#!/usr/bin/env node,node,yarn start또는npx로 실행할 수 있습니다.✅ 엄격한 JSON Schema를 갖춘 43개 도구 (
additionalProperties:false) + 전역try/catch. 각 도구는content: [{type:"text"}]를 반환하고 실패 시isError:true를 반환합니다 —// TODO없음.✅ 완전한 Apple 지원 범위:
xcodebuild,simctl(9),devicectl(2),xctrace(5개 템플릿),agvtool,security,osascript/xed.✅ 현대적인 DX: 번들된 Yarn 4(
.yarn/releases),help를 지원하는 자체 문서화Makefile, 모듈식docs/, macOS CI +make test스모크 테스트.✅ 멀티 클라이언트: 동일한
index.js가 수정 없이 OpenCode, Codex, Claude Code에서 작동합니다.
Related MCP server: Xcode MCP Server
✨ 기능
카테고리 | 도구 | 설명 |
빌드 | 6 |
|
테스트 | 2 |
|
시뮬레이터 | 9 |
|
기기 | 2 |
|
프로파일링 | 1 |
|
버전 | 2 |
|
편집기 | 2 |
|
지역화 | 1 |
|
에셋 | 6 |
|
앱 아이콘 | 1 |
|
패키지 / SPM | 11 |
|
📋 목차
📦 요구 사항
의존성 | 버전 | 설치 | 필수 여부 |
macOS | 13+(14+ 권장) | — | ✅ |
Xcode | 15+ | App Store → | ✅ |
Node.js | ≥ 18 |
| ✅ |
Yarn | 4.x Berry |
| ✅ |
make | 3.81+ |
| ✅ |
swift-format | latest |
| ◻️ 선택 사항 |
swiftlint | latest |
| ◻️ 선택 사항 |
Linux/Windows:
make lint만 작동합니다(Xcode 없음). CI는 이를 위해syntax-linux작업을 실행합니다.
🚀 단계별 설치
다음 순서를 정확히 따르세요. 블록 단위로 복사해서 붙여넣으세요.
단계 0 — Xcode 및 Node 확인
xcodebuild -version
# Xcode 15.4 Build version 15F31d
node --version
# v20.11.0 (or newer)
yarn --version
# 4.18.0 — if "command not found", run:
corepack enable
corepack prepare yarn@stable --activate
yarn --version단계 1 — 저장소 클론
git clone https://github.com/YanxReal/Xcode-MPC.git
cd Xcode-MPC단계 2 — 의존성 설치
방법 A — Make 사용(권장, 최신):
make installmake install이 수행하는 작업:
yarn을 감지하고, 없으면corepack으로 설치합니다.yarn install을 실행합니다(yarn.lock을 읽고@modelcontextprotocol/sdk설치).chmod +x index.js를 실행합니다.
예상 출력:
➤ YN0000: · Yarn 4.18.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: · Done with warnings in 3s
✓ dependencies installed방법 B — Yarn 직접 사용:
yarn install
chmod +x index.jsnpm에서 전환하는 경우:
rm -f package-lock.json
yarn install단계 3 — 환경 확인
make doctor다음과 같이 표시되어야 합니다:
Node: v20.x
Yarn: 4.18.0
Xcode: Xcode 15.x
xcrun: xcrun version 70
...
✓ doctor completexcodebuild: command not found가 표시되면:
sudo xcode-select -s /Applications/Xcode.app단계 4 — MCP 서버 검증
make lint
# ➜ node --check index.js
# ✓ lint ok
make test
# ➜ smoke test MCP...
# ✓ tools/list: 43 tools
# ✓ xcode_sync_strings OK
# ✓ xcode_certificates_check OK
# ✓ smoke test PASSED또는 수동으로:
python3 scripts/smoke_test.py
# or
node scripts/smoke_test.mjs단계 5 — AI 클라이언트 설정
하나를 선택하세요(또는 세 개 모두 — 동일한 index.js가 어디서든 작동합니다):
클라이언트 | 설정 파일 | 명령 |
OpenCode |
|
|
Codex |
|
|
Claude Code |
| CLI 또는 |
복사해서 붙여넣을 수 있는 JSON/TOML이 포함된 전체 단계별 안내:
단계 6 — 다시 시작하고 테스트
OpenCode / Codex / Claude Code를 다시 시작하고 다음을 입력하세요:
list the xcode tools43개의 도구가 표시되고 로그에는 다음이 보여야 합니다:
✅ Xcode MCP Server started (stdio) — 43 tools registered완료! 이제 다음과 같이 말할 수 있습니다:
Build MyApp with xcode_build scheme MyApp destination "platform=iOS Simulator,name=iPhone 15"✅ 검증
# 1. Syntax
make lint
# 2. Smoke MCP (no Xcode needed, just Node)
make test
# 3. Apple environment
make doctor
# Checks: node, yarn, xcodebuild, xcrun, simctl, swiftlint, security, osascript
# 4. Visual inspector (optional)
make inspect
# or
yarn inspect
# Open http://localhost:6274 → tools/list → tools/call🔧 OpenCode / Codex / Claude Code 사용법
OpenCode
~/.config/opencode/opencode.json:
{
"mcpServers": {
"xcode": {
"command": "node",
"args": ["/Users/YanxReal/Dev/Tools/Xcode-MPC/index.js"],
"env": {}
}
}
}Codex (OpenAI)
~/.codex/config.toml:
[mcp_servers.xcode]
command = "node"
args = ["/Users/YanxReal/Dev/Tools/Xcode-MPC/index.js"]Claude Code (Anthropic)
claude mcp add xcode -- node /Users/YanxReal/Dev/Tools/Xcode-MPC/index.js
# verify
claude mcp list
# xcode: connected — 43 tools또는 프로젝트별로 .mcp.json을 사용하려면:
{
"mcpServers": {
"xcode": {
"command": "node",
"args": ["/Users/YanxReal/Dev/Tools/Xcode-MPC/index.js"]
}
}
}각 클라이언트별 프롬프트 예시 →
docs/opencode.md·docs/codex.md·docs/claude-code.md· 템플릿:.mcp.json.example·.codex-config.toml.example
🛠️ 도구 (43)
1. 빌드, 진단 및 정리
도구 |
| 주요 인자 | |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| format |
2. 테스트 및 커버리지
도구 |
| 주요 인자 |
|
|
|
|
|
|
3. 시뮬레이터 xcrun simctl (9)
simctl_list (booted 필터), simctl_lifecycle (boot|shutdown|erase), simctl_install_launch, simctl_media_capture (screenshot|record), simctl_push_notification, simctl_location_mock, simctl_privacy_control, simctl_ui_appearance (light|dark), simctl_open_url
4. 물리적 기기 xcrun devicectl (2)
devicectl_list (--json), devicectl_logs (deviceUdid*, durationSeconds)
5. 프로파일링 xcrun xctrace (1)
xctrace_profile (template: Time Profiler|Allocations|Leaks|System Trace, timeLimitSeconds, outputFilePath*)
6. 버전 및 보안 (2)
agvtool_version_bump (bump_build|set_version|set_build), xcode_certificates_check (security find-identity)
7. Xcode GUI 편집기 (2)
xcode_get_active_file (AppleScript osascript), xcode_open_at_line (filePath*, line*, column — xed → xcode://)
8. 지역화 (1)
xcode_sync_strings (.xcstrings → missing / pendingTranslation / emptyValues)
9. 에셋 Assets.xcassets + actool (6)
asset_list_contents (*.colorset/*.imageset 목록), asset_manage_color (#RRGGBB Light + Dark), asset_manage_image (배율/벡터 + preserves-vector-representation), asset_read_info (Contents.json), asset_delete (안전), asset_validate_actool (xcrun actool --compile)
10. AppIcon 모든 Apple OS (1)
asset_generate_appicon (iOS, macOS, watchOS, tvOS, visionOS — 42개 슬롯, sips -z (만약 baseImagePath가 있으면))
11. 패키지 SPM / CocoaPods / Carthage (11)
package_resolve/update/list/read_resolved/reset_cache/compute_checksum, spm_add/remove_dependency, cocoapods_manage, carthage_manage, cocoapods_to_spm_migrate (Podfile→Package.swift)
JSON Schema + 복사-붙여넣기 예제가 포함된 전체 레퍼런스 →
docs/tools.md
📖 Make 명령어
make help # Show this pretty help (colors)
make install # yarn install + chmod +x
make reinstall # clean + install (from scratch)
make lint # node --check index.js
make doctor # Check Node/Yarn/Xcode/simctl/swiftlint/osascript
make test # Smoke test MCP (43 tools + 2 calls)
make start # yarn start (stdio)
make dev # yarn dev (--watch)
make inspect # MCP Inspector at http://localhost:6274
make clean # Remove node_modules/.yarn/cache/build
make fmt # prettier if available
make release VERSION=1.0.1 # bump + tag + push자세한 내용 → docs/development.md
📚 문서
문서 | 대상 | 내용 |
모든 사용자 | Yarn Berry, Corepack, | |
LLM / 개발자 | 43개 전체 도구, JSON Schema, 복사-붙여넣기 JSON 예제 | |
OpenCode |
| |
Codex |
| |
Claude Code |
| |
기여자 | 구조, 도구 추가, CI, 릴리스 | |
궁금한 분 | 단일 파일을 사용하는 이유, 헬퍼, 디스패처, stdio 흐름 |
🧪 수동 스모크 테스트
# Without Make:
python3 scripts/smoke_test.py
# STDERR: ✅ Xcode MCP Server started — 43 tools
# ✓ tools/list: 43 tools
# ✓ xcode_sync_strings OK
# ✓ smoke test PASSED
# With Make:
make test🏗️ 아키텍처
index.js (2250 lines, 1 file)
├── Shebang + Imports (MCP SDK, promisify(exec), fs, path, os)
├── Helpers: shellEscape, expandTilde, runCommand (try/catch + 10MB buffer), formatResult
├── TOOLS[43]: Strict JSON Schema (additionalProperties:false)
├── Handlers[43]: async handle_* with validation + fallbacks (xed→xcode://, swift-format→swiftlint)
├── Dispatcher: HANDLERS map + ListTools/CallTool (try/catch → isError:true)
└── Server: StdioServerTransport (stdin JSON-RPC, stdout JSON-RPC, stderr logs)참조: docs/architecture.md — 단일 파일 선택과 OpenCode → stdin → handler → xcrun → stdout 흐름.
🤝 기여
# 1. Fork and branch
git checkout -b feat/my-tool
# 2. Develop: add to TOOLS + Handler + HANDLERS in index.js
make install && make lint && make test
# 3. Document in docs/tools.md + README.md
# 4. PRCI는 macos-14와 ubuntu-latest에서 실행됩니다 — PR은 자동으로 테스트됩니다.
📄 라이선스
MIT © YanxReal — LICENSE를 참조하세요.
🔗 링크
MCP 스펙: https://modelcontextprotocol.io
Yarn Berry: https://yarnpkg.com/getting-started
Apple 생태계를 위해 ❤️로 제작됨 · Yarn 4 + Make + CI + Docs
도움이 되셨다면 GitHub에서 ⭐를 남겨주세요
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceBridges Claude AI with Xcode, enabling AI-powered code assistance, project management, and automated development tasks securely on your local machine.76186385MIT
- -licenseNot gradedqualityNot gradedmaintenanceA server that acts as a bridge between Claude and local Xcode projects, enabling AI-powered code assistance, project management, and automated development tasks without exposing your code to the internet.
- AlicenseBqualityCmaintenanceProvides programmatic access to Xcode functionality, enabling AI assistants to create, build, test, and manage iOS/macOS projects directly.3385MIT
- AlicenseAqualityBmaintenanceEnable Claude Code, Cursor, or your favorite LLM to interact with Xcode, building your projects the same way you do, and seeing the same errors. Greatly increases productivity when working on iOS, iPadOS, macOS, visionOS, tvOS projects & Swift packages - or any time you might use Xcode.295MIT
Related MCP Connectors
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/YanxReal/Xcode-MPC'
If you have feedback or need assistance with the MCP directory API, please join our Discord server