Skip to main content

AI-powered Rhino3D MCP bridge — connect Claude to Rhinoceros 3D

Project description

keratin

Connect Claude AI to Rhinoceros 3D.

keratin is a Model Context Protocol bridge for Rhino 7. It lets Claude create geometry, manage layers, run boolean operations, drive Grasshopper, and execute arbitrary RhinoScript — all from a conversation.


How it works

keratin has two components that communicate over a local TCP socket:

Claude ──MCP──▶ keratin (Python 3.10+)  ──TCP:9876──▶  rhino_script.py (Rhino 7, IronPython 2.7)
Component Runtime Role
rhino_script.py IronPython 2.7 inside Rhino Listens on localhost:9876, executes commands on Rhino's UI thread
keratin (MCP server) Python 3.10+ on the host Exposes 40+ tools to Claude via the Model Context Protocol

Installation

1. Rhino-side script (Rhino Package Manager)

In Rhino: Tools > Package Manager > search keratin > Install > Restart Rhino.

2. MCP server (pip)

pip install keratin

3. Configure your MCP client

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "rhino": {
      "command": "keratin"
    }
  }
}

Claude Code:

claude mcp add rhino -- keratin

4. Load the listener in Rhino

Run RunPythonScript and select the installed rhino_script.py.

Auto-start on launch (optional): Tools > Options > General > Startup Commands > add:

RunPythonScript "C:\path\to\rhino_script.py"

Tools

Category Tools
Scene get_document_summary get_rhino_scene_info get_rhino_layers capture_rhino_viewport
Objects get_objects get_object_info create_object modify_object delete_object select_objects add_rhino_object_metadata get_rhino_objects_with_metadata get_rhino_selected_objects get_selected_objects_info
Layers create_layer delete_layer get_or_set_current_layer
Geometry boolean_union boolean_difference boolean_intersection loft extrude_curve sweep1 offset_curve pipe
Curves trim_curve join_curves curve_domain trim_curve_by_fraction
Jewelry ring_blank head_blank section_profile place_head_on_band edge_selector_presets safe_boolean_union safe_boolean_difference loft_sections
Grasshopper grasshopper_add_components grasshopper_get_definition_info grasshopper_run_solver grasshopper_clear_canvas grasshopper_list_available_components
Code execute_rhino_code execute_rhinoscript_python_code
Discovery list_rhino_commands list_rhinoscript_functions look_up_RhinoScriptSyntax

Requirements

  • Rhinoceros 3D 7 (IronPython 2.7)
  • Python 3.10+ on the host machine
  • Claude Desktop or Claude Code as the MCP client

Web server variant

For HTTP / WebSocket access instead of stdio MCP:

keratin-web --host localhost --port 8000
Endpoint Description
POST /rhino/command Execute a Rhino command ({"type": "...", "params": {...}})
GET /rhino/scene Get current scene info
GET /rhino/strategy Get the recommended Rhino creation strategy
WS /rhino/ws WebSocket for streaming command execution

CORS is restricted to localhost origins.


Diagnostics

# Test the Rhino TCP connection
python tools/ops/diagnose_rhino_connection.py

# View recent errors across all logs
python tools/ops/log_manager.py --since-minutes 60 --level ERROR

Log locations:

Source Location
Rhino listener ~/AppData/Local/RhinoMCP/logs/ (Windows) or ~/Library/Application Support/RhinoMCP/logs/ (macOS)
Server ./logs/server/
Diagnostics ./logs/diagnostics/

Rhino-side logs auto-rotate at 5 MB.


Building and publishing

PyPI (MCP server):

python -m build
python -m twine upload dist/*

Yak (Rhino Package Manager):

cd yak-package
"C:\Program Files\Rhino 7\System\yak.exe" build
"C:\Program Files\Rhino 7\System\yak.exe" push keratin-0.1.0-any-any.yak

Requires a McNeel account. Run yak login before your first push.


Attribution

keratin builds on:

  • rhino-mcp by Reer — MIT License
  • rhinomcp by Jingcheng Chen — Apache License 2.0

See THIRD_PARTY_NOTICES.md and the preserved license texts under third_party/.


Disclaimer

Not affiliated with McNeel & Associates. Use at your own risk. Always work on copies of important files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keratin-0.1.3.tar.gz (71.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keratin-0.1.3-py3-none-any.whl (79.7 kB view details)

Uploaded Python 3

File details

Details for the file keratin-0.1.3.tar.gz.

File metadata

  • Download URL: keratin-0.1.3.tar.gz
  • Upload date:
  • Size: 71.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for keratin-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8f37c3996402aa835b29e5a1319891a9007a5685ac0243f1fbcf03c7dd2831ee
MD5 5676bf73ced630f4d83247d55a71610c
BLAKE2b-256 7c0f7a0db00e737c65f69f185c9ea6ba5f7aa2b2b8e39839bbd424dd24af9729

See more details on using hashes here.

File details

Details for the file keratin-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: keratin-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 79.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for keratin-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 28554808a168c192416fa73baf82e6ccc94ad1fb281f43faf129eeb85dd52676
MD5 9e56be6eb778d5cb66c0862b9e35a613
BLAKE2b-256 752efd010969579476f8adaa600ee5b161063e4f09d91d9e074b239acfc023ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page