The Model Context Protocol (MCP) is an open standard that lets LLMs call external tools — reading files, querying databases, running web searches, and more — without custom application glue code. oMLX integrates MCP at the server level, so any client connected to your oMLX endpoint automatically has access to the tools you configure. Tool calls are resolved server-side and the results are injected into the conversation before the next generation step.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jundot/omlx/llms.txt
Use this file to discover all available pages before exploring further.
Installing MCP support
MCP support is an optional dependency. Install it using the method that matches how you installed oMLX.- Homebrew
- pip / from source
Starting the server with MCP
Pass your MCP config file toomlx serve via --mcp-config:
OMLX_MCP_CONFIG env var → ./mcp.json → ~/.config/omlx/mcp.json.
Config file format
Create amcp.json file to define which MCP servers to connect. The example below mirrors the mcp.example.json shipped with oMLX:
Top-level fields
| Field | Type | Description |
|---|---|---|
max_tool_calls | integer | Maximum number of tool call rounds per request (default: 10) |
default_timeout | float | Default per-call timeout in seconds (default: 30.0) |
Server fields
| Field | Type | Description |
|---|---|---|
transport | string | stdio or sse |
command | string | Executable to run (stdio only, e.g. npx, uvx) |
args | array | Arguments for the command (stdio only) |
url | string | SSE endpoint URL (sse only) |
enabled | boolean | Whether to connect this server at startup |
timeout | integer | Per-server timeout override in seconds |
Transport types
stdio
stdio
oMLX spawns the MCP server as a child process and communicates via stdin/stdout. Use this for local tool servers installed via
npx or uvx. The command and args fields are required.sse
sse
oMLX connects to an already-running MCP server via Server-Sent Events over HTTP. Use this for remote or separately managed tool services. The
url field is required; command and args are ignored.MCP API endpoints
When MCP is configured, oMLX exposes three additional REST endpoints for inspecting and manually invoking tools:| Method | Endpoint | Description |
|---|---|---|
GET | /v1/mcp/tools | List all tools from all connected MCP servers |
GET | /v1/mcp/servers | Get connection status of each configured MCP server |
POST | /v1/mcp/execute | Execute a specific MCP tool by name |
If the server was not started with
--mcp-config, /v1/mcp/execute returns HTTP 503. The tools and servers endpoints return empty lists rather than an error.