oMLX

•

Connects Model Context Protocol (MCP) clients to a local oMLX inference server for large language model interaction and management on Apple Silicon.

This server acts as a bridge, enabling Model Context Protocol (MCP) clients, such as Claude Desktop, to interact with a local oMLX inference server running on Apple Silicon. It wraps a selection of oMLX's OpenAI-compatible, Anthropic-compatible, and admin API endpoints into seven distinct MCP tools. This allows users to seamlessly perform LLM inference, inspect model states, and manage model lifecycle operations like loading and unloading models directly from their MCP client, leveraging the power of local MLX-based models.

主要功能

010 GitHub stars
02Generate chat completions using an OpenAI-compatible API.
03Load and unload specific models into or from memory on the oMLX server.
04Report load state, memory size, and context window for loaded models.
05Generate text completions using a standard completions API.
06List available models by ID or alias from the oMLX server.

使用案例

01Performing local LLM inference for chat, text completion, and embeddings using an OpenAI/Anthropic-compatible API.
02Managing the lifecycle (loading and unloading) of local LLMs directly from an MCP client application.
03Integrating Claude Desktop or other MCP clients with local LLMs running on Apple Silicon via oMLX.

Created: 2026 June 03

oMLX MCP Server

A Model Context Protocol (MCP) server providing access to a local oMLX inference server. Exposes seven tools covering inference, inspection, and model lifecycle management.

Table of Contents

  1. Overview
  2. Requirements
  3. Installation
  4. Configuration
  5. Tools
  6. Client Registration
  7. Documentation
  8. License
  9. Version History

1 Overview

oMLX is a local LLM inference server for Apple Silicon that provides OpenAI-compatible and Anthropic-compatible API endpoints, plus an admin API for model management. This MCP server wraps a subset of those endpoints as MCP tools, enabling an MCP client to list models, inspect load state, run inference, and load or unload models.

The server communicates with oMLX over HTTP and runs as a local stdio subprocess of the MCP client.

Return to Table of Contents


2 Requirements

  • Python 3.10 or later
  • A running oMLX server reachable over HTTP
  • The mcp, httpx, and pydantic packages (installed automatically)

Return to Table of Contents


3 Installation

3.1 From GitHub (no clone required)

Create a virtual environment and install directly from the repository:

python3 -m venv ~/mcp-omlx

~/mcp-omlx/bin/pip install \
  git+https://github.com/William12556/mcp_omlx.git

3.2 From a local clone

From the repository root:

pip install -e .

This installs the package in editable mode. Any changes to server.py take effect on the next MCP client restart.

Return to Table of Contents


4 Configuration

Configuration is provided through environment variables.

Variable Default Description
OMLX_BASE_URL http://127.0.0.1:8000 oMLX server root. A trailing /v1 is accepted and normalized.
OMLX_API_KEY (unset) Optional. Sent as a Bearer token on every request when set.
OMLX_TIMEOUT 300 Request timeout in seconds.

Return to Table of Contents


5 Tools

Tool Method and Path Purpose
omlx_list_models GET /v1/models List available models by id or alias.
omlx_model_status GET /admin/api/models Report load state, memory size, and context window.
omlx_chat POST /v1/chat/completions Generate a chat completion.
omlx_completion POST /v1/completions Generate a text completion.
omlx_embeddings POST /v1/embeddings Generate embeddings.
omlx_load_model POST /admin/api/models/{id}/load Load a model into memory.
omlx_unload_model POST /admin/api/models/{id}/unload Unload a model from memory.

Detailed tool schemas are in the API reference. See Documentation.

Return to Table of Contents


6 Client Registration

Register the server with an MCP client by adding an entry to the client configuration. An example is provided in mcp.example.json. Use the absolute path to the virtual environment entry point:

{
  "mcpServers": {
    "omlx": {
      "command": "/Users/williamwatson/mcp-omlx/bin/omlx-mcp",
      "env": {
        "OMLX_BASE_URL": "http://127.0.0.1:8000"
      }
    }
  }
}

Return to Table of Contents


7 Documentation

Additional documentation is in the doc/ directory:

  • API Reference: tool schemas, parameters, and response shapes.
  • Deployment Guide: registration, authentication, and troubleshooting.

Return to Table of Contents


8 License

MIT License. See LICENSE.

Return to Table of Contents


9 Version History

Version Date Description
0.1.0 2026 June 03 Initial release. Seven tools: inference, inspection, lifecycle.
0.1.1 2026 June 03 Added GitHub installation method to README.

Return to Table of Contents


Copyright (c) 2026 William Watson. MIT License.