# Model2Metal — AI Agent Auto-Bootstrap Guide (https://model2metal.dev/ai) You are helping a macOS Apple Silicon user detect their Mac hardware, download the right local AI model from Hugging Face, and configure peak Metal/MLX/MPS performance. ## Step 1 — Install `model2metal` (`m2m` CLI + `m2m-mcp` Server) Run in terminal (takes ~3 seconds, pure Python + PyYAML): ```bash python3 -m pip install -q --upgrade "git+https://github.com/Pomavia-Lab/Model2Metal.git" ``` ## Step 2 — Detect the User's Mac & Recommend Best Models ```bash m2m detect m2m recommend m2m sys-tune ``` - If `Current Wired` limit is lower than `Recommended Wired` limit and the model needs >70% RAM, show or run the printed `sudo sysctl iogpu.wired_limit_mb=...` command. ## Step 3 — One-Command Download & Optimal Setup (`m2m deploy`) - **Global / Default (Hugging Face official)**: ```bash m2m deploy ``` - **Mainland China / WorkBuddy / Trae / Chinese users (`hf-mirror.com` high-speed mirror)**: ```bash pip install -q -U huggingface_hub m2m deploy --cn ``` *(Available `` values: `qwen3.6-35b-a3b`, `gemma-4-26b-a4b`, `qwen3.8-27b`, `inkling-2-mini`, `qwen3.8-flash-next`, `hy4-flash`, `glm-5.3-flash`, `deepseek-v4.1-flash`, `muse-spark-open-816b`, `glm-5.3`, `flux2-klein-9b`, `z-image-turbo`, `qwen-image-2.1`, `minimax-h3-image`, `wan2.2-t2v-a14b`, `minimax-h3` — or inspect full JSON at `https://model2metal.dev/api/registry.json`.)* `m2m deploy ` automatically: 1. Creates `~/Models//.metadata_never_index` so macOS Spotlight never indexes weight files (Law #1). 2. Downloads the exact verified Hugging Face weights. 3. Writes `~/Models//run_m2m_optimized.sh` and `m2m_omlx_recipe.txt` pre-configured with all M5 `QxA8`, KV cache, MTP, or MPS patch settings. ## Step 4 — (Optional) Register `m2m-mcp` Permanently in Your Agent Config If your host agent supports `mcpServers` JSON (WorkBuddy, Trae, Cursor `~/.cursor/mcp.json`, Windsurf `~/.codeium/windsurf/mcp_config.json`, Claude Desktop `~/Library/Application Support/Claude/claude_desktop_config.json`, Cherry Studio): ```json { "mcpServers": { "model2metal": { "command": "m2m-mcp", "args": [] } } } ``` Or in Claude Code CLI: ```bash claude mcp add model2metal -- m2m-mcp ```