Skip to Content
OchreML

Connect ochreml mcp

Connect the zero-dependency OchreML MCP server to Claude Desktop, Cursor, Windsurf, and Antigravity.

ochreml mcp exposes OchreML's classical ML, deep learning (nn.Sequential), AutoML, dataset profiling, and .dit model inspection tools over the Model Context Protocol (MCP) using JSON-RPC 2.0 over stdio (^▽^).

Because ochreml ships with zero external Python dependencies, the server starts directly from Python's standard library and the compiled Rust extension—no Node.js runtime, no fastmcp package, and no background daemon required.

Prerequisites

Install ochreml in your environment, or run it ephemerally with uvx:

# Option 1: Install into your active Python environment
pip install ochreml

# Option 2: Verify ephemeral execution with uvx (no global install needed)
uvx --from ochreml ochreml info --json

Always pass --root <dir> (or set OCHREML_MCP_ROOT) so the MCP server can only read datasets and write .dit models inside your chosen workspace directory.

Quick Smoke Test

You can test the server locally from your terminal by piping a JSON-RPC initialize request over stdin:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | ochreml mcp --root ./workspace

You should see a single compact JSON-RPC response on stdout advertising protocolVersion: "2024-11-05" and serverInfo.name: "ochreml-mcp".


Client Configuration

Pick your MCP host below and replace /path/to/ml-workspace with the directory containing your datasets and .dit model files.

Claude Desktop

Add ochreml to claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Using an installed ochreml binary:

{
  "mcpServers": {
    "ochreml": {
      "command": "ochreml",
      "args": ["mcp", "--root", "/path/to/ml-workspace"]
    }
  }
}

Or zero-install via uvx:

{
  "mcpServers": {
    "ochreml": {
      "command": "uvx",
      "args": ["--from", "ochreml", "ochreml", "mcp", "--root", "/path/to/ml-workspace"]
    }
  }
}

Restart Claude Desktop after saving the file.

Cursor

Create or edit .cursor/mcp.json in your project root (or ~/.cursor/mcp.json globally):

{
  "mcpServers": {
    "ochreml": {
      "command": "ochreml",
      "args": ["mcp", "--root", "${workspaceFolder}"],
      "env": {
        "OCHREML_DEBUG": "0"
      }
    }
  }
}

If ochreml is installed inside a specific virtual environment, point "command" to /path/to/.venv/bin/ochreml or use uvx:

{
  "mcpServers": {
    "ochreml": {
      "command": "uvx",
      "args": ["--from", "ochreml", "ochreml", "mcp", "--root", "${workspaceFolder}"]
    }
  }
}

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json and register the ochreml server:

{
  "mcpServers": {
    "ochreml": {
      "command": "uvx",
      "args": ["--from", "ochreml", "ochreml", "mcp", "--root", "/path/to/ml-workspace"]
    }
  }
}

Reload MCP servers in Windsurf from the Cascade MCP panel.

Antigravity

Add ochreml to your Antigravity MCP server configuration (~/.gemini/antigravity/mcp_config.json):

{
  "mcpServers": {
    "ochreml": {
      "command": "ochreml",
      "args": ["mcp", "--root", "/path/to/ml-workspace"]
    }
  }
}

You can also launch via python -m ochreml mcp --root /path/to/ml-workspace if your host environment does not put Python script entry points on PATH.


First Agent Workflow

Once connected, try asking your AI assistant:

  1. "Check my hardware capabilities with ochreml_device_info."
  2. "Profile data/housing.csv with target price using ochreml_dataset_profile."
  3. "Run 3-fold AutoML comparison on data/housing.csv targeting price and save the best model to models/housing_best.dit."
  4. "Verify models/housing_best.dit and inspect its .dit header and metadata."

The assistant will invoke ochreml_device_info, ochreml_dataset_profile, ochreml_compare, ochreml_verify_dit, and ochreml_inspect_dit inside your contained root directory (*≧ω≦*).

Next Steps

On this page