Skip to content

Commit 185c692

Browse files
committed
feat: 12 new tools — AppIcon ALL OS + Package/SPM/CocoaPods/Carthage (43 total)
- asset_generate_appicon: TODOS los OS de Apple (iOS 18 slots + macOS 10 + watchOS 7 + tvOS 4 + visionOS 3 = 42 slots), sips -z resize si baseImagePath, Contents.json con role/subtype - package_resolve/update/list_dependencies/read_resolved/reset_cache/compute_checksum: swift package + xcodebuild -resolvePackageDependencies con autodetección .xcworkspace/.xcodeproj - spm_add/remove_dependency: edición Package.swift dependencies:[] - cocoapods_manage/carthage_manage: pod install/update/deintegrate, carthage --use-xcframeworks - cocoapods_to_spm_migrate: Podfile → .package(url:requirement) con heurística ~>/exact y DryRun - index.js 31→43, 1.1.0→1.2.0, README/docs 43, validado sips+actool+SPM
1 parent 7c4f322 commit 185c692

6 files changed

Lines changed: 754 additions & 27 deletions

File tree

README.es.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
**Servidor Model Context Protocol para el ecosistema Apple**
66

7-
*Conecta OpenCode, Codex y Claude Code con Xcode — 31 herramientas profesionales en un solo `index.js`*
7+
*Conecta OpenCode, Codex y Claude Code con Xcode — 43 herramientas profesionales en un solo `index.js`*
88

99
[![CI](https://github.com/YanxReal/Xcode-MPC/actions/workflows/ci.yml/badge.svg)](https://github.com/YanxReal/Xcode-MPC/actions)
1010
[![Node >=18](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org)
1111
[![Yarn 4](https://img.shields.io/badge/yarn-4.18-2C8EBB?logo=yarn&logoColor=white)](https://yarnpkg.com)
1212
[![MCP](https://img.shields.io/badge/MCP-Stdio_Transport-7B68EE)](https://modelcontextprotocol.io)
1313
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
14-
[![Version](https://img.shields.io/badge/version-1.1.0-blue.svg)](package.json)
14+
[![Version](https://img.shields.io/badge/version-1.2.0-blue.svg)](package.json)
1515

1616
> 🌐 **Idioma:** [English](README.md) | **Español**
1717
@@ -33,7 +33,7 @@
3333
<summary><strong>¿Por qué este servidor y no otro?</strong></summary>
3434

3535
-**Single-file `index.js` (1220 líneas)** — sin build, sin compilar, auditable en 1 archivo. Shebang `#!/usr/bin/env node`, listo para `node`, `yarn start` o `npx`.
36-
-**31 herramientas con JSON Schema estricto** (`additionalProperties:false`) + `try/catch` global. Cada tool retorna `content: [{type:"text"}]` y `isError:true` en fallos — nada de `// TODO`.
36+
-**43 herramientas con JSON Schema estricto** (`additionalProperties:false`) + `try/catch` global. Cada tool retorna `content: [{type:"text"}]` y `isError:true` en fallos — nada de `// TODO`.
3737
-**Cobertura Apple total:** `xcodebuild`, `simctl` (9), `devicectl` (2), `xctrace` (5 templates), `agvtool`, `security`, `osascript/xed`.
3838
-**DX moderna:** Yarn 4 vendorizado (`.yarn/releases`), `Makefile` con `help` autodocumentado, `docs/` modular, CI macOS + `make test` smoke.
3939
-**Multi-cliente:** mismo `index.js` funciona en **OpenCode**, **Codex** y **Claude Code** sin cambios.
@@ -55,6 +55,8 @@
5555
| **Editor** | 2 | `xcode_get_active_file` (AppleScript), `xcode_open_at_line` (`xed``xcode://`) |
5656
| **Localización** | 1 | `xcode_sync_strings` (`.xcstrings` → missing/pending/empty) |
5757
| **Assets** | 6 | `asset_list_contents`, `asset_manage_color` (Light/Dark), `asset_manage_image` (1x/2x/3x/vector), `asset_read_info`, `asset_delete`, `asset_validate_actool` (`actool`) |
58+
| **AppIcon** | 1 | `asset_generate_appicon` (TODOS los OS: iOS, macOS, watchOS, tvOS, visionOS + `sips`) |
59+
| **Paquetes / SPM** | 11 | `package_resolve`, `package_update`, `package_list_dependencies`, `package_read_resolved`, `package_reset_cache`, `package_compute_checksum`, `spm_add_dependency`, `spm_remove_dependency`, `cocoapods_manage`, `carthage_manage`, `cocoapods_to_spm_migrate` |
5860

5961
---
6062

@@ -181,7 +183,7 @@ make lint
181183

182184
make test
183185
# ➜ smoke test MCP...
184-
# ✓ tools/list: 31 herramientas
186+
# ✓ tools/list: 43 herramientas
185187
# ✓ xcode_sync_strings OK
186188
# ✓ xcode_certificates_check OK
187189
# ✓ smoke test PASSED
@@ -218,10 +220,10 @@ Reinicia OpenCode / Codex / Claude Code y escribe:
218220
lista las herramientas de xcode
219221
```
220222

221-
Debes ver **31 herramientas** y en el log:
223+
Debes ver **43 herramientas** y en el log:
222224

223225
```
224-
✅ Xcode MCP Server iniciado (stdio) — 31 herramientas registradas
226+
✅ Xcode MCP Server iniciado (stdio) — 43 herramientas registradas
225227
```
226228

227229
¡Listo! Ya puedes decir:
@@ -288,7 +290,7 @@ args = ["/Users/YanxReal/Dev/Tools/Xcode-MPC/index.js"]
288290
claude mcp add xcode -- node /Users/YanxReal/Dev/Tools/Xcode-MPC/index.js
289291
# verifica
290292
claude mcp list
291-
# xcode: connected — 31 tools
293+
# xcode: connected — 43 tools
292294
```
293295

294296
O por proyecto con `.mcp.json`:
@@ -356,6 +358,14 @@ O por proyecto con `.mcp.json`:
356358

357359
`asset_list_contents` (lista `*.colorset/*.imageset`), `asset_manage_color` (`#RRGGBB` Light + Dark), `asset_manage_image` (escalas/vector + `preserves-vector-representation`), `asset_read_info` (`Contents.json`), `asset_delete` (seguro), `asset_validate_actool` (`xcrun actool --compile`)
358360

361+
### 10. AppIcon TODOS los OS (1)
362+
363+
`asset_generate_appicon` (iOS, macOS, watchOS, tvOS, visionOS — 42 slots, `sips -z` si hay `baseImagePath`)
364+
365+
### 11. Paquetes SPM / CocoaPods / Carthage (11)
366+
367+
`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)
368+
359369
> Referencia completa con JSON Schema + ejemplos copiables → [`docs/es/tools.md`](docs/es/tools.md)
360370
361371
---
@@ -368,7 +378,7 @@ make install # yarn install + chmod +x
368378
make reinstall # clean + install (desde cero)
369379
make lint # node --check index.js
370380
make doctor # Verifica Node/Yarn/Xcode/simctl/swiftlint/osascript
371-
make test # Smoke test MCP (31 tools + 2 calls)
381+
make test # Smoke test MCP (43 tools + 2 calls)
372382
make start # yarn start (stdio)
373383
make dev # yarn dev (--watch)
374384
make inspect # Inspector MCP en http://localhost:6274
@@ -386,7 +396,7 @@ Detalles → [`docs/es/development.md`](docs/es/development.md)
386396
| Doc | Para quién | Qué cubre |
387397
|---|---|---|
388398
| [`installation.md`](docs/es/installation.md) | Todos | Yarn Berry, Corepack, `yarnPath` vendorizado, troubleshooting |
389-
| [`tools.md`](docs/es/tools.md) | LLM / Dev | Las 31 tools, JSON Schema, ejemplos JSON listos para copiar |
399+
| [`tools.md`](docs/es/tools.md) | LLM / Dev | Las 43 tools, JSON Schema, ejemplos JSON listos para copiar |
390400
| [`opencode.md`](docs/es/opencode.md) | OpenCode | `opencode.json` global/local, prompts, env `DEVELOPER_DIR` |
391401
| [`codex.md`](docs/es/codex.md) | Codex | `config.toml` (`mcp_servers.xcode`), `codex mcp list` |
392402
| [`claude-code.md`](docs/es/claude-code.md) | Claude Code | `claude mcp add` / `.mcp.json`, permisos, trust |
@@ -400,8 +410,8 @@ Detalles → [`docs/es/development.md`](docs/es/development.md)
400410
```bash
401411
# Sin Make:
402412
python3 scripts/smoke_test.py
403-
# STDERR: ✅ Xcode MCP Server iniciado — 31 herramientas
404-
# ✓ tools/list: 31 herramientas
413+
# STDERR: ✅ Xcode MCP Server iniciado — 43 herramientas
414+
# ✓ tools/list: 43 herramientas
405415
# ✓ xcode_sync_strings OK
406416
# ✓ smoke test PASSED
407417

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![Yarn 4](https://img.shields.io/badge/yarn-4.18-2C8EBB?logo=yarn&logoColor=white)](https://yarnpkg.com)
1212
[![MCP](https://img.shields.io/badge/MCP-Stdio_Transport-7B68EE)](https://modelcontextprotocol.io)
1313
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
14-
[![Version](https://img.shields.io/badge/version-1.1.0-blue.svg)](package.json)
14+
[![Version](https://img.shields.io/badge/version-1.2.0-blue.svg)](package.json)
1515

1616
> 🌐 **Language:** **English** | [Español](README.es.md)
1717
@@ -33,7 +33,7 @@
3333
<summary><strong>Why this server and not another?</strong></summary>
3434

3535
-**Single-file `index.js` (1220 lines)** — no build step, no compile, auditable in one file. Shebang `#!/usr/bin/env node`, ready for `node`, `yarn start` or `npx`.
36-
-**31 tools with strict JSON Schema** (`additionalProperties:false`) + global `try/catch`. Each tool returns `content: [{type:"text"}]` and `isError:true` on failure — no `// TODO`.
36+
-**43 tools with strict JSON Schema** (`additionalProperties:false`) + global `try/catch`. Each tool returns `content: [{type:"text"}]` and `isError:true` on failure — no `// TODO`.
3737
-**Full Apple coverage:** `xcodebuild`, `simctl` (9), `devicectl` (2), `xctrace` (5 templates), `agvtool`, `security`, `osascript/xed`.
3838
-**Modern DX:** Vendored Yarn 4 (`.yarn/releases`), self-documenting `Makefile` with `help`, modular `docs/`, macOS CI + `make test` smoke.
3939
-**Multi-client:** same `index.js` works with **OpenCode**, **Codex** and **Claude Code** without changes.
@@ -55,6 +55,8 @@
5555
| **Editor** | 2 | `xcode_get_active_file` (AppleScript), `xcode_open_at_line` (`xed``xcode://`) |
5656
| **Localization** | 1 | `xcode_sync_strings` (`.xcstrings` → missing/pending/empty) |
5757
| **Assets** | 6 | `asset_list_contents`, `asset_manage_color` (Light/Dark), `asset_manage_image` (1x/2x/3x/vector), `asset_read_info`, `asset_delete`, `asset_validate_actool` (`actool`) |
58+
| **AppIcon** | 1 | `asset_generate_appicon` (ALL Apple OS: iOS, macOS, watchOS, tvOS, visionOS + `sips` resize) |
59+
| **Package / SPM** | 11 | `package_resolve`, `package_update`, `package_list_dependencies`, `package_read_resolved`, `package_reset_cache`, `package_compute_checksum`, `spm_add_dependency`, `spm_remove_dependency`, `cocoapods_manage`, `carthage_manage`, `cocoapods_to_spm_migrate` |
5860

5961
---
6062

@@ -181,7 +183,7 @@ make lint
181183

182184
make test
183185
# ➜ smoke test MCP...
184-
# ✓ tools/list: 31 tools
186+
# ✓ tools/list: 43 tools
185187
# ✓ xcode_sync_strings OK
186188
# ✓ xcode_certificates_check OK
187189
# ✓ smoke test PASSED
@@ -218,10 +220,10 @@ Restart OpenCode / Codex / Claude Code and type:
218220
list the xcode tools
219221
```
220222

221-
You should see **31 tools** and in the log:
223+
You should see **43 tools** and in the log:
222224

223225
```
224-
✅ Xcode MCP Server started (stdio) — 31 tools registered
226+
✅ Xcode MCP Server started (stdio) — 43 tools registered
225227
```
226228

227229
Done! Now you can say:
@@ -288,7 +290,7 @@ args = ["/Users/YanxReal/Dev/Tools/Xcode-MPC/index.js"]
288290
claude mcp add xcode -- node /Users/YanxReal/Dev/Tools/Xcode-MPC/index.js
289291
# verify
290292
claude mcp list
291-
# xcode: connected — 31 tools
293+
# xcode: connected — 43 tools
292294
```
293295

294296
Or per-project with `.mcp.json`:
@@ -356,6 +358,14 @@ Or per-project with `.mcp.json`:
356358

357359
`asset_list_contents` (list `*.colorset/*.imageset`), `asset_manage_color` (`#RRGGBB` Light + Dark), `asset_manage_image` (scales/vector + `preserves-vector-representation`), `asset_read_info` (`Contents.json`), `asset_delete` (safe), `asset_validate_actool` (`xcrun actool --compile`)
358360

361+
### 10. AppIcon ALL Apple OS (1)
362+
363+
`asset_generate_appicon` (iOS, macOS, watchOS, tvOS, visionOS — 42 slots, `sips -z` if `baseImagePath`)
364+
365+
### 11. Package SPM / CocoaPods / Carthage (11)
366+
367+
`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)
368+
359369
> Full reference with JSON Schema + copy-paste examples → [`docs/tools.md`](docs/tools.md)
360370
361371
---
@@ -368,7 +378,7 @@ make install # yarn install + chmod +x
368378
make reinstall # clean + install (from scratch)
369379
make lint # node --check index.js
370380
make doctor # Check Node/Yarn/Xcode/simctl/swiftlint/osascript
371-
make test # Smoke test MCP (31 tools + 2 calls)
381+
make test # Smoke test MCP (43 tools + 2 calls)
372382
make start # yarn start (stdio)
373383
make dev # yarn dev (--watch)
374384
make inspect # MCP Inspector at http://localhost:6274
@@ -386,7 +396,7 @@ Details → [`docs/development.md`](docs/development.md)
386396
| Doc | Audience | Covers |
387397
|---|---|---|
388398
| [`installation.md`](docs/installation.md) | Everyone | Yarn Berry, Corepack, `yarnPath` vendored, troubleshooting |
389-
| [`tools.md`](docs/tools.md) | LLM / Dev | All 31 tools, JSON Schema, copy-paste JSON examples |
399+
| [`tools.md`](docs/tools.md) | LLM / Dev | All 43 tools, JSON Schema, copy-paste JSON examples |
390400
| [`opencode.md`](docs/opencode.md) | OpenCode | `opencode.json` global/local, prompts, `DEVELOPER_DIR` env |
391401
| [`codex.md`](docs/codex.md) | Codex | `config.toml` (`mcp_servers.xcode`), `codex mcp list` |
392402
| [`claude-code.md`](docs/claude-code.md) | Claude Code | `claude mcp add` / `.mcp.json`, permissions, trust |
@@ -400,8 +410,8 @@ Details → [`docs/development.md`](docs/development.md)
400410
```bash
401411
# Without Make:
402412
python3 scripts/smoke_test.py
403-
# STDERR: ✅ Xcode MCP Server started — 31 tools
404-
# ✓ tools/list: 31 tools
413+
# STDERR: ✅ Xcode MCP Server started — 43 tools
414+
# ✓ tools/list: 43 tools
405415
# ✓ xcode_sync_strings OK
406416
# ✓ smoke test PASSED
407417

docs/es/tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Referencia de Herramientas (31)
1+
# Referencia de Herramientas (43)
22

33
> 🌐 **Idioma:** [English](../tools.md) | **Español**
44

docs/tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Tools Reference (31)
1+
# Tools Reference (43)
22

33
> 🌐 **Language:** **English** | [Español](es/tools.md)
44

0 commit comments

Comments
 (0)