Skip to content

Local AI Agent (MCP)

crisprintsstuff edited this page Nov 5, 2026 · 1 revision

Local AI Agent (MCP Integration)

OxyBrush features native integration with the Model Context Protocol (MCP), an open industry standard that connects AI assistants directly to local developer and artistic tools.

With OxyBrush's MCP server, AI models (such as Claude Desktop, Antigravity, Cursor, or local LLMs) can inspect your 3D mesh, execute sculpting strokes, generate procedural primitives, perform voxel remeshing, and automate repetitive production tasks in tandem with you.


How It Works

+------------------------------------+
|         AI Assistant               |
|  (Claude Desktop / Antigravity)    |
+-----------------+------------------+
                  |
         JSON-RPC | Model Context Protocol
                  v
+------------------------------------+
|    OxyBrush MCP Server Adapter     |
|   (crates/oxy-mcp / oxybrush-mcp)  |
+-----------------+------------------+
                  |
     Direct Engine| IPC / C-ABI / Memory
                  v
+------------------------------------+
|       OxyBrush 3D Viewport         |
|  (Multires / Voxel Engine / wgpu)  |
+------------------------------------+

The AI assistant acts like a collaborative pair sculptor sitting next to you. It cannot read your screen or tamper with external systems—it interacts strictly through defined, safe tool primitives exposed by the OxyBrush MCP protocol.


Configuring Your AI Client

Claude Desktop Setup

To connect Claude Desktop to OxyBrush:

  1. Open your Claude Desktop configuration file:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the oxybrush entry under mcpServers:
{
  "mcpServers": {
    "oxybrush": {
      "command": "oxybrush-mcp",
      "args": []
    }
  }
}

Note: Ensure oxybrush-mcp is in your system PATH, or provide the full absolute path to the executable.

  1. Restart Claude Desktop. You will see the hammer / tool icon with OxyBrush tools available in the prompt bar.

Antigravity & Cursor Setup

In your project root or user settings:

{
  "mcp": {
    "servers": {
      "oxybrush": {
        "command": "/usr/local/bin/oxybrush-mcp"
      }
    }
  }
}

Available MCP Tools

The OxyBrush MCP server exposes the following tools to the AI:

1. get_mesh_stats

Returns active polygon metrics, bounding dimensions, piece count, and current multiresolution level.

  • AI Prompt Example: "Can you check the current triangle count of my sculpt?"

2. add_primitive

Spawns geometric primitives into the active 3D scene.

  • Parameters:
    • primitive_type: "sphere", "cube", "cylinder".
    • position: [x, y, z] coordinates.
    • radius: float scaling dimension.
  • AI Prompt Example: "Add two small ear spheres at [0.6, 1.2, 0.0] and [-0.6, 1.2, 0.0]."

3. apply_stroke

Performs continuous sculpting brush passes along a set of 3D spatial points.

  • Parameters:
    • brush: "Clay", "Smooth", "Inflate", "Draw", "Carve".
    • points: Array of [x, y, z] 3D positions along the trajectory.
    • radius: Stroke size.
    • strength: Stroke intensity.
  • AI Prompt Example: "Carve a smile across the lower front of the face."

4. voxel_remesh

Executes an OpenVDB-style signed distance field remesh.

  • Parameters:
    • voxel_size: Float spatial resolution (e.g., 0.02).
  • AI Prompt Example: "Fuse these intersecting primitives together with a clean voxel remesh."

5. decimate

Optimizes polygon count using quadric error metrics.

  • Parameters:
    • target_triangles: Integer target count (e.g., 50000).
  • AI Prompt Example: "Optimize this 2-million polygon sculpt down to 80,000 triangles for 3D printing."

6. export_mesh

Saves the scene to disk.

  • Parameters:
    • path: Output file path.
    • format: "glb", "gltf", "obj", "stl", "ply".
  • AI Prompt Example: "Export the current mesh as an STL to my Downloads folder."

Example Tandem Sculpting Workflows

Here are real-world ways artists use AI agents in OxyBrush:

  1. Procedural Anatomy Blockouts:

    "Claude, add a ribcage oval, a pelvic sphere, and two cylindrical arm armatures, then run a voxel union so I can begin detailing."

  2. Automated LOD Chains for Game Engines:

    "Inspect my sculpt, export the full-resolution GLB as hero_lod0.glb, decimate to 50% and export as hero_lod1.glb, and decimate to 10% as hero_lod2.glb."

  3. 3D Print Watertightness Check:

    "Check if my current mesh has self-intersections or open boundary edges, and remesh if necessary before exporting an STL for Bambu Studio."

Clone this wiki locally