Created: 2026 June 03
A Model Context Protocol (MCP) server providing access to a local oMLX inference server. Exposes seven tools covering inference, inspection, and model lifecycle management.
- Overview
- Requirements
- Installation
- Configuration
- Tools
- Client Registration
- Documentation
- License
- Version History
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.
- Python 3.10 or later
- A running oMLX server reachable over HTTP
- The
mcp,httpx, andpydanticpackages (installed automatically)
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.gitFrom 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.
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. |
| 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.
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"
}
}
}
}Additional documentation is in the doc/ directory:
- API Reference: tool schemas, parameters, and response shapes.
- Deployment Guide: registration, authentication, and troubleshooting.
MIT License. See LICENSE.
| 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. |
Copyright (c) 2026 William Watson. MIT License.