# ddalcu/mlx-serve — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `ai-models`
- Overall score: `4.1/5`
- Implementation check: `verified`
- Maturity: `active`
- Audited commit: `2e829173c771` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-11-30T12:43:25Z
- Repository: https://github.com/ddalcu/mlx-serve
- Radar entry: https://radar.alplab.co/#repo/ddalcu/mlx-serve
- License: `NOASSERTION`
- CI workflows: `.github/workflows`
- Tags: `apple-silicon`, `mlx`, `inference-server`, `openai-api`, `anthropic-api`, `media-generation`

## Summary

A native Zig MLX inference server (plus Swift macOS app) for Apple Silicon that serves OpenAI, Anthropic, Ollama and Responses wire APIs on one port and adds media generation (image, video, TTS/voice-clone, music, 3D) over HTTP.

## Implementation Check

The README claims are implemented, not scaffolded: src/main.zig implements the run/pull/serve/launch CLI and dozens of engine flags; src/host/http/router.zig registers /v1/chat/completions, /v1/messages, /v1/responses, Ollama routes and /v1/images/generations; src/plugins/minimax_h3* and src/host/media_jobs/gen.zig back the media endpoints; auth is real code in src/host/http/auth.zig; CI builds and tests both Zig and Swift app in .github/workflows/ci.yml.

## When to Use

Reach for it when you want a fast local model server on an Apple Silicon Mac that Claude Code, OpenAI SDKs or Ollama clients can use unchanged, and for local image/audio/video generation over the same port. Do not expose it to an untrusted network, and expect the newest macOS (26.2+) and large RAM for the headline features.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 5.0/5 |
| usability | 4.5/5 |
| reliability | 3.0/5 |
| security | 3.0/5 |
| integration | 5.0/5 |

## Code Evidence

ci.yml runs zig build + zig build test (4 shards, slow tool-traffic corpus replay on main pushes) and the Swift app build+test on macos-26 for every PR and push; tests/ holds ~100 integration scripts (test_image_gen.sh, test_gen_chat_mix.sh, test_lan_peer_key.sh, agent-stop repro). src/host/http/auth.zig implements Bearer/Basic/x-api-key/cookie auth with constant-time compare and hermetic truth-table tests. docs/known-issues.md candidly declares exactness contracts per architecture and lists unfixed bugs. Maturity data (648 commits/90d, 61 contributors, 30 releases) matches the tree's density.

## Issues Found

1) src/main.zig: default --host 0.0.0.0 makes the no-key server LAN-reachable; prompts are readable by anyone on the network until --api-key/--host are set. 2) SECURITY.md contradicts the shipped defaults ('127.0.0.1 (default)', 'no auth'). 3) docs/known-issues.md documents unfixed correctness bugs in normal-looking paths: special-token injection on the GGUF/ds4 paths, streaming gate gaps (stray <function= opener), Mistral stream/non-stream whitespace divergence. 4) lib/jinja_cpp/libjinja.a prebuilt static library in-tree despite rebuildable sources beside it.

## Key Risks

Nothing was executed, so no runtime claim is proven. The default bind is 0.0.0.0 with no auth unless --api-key is set (only a startup warning; src/main.zig help says a future version will default to 127.0.0.1). SECURITY.md is stale relative to the code: it claims 'bind to 127.0.0.1 (default)' and 'no authentication', both now wrong. The maintainer's own release notes call the latest release 'beta' with polish pending. A prebuilt binary blob (lib/jinja_cpp/libjinja.a, 1.5 MB) is committed alongside its sources. The author's X posts claim performance numbers (100+ tok/s, 1.5 hr media pipeline) that are marketing context, not evidence.

## Reviewed Files

- `README.md`
- `src/main.zig`
- `.github/workflows/ci.yml`
- `src/host/http/auth.zig`
- `docs/api.md`
- `docs/known-issues.md`
- `docs/integrations.md`
- `SECURITY.md`
- `LICENSE`
- `LICENSE-APACHE-2.0`
- `app/Sources/MLXServe/Services/BenchmarkStore.swift`
- `database.rules.json`
- `firebase.json`
- `.firebaserc`
- `.gitmodules`
- `scripts/fetch-zig.sh`
- `CHANGELOG.md`
- `src/host/http/router.zig`
- `src/plugins/minimax_h3_image/plugin.zig`
