Skip to main content

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.

The /v1/mcp/servers endpoint reports the runtime status of every MCP server that oMLX is configured to connect to. Use this endpoint to verify that your MCP servers started successfully, identify connection errors, and confirm how many tools each server exposes. It is particularly useful for debugging MCP configuration issues without digging through server logs.
This endpoint requires oMLX to be started with --mcp-config /path/to/mcp.json. Without this flag, the endpoint returns an empty server list rather than an error.

Get MCP server status

GET /v1/mcp/servers

Example

curl http://localhost:8000/v1/mcp/servers

Response

servers
object[]
Array of MCP server status objects, one per server defined in the MCP config file.

Example response (all connected)

{
  "servers": [
    {
      "name": "filesystem",
      "state": "connected",
      "transport": "stdio",
      "tools_count": 8,
      "error": null
    },
    {
      "name": "fetch",
      "state": "connected",
      "transport": "stdio",
      "tools_count": 1,
      "error": null
    }
  ]
}

Example response (one server failed)

{
  "servers": [
    {
      "name": "filesystem",
      "state": "connected",
      "transport": "stdio",
      "tools_count": 8,
      "error": null
    },
    {
      "name": "my-db-server",
      "state": "error",
      "transport": "sse",
      "tools_count": 0,
      "error": "Connection refused: http://localhost:9000/sse"
    }
  ]
}

Example response (MCP not configured)

{
  "servers": []
}

MCP configuration

The MCP config file passed to --mcp-config uses oMLX’s own configuration format with a top-level servers key. Here is a minimal example for a filesystem server:
{
  "servers": {
    "filesystem": {
      "transport": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"],
      "enabled": true,
      "timeout": 30
    }
  },
  "max_tool_calls": 10,
  "default_timeout": 30.0
}
Start the server with:
omlx serve --model-dir ~/models --mcp-config ~/mcp.json
See GET /v1/mcp/tools and POST /v1/mcp/execute to list and execute the tools exposed by connected servers.

Build docs developers (and LLMs) love