HearthMCP: Open-Source iOS MCP Client Runs On-Device LLMs With No Cloud APIs
Osgood108 · reddit · 2026-12-07
A Redditor open-sourced HearthMCP (MIT): a native SwiftUI iOS client that connects on-device LLMs directly to remote Streamable HTTP MCP (2025-11-25) servers — no cloud API keys, no home Mac running Ollama. The demo shows Apple Intelligence on an iPhone calling a remote MCP tool (1.8s round trip) and streaming a grounded Markdown summary.
Architecture highlights
- Dual hot-swappable on-device engines: Apple Intelligence (FoundationModels, iOS 26+, zero extra RAM, converts MCP inputSchema into Apple's GenerationSchema at runtime for constrained decoding); LiteRT-LM 0.20.1 (e.g. Gemma 4 E4B/E2B) with a host-managed multi-step agent loop, tiered parser and early-stop cancellation to prevent hallucinated tool outputs
- Streamable HTTP transport: iOS sandboxing forbids stdio subprocesses, so it targets HTTPS cloud or LAN/Tailscale servers with Keychain-stored auth headers and clean handling of stateless 405 GET-SSE servers (FastMCP on Cloud Run)
- Mobile context management: per-tool toggles with a live schema-budget estimator, deterministic sliding-window pruning of tool JSON instead of battery-hungry LLM compaction, configurable truncation/maxToolSteps/timeouts
Try it: no $99 developer account needed — clone and sideload from Xcode with a free Personal Team Apple ID; ungated Gemma 4 weights linked in the README, or run immediately on Apple Intelligence with zero downloads on iOS 26+.
More from coding & agent
- OpenAI docs: build an agent improvement loop with traces, evals, and Codex — adnan_hashmi · 2026-12-07
- Meet Fede, the AI agent an entire company talks to in Slack — miilesus · 2026-12-07
- Data scientist: traditional data science is broken as new AI-era roles emerge — mdancho84 · 2026-12-07
- Open-source Python AI Data Science Team automates full DS workflow for free — mdancho84 · 2026-12-07
- Two classic software engineering maxims that still hold in the AI era — dotey · 2026-12-07
- Why trace analytics doesn't exist yet: capability growth keeps outpacing the need — sh_reya · 2026-12-07