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 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

Mei

One running server process

Provides the API, selects model settings and manages requests and response rules.

Inside this process

vMLX runtime

Mei’s pinned fork

Loads the model, runs text generation and manages generation caches.

MLX

Performs array calculations on Apple Silicon’s CPU and GPU.

These libraries run inside the server. They are not separate servers to start.

Downloaded model files

For example, Mei’s prepared MLX version of Groot.

Loaded by the runtime

Model weights are data on disk, not another running app.

Apple Silicon CPU and GPU · shared memory

You install and start Mei. Its vMLX and MLX dependencies are included. Your app calls Mei over HTTP; it does not call those libraries directly.

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.

  1. You ask your assistant to summarize a file.
  2. The app sends the conversation and a description of its read_file tool to Mei.
  3. The model requests read_file. Mei returns that request to the app.
  4. The app reads the file and sends its contents back in another request.
  5. 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:

OpenAI-compatible client settings
Base URL: http://127.0.0.1:8024/v1
Model ID: groot-19b-a3b-text

The 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:

CoCore engine map
groot-19b-a3b-text = http://127.0.0.1:8024

CoCore checks the model’s capabilities when it connects. See the CoCore setup instructions for the complete configuration.

Further reading

Install and run Mei →