Where Mei fits
Mei runs a language model and serves requests from your app. Your app handles the conversation and tools. The diagram shows where each part runs on a Mac.
Your app or agent harness
CoCore or an app you build.
Keeps the conversation, sends requests and runs the tools. An agent harness is the software that manages this loop.
Your tools
For example, read a file or run a calculation.
The app runs these actions. The model asks for them.
Messages and tool descriptions go to the server.
Generated text or tool-call requests come back.
OpenAI-compatible HTTP API
llama-server
One running server processProvides an HTTP API for llama.cpp. It also includes a web chat interface.
Inside this process
llama.cpp runtime
Loads the model, runs text generation and manages generation caches.
ggml and hardware backends
Performs the calculations. Metal is one available backend on Apple Silicon.
These libraries run inside the server. They are not separate servers to start.
Downloaded model files
A compatible model in GGUF format.
Loaded by the runtime
Model weights are data on disk, not another running app.
Apple Silicon CPU and GPU · shared memory
llama-server fills the same role here: a model server that a separate app can call. It uses llama.cpp and GGUF model files, while Mei uses vMLX, MLX and compatible MLX model files.
What Mei adds
Mei is a native Swift server that runs as a compiled executable. Its inference libraries are bundled with it, so you don’t need to set up a Python environment to run models.
Mei provides the HTTP server, model configurations, request limits and response handling. It uses vMLX to load models and generate text, and MLX to perform the underlying calculations.
Mei uses a maintained fork of vMLX. Some of the changes made for Mei live in that fork, including work on generation and caching. The work is spread across the server and its dependencies; you receive them together when you install Mei.
The model files contain the learned weights and other data the runtime needs. Downloading a model does not start a server. You start Mei with a model directory, then connect your app to Mei’s API.
Who runs a tool call?
The model can ask for a tool. Your app decides whether to run it and returns the result. Mei does not read your files or run shell commands just because the model requests them.
- You ask your assistant to summarize a file.
- The app sends the conversation and a description of its
read_filetool to Mei. - The model requests
read_file. Mei returns that request to the app. - The app reads the file and sends its contents back in another request.
- Mei runs the model again and returns the summary.
The app can repeat this loop for more steps, stop it, or ask you to approve an action.
How this compares with llama-server
llama-server also provides an API that an app or agent harness can call. It runs models through llama.cpp and includes a web chat interface.
Mei focuses on Apple Silicon and uses the MLX stack. llama.cpp supports several hardware backends and uses GGUF model files. Choose model files that match the server you are running.
An app may support both servers through its OpenAI-compatible provider settings. The exact API features and model behavior still need to match what the app expects.
Connect your app to Mei
Start Mei with the model ID groot-19b-a3b-text, as shown in the installation instructions. Then configure the model provider in your app.
OpenAI-compatible client
If the app supports a custom OpenAI-compatible endpoint, use these settings:
Base URL: http://127.0.0.1:8024/v1
Model ID: groot-19b-a3b-textThe model ID must match the ID Mei serves. The app also needs to support the features you use, such as streaming or tool calls.
CoCore
CoCore’s engine map takes the server root, without /v1. Add this entry to ~/.cocore/engine-map:
groot-19b-a3b-text = http://127.0.0.1:8024CoCore checks the model’s capabilities when it connects. See the CoCore setup instructions for the complete configuration.