# Local LLMs on Apple Silicon with Ollama MLX

> Run MLX-format models in Ollama on Apple Silicon, plus how to diagnose Cloudflare Tunnel 403s — including Ollama's Host header check, which is one common cause but not the only one.

Local LLMs on Apple Silicon with Ollama MLX is a free AI agent skill on Agensi by Drizzt Studio, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Drizzt Studio](https://www.agensi.io/creators/drizztstudio)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/local-llms-on-apple-silicon-with-ollama-mlx
- Tags: llm-ops, devops, apple-silicon, ollama, mlx, local-llm, cloudflare-tunnel, huggingface

## About this skill

How to run LLMs on Apple Silicon with Ollama 0.19 or newer, which has a built-in MLX engine — and why GGUF models on a Mac stay on the llama.cpp/Metal path and never get MLX acceleration. The guide covers the install (download the official script with `curl -fsSL https://ollama.com/install.sh -o /tmp/ollama-install.sh`, review it, then `sh /tmp/ollama-install.sh`, or use the official .dmg), downloading MLX safetensors from Hugging Face, importing them with `ollama create --experimental` (without the flag the import fails with `unknown data type: U32`), measuring real throughput from eval_count/eval_duration, and diagnosing Cloudflare Tunnel 403s. On the 403 side it starts with a three-step check (direct request, LAN request, bogus Host header comparison — Cloudflare Access/WAF 403s carry HTML, Ollama's Host check returns an empty body) before changing anything, then the `httpHostHeader` ingress fix and a reverse test to prove the endpoint is not exposed to the world. Example models use uncensored/abliterated Qwen MLX packs; they are optional suggestions, and tool-calling support varies by release. Knowledge only — one document, no bundled installer, scripts, or weights.

## Requires

- Runs on macOS only
- Ollama 0.19+
- Xcode CLT (~2GB)
- Optional: huggingface_hub
- Optional: Cloudflare Tunnel

Knowledge-only: one SKILL.md, no scripts or weights. Covers Ollama 0.19+ MLX on Apple Silicon, importing MLX safetensors with --experimental, tok/s measurement, and Cloudflare Tunnel 403s from Ollama's Host header check. GGUF sees no MLX speedup. Host header is one cause, not all; add auth first.

## Known limitations

Requires an Apple Silicon Mac; Intel Macs and Windows/Linux are outside this guide. Ollama 0.19 or newer is required for the built-in MLX engine. MLX acceleration only applies to MLX-format weights — GGUF models run on the llama.cpp/Metal path here (a 27B GGUF measured ~6.2 tok/s) and get no benefit. Imports need the `--experimental` flag on `ollama create`, and the Xcode Command Line Tools (roughly 2GB) on first `python3` use. Expect large downloads (the 6-bit 27B pack is about 22.8GB), and keep in mind that a Cloudflare Tunnel 403 has several possible causes — the Host header fix only covers one of them.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Local LLMs on Apple Silicon with Ollama MLX skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this differ from a standard Ollama install?

It targets Ollama 0.19+, which ships a built-in Apple MLX engine, and covers importing MLX safetensors instead of GGUF. On a 27B model the guide measured ~33 tok/s generation for the MLX build versus ~6.2 tok/s for GGUF on a Mac; Ollama's own benchmark reports decode roughly doubling (58 to 112 tok/s on a 35B MoE on M5 Max). Results depend on model size, quantization and chip.

### Can I use this to connect remote AI agents to my Mac safely?

It shows how to diagnose one specific 403 — Ollama's DNS-rebinding Host header check — by setting `httpHostHeader` in the Cloudflare Tunnel ingress. That is a troubleshooting step, not a security control: the guide explicitly tells you to run a reverse test and add authentication and rate limiting before leaving the endpoint reachable from the internet.

### What hardware does this require?

An Apple Silicon Mac (M-series) running macOS, with Ollama 0.19+. The official Ollama benchmark cited in the guide was run on an M5 Max; the guide's own measurements don't name a specific chip. Intel Macs, Windows and Linux are not covered.

### What exactly do I get?

A single knowledge document (one SKILL.md): install commands, the download command and folder-name gotcha, the one-line Modelfile and `ollama create --experimental` import, the API benchmarking recipe, a `config.yml` ingress snippet for Cloudflare Tunnel, and a 403 diagnostic plus reverse-test checklist. No scripts, binaries, installers or model weights are bundled.

### Which Ollama and MLX versions are supported?

Ollama 0.19 or newer, needed for the built-in MLX engine. MLX safetensors import requires the `--experimental` flag; that flag is what avoids the `unknown data type: U32` error, not the Ollama version itself.

### Am I limited to specific models?

The worked examples are Qwen3.8-27B MLX packs (uncensored and abliterated variants), but the workflow applies to any Hugging Face repo that ships MLX-format safetensors. Two caveats: the sub-folder names must match exactly or the download silently fetches 0 files, and tool-calling support varies by model release — verify it for the pack you pick.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
