MLX Code

A local AI coding assistant for macOS on Apple silicon, with in-process MLX inference, built-in project tools, an Xcode extension, a widget, and optional routing to other local or cloud model providers.

View on GitHub ↗
Stars
★ 7
Last commit
1 Dec 2026
Maintenance
Active
Licence
MIT
Category
Xcode & IDE · Cloud-capable
GitHub
kochj23/MLXCode

Overview

MLX Code is a macOS app by Jordan Koch that runs a coding assistant on Apple silicon. By default, the language model runs in-process on the Mac through mlx-swift and mlx-swift-lm, and nothing leaves the machine. The same chat can instead use Ollama, TinyLLM, TinyChat, OpenWebUI, the Nova Gateway, OpenRouter or OpenAI, through the author's NovaAIKit library, with an Auto mode that tries those backends in turn.

The app provides a chat interface with 14 built-in tools, as counted in the README, that can read and edit files, search the project, run shell commands, build and test Xcode projects, work with Git and GitHub, and help with navigation, analysis, error diagnosis and test generation. Read-only tools auto-approve; write and execute tools need confirmation. An Xcode Source Editor extension offers Explain, Refactor, Generate Tests, Fix Issues and Ask MLX Code on the current selection, by handing the request to the running app. A WidgetKit widget shows model status and memory use.

AI can be turned off entirely in Settings, so nothing is sent to any model. API keys for remote backends are stored only in the macOS Keychain and are sent only over HTTPS.

The project is licensed under the MIT licence. It requires macOS 14 or later and Apple silicon. Xcode is not required for chat. The README says Xcode 26 or later, plus Apple's Metal Toolchain, is needed to build from source.

The README and version badge describe 6.5.0, dated 11 Nov 2026. The latest GitHub Release is still v6.4.0 (6 Nov 2026), whose asset is a zip archive rather than the 6.5.0 DMG named in the README. Use an attached release asset or build from source until a 6.5.0 release appears. The README says the 6.5.0 build it describes is not Developer ID signed or notarised.

Features

  • In-process MLX inference with stop-to-cancel, native tool calling, and KV-cache and sampling controls. Models download from Hugging Face mlx-community as SafeTensors weights; PyTorch pickle files are rejected.
  • 14 built-in tools, as listed in the README, across file operations, shell, search, Xcode, Git, GitHub and code analysis, with an approval step for writes.
  • Optional AI backends through NovaAIKit, including local servers and hosted OpenRouter or OpenAI endpoints, plus Auto failover. Keys stay in the Keychain.
  • An Xcode Source Editor extension with five commands, and a small, medium and large desktop widget.
  • Prompt templates, slash commands, local user memories, and a loopback HTTP API on port 37422 that requires a bearer token for changes.
  • A built-in model catalogue. The README's 6.5.0 list defaults to Qwen3.5 9B, with larger Qwen, Devstral and Gemma options; sizes and RAM figures are the author's.

Requirements

  • macOS 14.0 (Sonoma) or later, and Apple silicon (M1, M2, M3 or M4).
  • 8 GB RAM minimum, 16 GB recommended, for in-process models, according to the README. Enough disk space for the chosen model (the README's figures start at about 1.5 GB and go up to about 20 GB).
  • Network access for the first model download from Hugging Face, and for any remote backend.
  • Optional: a local or LAN Ollama, TinyLLM, TinyChat or OpenWebUI server, a Nova Gateway, or an OpenRouter or OpenAI API key.
  • To use the Xcode extension: Xcode, with the extension enabled under System Settings, Privacy & Security, Extensions, Xcode Source Editor.
  • To build from source: Xcode 26 or later, and the Metal Toolchain (xcodebuild -downloadComponent MetalToolchain), according to the README. An older install guide still mentions Xcode 15.

Install

  1. From a published GitHub Release: the latest attached app archive as of 29 Nov 2026 is MLXCode-6.4.0.zip on the v6.4.0 release. Open the archive, put MLX Code in Applications, and launch it. The MLXCode-v6.5.0-build10.dmg named in the README is not attached to Releases.

  2. If macOS refuses to open an unsigned build, the README describes System Settings, Privacy & Security, Open Anyway, or xattr -dr com.apple.quarantine on the app. Notarised releases, when available, should open without that step.

  3. In the app, download a model from Settings, Model, or pick another backend in Settings, AI.

  4. To enable the Xcode extension: System Settings, Privacy & Security, Extensions, Xcode Source Editor, enable MLX Code, then restart Xcode and use Editor, MLX Code.

  5. To build from source: clone https://github.com/kochj23/MLXCode.git, install the Metal Toolchain, and open MLX Code.xcodeproj. Command-line builds need -skipMacroValidation -skipPackagePluginValidation, as described in the README.

Example

Install the app, download a catalogue model such as Qwen3.5 9B, and ask the chat to explain a failing test in the current project and then run the Xcode test action. Or select a function in Xcode and use Editor, MLX Code, Generate Tests. To keep everything on the device, leave the backend on MLX and do not store cloud API keys.

Works with

Xcode

Listed in

Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.

Report a correction

More in this category