JC

jingcheng-chen/rhinomcp

Developer tools
887 stars 0 forks 품질 94 트렌드 94

RhinoMCP connects Rhino 3D to AI Agent through the Model Context Protocol (MCP)

개요

RhinoMCP connects Rhino to AI agents through the Model Context Protocol, so assistants like Claude and Cursor can model geometry, read your document, and build Grasshopper definitions for you, just by chatting. - Describe what you want and the assistant builds it in Rhino. - It reads your document and can capture the viewport, so it works from what is actually on screen. - It scripts Grasshopper for you: finding components, wiring them, setting sliders, and solving. - A single plugin and a single config entry cover both Rhino and Grasshopper. - When you need more control, it can run native Rhino commands, RhinoScript-Python, or RhinoCommon C#. the AI writes and runs scripts inside Rhino. Prefer a walkthrough? Nate made a showcase and install tutorial on YouTube. Three steps: install the Rhino plugin, connect your AI client, then start the bridge in Rhino. In Rhino, open , search for , and click . Restart Rhino.

README


Highlights

  • Describe what you want and the assistant builds it in Rhino.
  • It reads your document and can capture the viewport, so it works from what is actually on screen.
  • It scripts Grasshopper for you: finding components, wiring them, setting sliders, and solving.
  • A single plugin and a single config entry cover both Rhino and Grasshopper.
  • When you need more control, it can run native Rhino commands, RhinoScript-Python, or RhinoCommon C#.

[!NOTE] RhinoMCP targets Rhino 8 on Windows and macOS.

Demos

Prefer a walkthrough? Nate made a showcase and install tutorial on YouTube.

What it can do

Rhino

Area What the AI can do
Create geometry Points, lines, polylines, circles, arcs, ellipses, curves, boxes, spheres, cones, cylinders, and surfaces, one at a time or in batches
Transform & edit Move, rotate, scale, recolor, rename, and delete objects
Advanced modeling Loft, extrude, sweep, offset, pipe; boolean union, difference, and intersection
Curve operations Project, intersect, and split curves
Layers & attributes Create, delete, and switch layers; read and write object attributes
Inspect & select Document summaries, object info, and filtered selection (by name, color, or category, with AND / OR logic)
See the model Capture the viewport so the AI gets visual feedback
Analyze Measure length, area, volume, bounding boxes, and more
Go deeper Run any Rhino command, execute RhinoScript-Python, or run RhinoCommon C#, with built-in RhinoScript docs lookup

Grasshopper

Area What the AI can do
Find components Search the installed component library and inspect a component’s inputs and outputs before placing it
Build canvases Add, position, lay out, update, and delete components
Wire it up Connect and disconnect parameters between components
Set & read values Drive sliders, toggles, panels, and value lists; read structured data back out of outputs
Solve Run the solution and surface runtime warnings and errors
Build in one shot Construct and wire a whole graph, or mutate an existing one, in a single batched operation

Quick start

Three steps: install the Rhino plugin, connect your AI client, then start the bridge in Rhino.

1. Install the Rhino plugin

In Rhino, open Tools → Package Manager, search for rhinomcp, and click Install. Restart Rhino.

2. Connect your AI client

If you use an agentic assistant (Codex, Claude Code, Cursor, Cline, and the like), paste this prompt:

Please install https://github.com/jingcheng-chen/rhinomcp as a local MCP server named `rhino`.

Option B: Install the mcp server or manually edit the config yourself

Codex, in one command:

codex mcp add rhino --env RHINO_MCP_HOST=127.0.0.1 -- uvx rhinomcp

Claude Code, in one command:

claude mcp add rhino -- uvx rhinomcp

ChatGPT: use Codex for the local setup above. ChatGPT apps/MCP connectors currently connect to remote MCP servers, not local stdio commands like uvx rhinomcp. If you want to build a ChatGPT app around RhinoMCP, use ChatGPT developer mode with a remote or tunneled MCP endpoint.

You can also manually edit the config yourself:

{
  "mcpServers": {
    "rhino": {
      "command": "uvx",
      "args": ["rhinomcp"],
      "env": {
        "RHINO_MCP_HOST": "127.0.0.1"
      }
    }
  }
}

[!IMPORTANT] The launcher uvx comes from uv. If you don’t have it yet: macOS brew install uv · Windows powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Run only one RhinoMCP server at a time (Codex, Claude, Cursor, etc. — not several at once).

3. Start the Rhino bridge

With Rhino open, type mcpstart in the command line. This starts the TCP bridge the server connects to (mcpstop ends it). Run it once per Rhino session.

Usage

With the bridge running and your client connected, you’ll see the RhinoMCP tools. From there, just chat: ask the assistant to model something, inspect your scene, or build a Grasshopper graph.

For Grasshopper, you only need Rhino open with mcpstart running. The assistant can open or create the Grasshopper document itself, then build the definition. For example: “create a point attractor pattern with cylinders that have different heights.”

Example prompts

Create 6×6×6 boxes on a 10-unit grid from the origin, sizes ramping from 1 to 5, with a blue-to-red gradient color based on size. Use RhinoScript Python.

Make a Rhinoceros animal out of cubic blocks in cartoon colors. Then change its head to red, and rotate the selected object 90° around the Z axis.

Create a point attractor pattern in Grasshopper: a grid of cylinders whose heights change with their distance from an attractor point, with a slider to move the point.

Tool reference

How it works

AI client ──MCP (stdio)──► rhinomcp (Python) ──TCP 127.0.0.1:1999──► Rhino plugin ──► Rhino + Grasshopper
  1. server/: a Python FastMCP server that exposes each tool and forwards it to Rhino.
  2. plugin/: a RhinoCommon C# plugin that runs a TCP listener inside Rhino and executes commands on the main thread. Start and stop it with the mcpstart / mcpstop Rhino commands.
  3. contracts/: JSON Schema definitions that keep the wire protocol between the two tiers in sync.

IMPLEMENTATION.md has a deeper tour of the code.

Security

The Python server and the Rhino plugin talk over an unauthenticated TCP loopback link (127.0.0.1:1999). Tools such as run_command, execute_rhinoscript_python_code, and execute_rhinocommon_csharp_code give the model an open execution surface inside Rhino. This is fine for local agent use. Do not expose it beyond the loopback interface without adding authentication.

For developers

Contributing

Contributions are welcome. Feel free to open an issue or submit a pull request.

Disclaimer

This is a third-party integration and is not made by McNeel. Built by Jingcheng Chen.

Star history

View this README on GitHub

설치

uvx rhinomcp

설정

{ "mcpServers": { "rhino": { "command": "uvx", "args": ["rhinomcp"], "env": { "RHINO_MCP_HOST": "127.0.0.1" } } } }