Control Rhino 3D and Grasshopper with AI, in plain language.
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.
Quick start · What it can do · Usage · Examples · Tool reference
English · 简体中文
For development of the autonomous improvement experiments, start with the continuation guide.
- 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.
|
Two-way interaction: the AI both creates and reads geometry. |
Custom scripts: the AI writes and runs scripts inside Rhino. |
Prefer a walkthrough? Nate made a showcase and install tutorial on YouTube.
| 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 |
| 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 |
Three steps: install the Rhino plugin, connect your AI client, then start the bridge in Rhino.
Requirements: Rhino 8.20 or later (Windows or Mac), running on .NET 8. The plugin is built only for .NET 8 and Rhino 8.20 is the first release that uses it by default; older Rhino versions can't load it.
In Rhino, open Tools → Package Manager, search for rhinomcp, and click Install. Restart Rhino.
mcpstart is an unknown command
Package Manager installs the package even when Rhino can't load the plugin inside it, and Rhino
doesn't say why. If mcpstart is unknown after a restart:
- Check Tools → Options → Plug-ins (Mac: Rhino → Settings → Plug-ins). If RhinoMCP is missing or not loaded, continue below.
- Update Rhino 8 to the latest service release (Help → Check for Updates);
SystemInfoshows your version, which must be 8.20 or later. - On Windows, run
SetDotNetRuntime, chooseNETCore, and restart Rhino. Rhino running on .NET Framework can't load the plugin.SystemInfoshows the runtime in use (it should say .NET 8).
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`.
Codex, in one command:
codex mcp add rhino --env RHINO_MCP_HOST=127.0.0.1 -- uvx rhinomcp@latestClaude Code, in one command:
claude mcp add rhino -- uvx rhinomcp@latestChatGPT: 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@latest"],
"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).
Auto-restart the server with your AI client (optional)
To clean up a stale rhinomcp process each time your client launches:
macOS / Linux
{
"mcpServers": {
"rhino": {
"command": "sh",
"args": ["-c", "killall rhinomcp 2>/dev/null; uvx rhinomcp@latest"]
}
}
}Windows
{
"mcpServers": {
"rhino": {
"command": "cmd",
"args": ["/c", "taskkill /F /IM rhinomcp.exe 2>nul & uvx rhinomcp@latest"]
}
}
}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.
mcpstatus prints the port, the document and the connected clients. On Windows, mcpwindow opens
the tray window that lists every running Rhino (see "Several Rhino instances at once").
Several Rhino instances at once
Each Rhino runs its own bridge on its own port. Without a port, mcpstart takes the first free one
from 1999 to 2008, so the first Rhino keeps 1999 and the next one gets 2000. To pin a port, use
-mcpstart Port=2000 (in a startup macro: _-mcpstart _Port=2000 _Enter), or start Rhino with the
RHINO_MCP_PORT environment variable set. The port appears in the command line, in mcpstatus
and, on Windows, at the start of the window title ([MCP:2000] Rhinoceros 8).
Give the MCP client one server entry per instance, differing only in RHINO_MCP_PORT:
{
"mcpServers": {
"rhino": { "command": "uvx", "args": ["rhinomcp"], "env": { "RHINO_MCP_PORT": "1999" } },
"rhino-2": { "command": "uvx", "args": ["rhinomcp"], "env": { "RHINO_MCP_PORT": "2000" } }
}
}If the port is taken, mcpstart says so and starts nothing rather than reaching the wrong Rhino.
On Windows, mcpstart also puts a RhinoMCP icon in the notification area. One icon serves every
Rhino: click it (or run mcpwindow) for a list of the running instances with their port, the MCP
entry that reaches each one (read from ~/.claude.json), the open Rhino and Grasshopper documents,
and the connected clients with their latest command. Clicking an instance brings that Rhino to the
front. Each Rhino writes its state to %LOCALAPPDATA%\RhinoMCP\instances; the icon goes away once
no Rhino runs a server.
RhinoMCP has three parts that update separately:
- Python server.
uvx rhinomcp@latestasks PyPI for the newest release every time your client starts the server; plainuvx rhinomcpkeeps the first version it downloaded. If you work offline, install it once withuv tool install rhinomcpand runuv tool upgrade rhinomcpwhen convenient. - Rhino plugin. Installed through the Package Manager, Rhino checks for updates at startup and
installs them when "Automatically update packages when Rhino starts" is enabled; the new version
loads on the next restart. A plugin installed by dragging a
.rhpinto Rhino is not updated. - AI client. It reads the tool list when it launches the server, so restart the client (or reconnect the server) after an update.
The server reads the plugin's version when it connects and warns in its log when the two differ.
A tool that needs a newer plugin fails with an update instruction instead of silently doing
something else, and describe_capabilities reports both versions.
rhinomcp doctor runs in a terminal, without an AI client. It checks the launch command your
client is configured with and the Rhino bridge the server would connect to. It reads only: it never
runs the launch command, and it sends Rhino two read-only commands. It also asks PyPI and Yak for
the newest published server and plugin versions. --offline skips those two lookups.
Put the launch command from your client config after --.
# Packaged server
uvx rhinomcp@latest doctor -- uvx rhinomcp@latest
# Source checkout (for example a Codex entry that uses uv --directory)
uv --directory /path/to/rhinomcp/server run rhinomcp doctor -- uv --directory /path/to/rhinomcp/server run rhinomcpThe endpoint comes from RHINO_MCP_HOST and RHINO_MCP_PORT, the same way the server reads
them. Set them the way your client config does when it uses a port other than 1999. --json
prints one JSON object for scripts. --timeout SECONDS limits the connect, each read and each
release lookup (default 3). The exit status is 1 when a check fails and 0 otherwise.
| Check | Code | Meaning |
|---|---|---|
| launch | launch_ok |
The executable and any --directory / --project path exist. |
| launch | launch_executable_not_found |
The executable is not on PATH, or its path is not an executable file. Fix the command in the client config or install it. |
| launch | launch_directory_not_found |
A --directory or --project path does not exist. The client config points at a moved or deleted checkout. |
| bridge | bridge_ok |
A RhinoMCP bridge answers at the endpoint. |
| bridge | bridge_unreachable |
Nothing listens at the endpoint. Open a Rhino document, run mcpstart, and confirm the port with mcpstatus. |
| bridge | bridge_not_rhinomcp |
Something listens there, but it is not RhinoMCP. Check mcpstatus for Rhino's real port. |
| versions | versions_match |
Server and plugin have the same version. |
| versions | version_skew |
Warning. The versions differ. The fix line names the side to update. |
| versions | version_unknown |
Warning. One side did not report a version. |
| document | document_ok |
The document the bridge reaches: its name or untitled document, and its object count. |
| document | document_unavailable |
The document could not be read. A warning when the plugin is too old to report it, otherwise a failure. |
| server_release, plugin_release | release_current |
The installed version is the newest published one. |
| server_release, plugin_release | release_available |
Warning. A newer release is published. The fix line says how to update. |
| server_release, plugin_release | release_unknown |
Warning. PyPI or Yak could not be read, or the installed version is unknown. |
The versions, document and plugin_release checks appear only when the bridge check passes. Warnings never change the exit status.
Smoke check against a live Rhino:
- Open Rhino with a document and run
mcpstart. - Run
rhinomcp doctor. Expect[ok] bridgeand a document line such as[ok] document: untitled document, 0 objects. - Run
mcpstatusin Rhino. Itslistening on host:portmust match the endpoint in the first line of the doctor output. - Run
mcpstop, then runrhinomcp doctoragain. Expect[fail] bridgewith the codebridge_unreachable(shown by--json) and exit status 1.
This repository is also a Claude Code plugin marketplace. The rhinomcp plugin adds three agents
(rhino-modeler, rhino-inspector and grasshopper-builder) and two commands: /scene
summarizes the open document and /snapshot [display mode] captures the viewport and reports what
it shows.
claude plugin marketplace add jingcheng-chen/rhinomcp
claude plugin install rhinomcp@rhinomcpInside a Claude Code session the same steps are /plugin marketplace add jingcheng-chen/rhinomcp
and /plugin install rhinomcp@rhinomcp. The plugin does not start the MCP server: configure it
as rhino as described in step 2 above, since the agents call tools named mcp__rhino__*.
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."
One undo step for a multi-step change
Rhino records one undo step per tool call, so taking back an agent's work can take many presses of
Undo. Between begin_undo_group and end_undo_group, every change to the document is one undo step,
listed as MCP: <name>. An agent can call the two tools around a multi-step edit. A host that knows
where an agent turn starts and ends can send the same commands over the bridge itself, each as one
length-prefixed frame (see contracts/README.md). Put the same "session" string on every envelope
so the group stays the host's across reconnects; without one the group belongs to the connection and
ends when it closes:
{"type": "begin_undo_group", "params": {"name": "Agent turn: build the chair"}, "session": "host-7f3a"}
{"type": "end_undo_group", "params": {}, "session": "host-7f3a"}Groups do not nest. While one is open, undo and redo are refused, and edits the user makes in
Rhino or another client makes join the group. The plugin ends a group by itself after
idle_timeout_seconds (default 120) without a command from the client that began it, when a client
without a session disconnects, or when the document is closed or another document becomes active;
the owner's next change then carries an _undo_group block saying so. end_undo_group with
force: true ends a group whose client is gone.
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.
Rhino tools
| Tool | Purpose |
|---|---|
create_object / create_objects |
Create one or many objects |
modify_object / modify_objects |
Transform or edit one or many objects |
delete_object |
Delete an object |
boolean_union / boolean_difference / boolean_intersection |
Boolean operations |
loft / extrude_curve / sweep1 / offset_curve / pipe |
Advanced surface and solid modeling |
project_curve / intersect_curves / split_curve |
Curve operations |
analyze_objects |
Measure length, area, volume, bounding boxes, and more |
select_objects |
Select by ids, layer, type, hidden, locked, name, color, custom attributes; AND / OR |
get_objects |
List by ids, layer, type, bbox or selection; hidden and locked switches; paged |
get_object_info / get_selected_objects_info |
Query objects |
get_object_attributes / update_object_attributes |
Read and write object attributes |
create_layer / delete_layer / get_or_set_current_layer |
Layer management |
get_context |
Bounded snapshot: units, layer, selection, camera |
get_document_summary |
Overview of the current document |
capture_viewport |
Image + metadata; display mode, camera, framing, JPEG |
set_camera |
Set camera location, target, up, lens, projection |
zoom_to |
Frame all, the selection, object ids or a layer |
run_command |
Run any native Rhino command |
execute_rhinoscript_python_code |
Execute RhinoScript-Python |
execute_rhinocommon_csharp_code |
Execute RhinoCommon C# |
search_rhinoscript_functions / get_rhinoscript_docs / list_rhinoscript_modules / get_module_functions |
RhinoScript API docs lookup |
get_commands |
List available commands |
undo / redo |
Undo and redo |
begin_undo_group / end_undo_group |
Make several edits one undo step |
get_last_change_result |
What your last change did, after a timeout |
Grasshopper tools
| Tool | Purpose |
|---|---|
gh_create_document / gh_get_document_info / gh_get_canvas_state |
Document and canvas inspection |
gh_search_components / gh_batch_search_components |
Search the component library |
gh_list_component_categories / gh_get_available_components |
Browse installed components |
gh_get_component_type_info / gh_get_component_info |
Inspect a component type or instance |
gh_list_components |
List components on the canvas |
gh_add_component / gh_update_component / gh_delete_component |
Add, update, or delete components |
gh_layout_components |
Auto-lay-out the canvas |
gh_clear_canvas |
Clear the canvas |
gh_connect_components / gh_disconnect_components |
Wire or unwire parameters |
gh_set_parameter_value / gh_get_parameter_value |
Drive inputs, read outputs |
gh_run_solution / gh_expire_solution |
Solve or expire the solution |
gh_build_graph / gh_mutate_graph |
Build or mutate a whole graph in one batched call |
gh_get_graph / gh_clear_graph |
Inspect or clear objects by graph id |
AI client ──MCP (stdio)──► rhinomcp (Python) ──TCP 127.0.0.1:1999──► Rhino plugin ──► Rhino + Grasshopper
server/: a Python MCP server (official Python SDK 2.x) that exposes each tool and forwards it to Rhino.plugin/: a RhinoCommon C# plugin that runs a TCP listener inside Rhino and executes commands on the main thread. Start and stop it with themcpstart/mcpstopRhino commands.contracts/: JSON Schema definitions that keep the wire protocol between the two tiers in sync.
IMPLEMENTATION.md has a deeper tour of the code.
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.
See SECURITY.md for the full threat model and how to report a vulnerability.
Operator switches (environment variables)
| Variable | Default | Effect |
|---|---|---|
RHINO_MCP_HOST |
127.0.0.1 |
Connect target. Refuses non-loopback hosts unless RHINO_MCP_ALLOW_REMOTE=1. |
RHINO_MCP_PORT |
1999 |
TCP port. Also read by mcpstart in Rhino. |
RHINO_MCP_ENABLE_RUN_COMMAND |
1 |
Set 0 to disable the run_command tool. |
RHINO_MCP_ENABLE_RHINOSCRIPT |
1 |
Set 0 to disable RhinoScript-Python execution. |
RHINO_MCP_ENABLE_CSHARP |
1 |
Set 0 to disable RhinoCommon C# execution. |
RHINO_MCP_VALIDATE |
warn |
Pre-flight schema validation: off / warn / strict. |
RHINO_MCP_TIMEOUT |
15.0 |
Seconds to wait for Rhino's answer. Batch and Grasshopper build/solve tools wait at least 60. |
RHINO_MCP_DEBUG |
0 |
Verbose logging. |
Build, test, and publish
Python server (run from server/)
uv venv && uv pip install -e ".[dev]" # set up
uv run pytest # run tests (no Rhino needed; uses a mock server)
uv run ruff check src/rhinomcp # lint
uv run python ../contracts/test_schemas.py # validate JSON schemas
uv build && uv publish # publish to PyPIC# plugin
dotnet restore plugin/rhinomcp.sln
dotnet build plugin/rhinomcp.sln --configuration ReleaseTo try a plugin you built yourself, first uninstall the RhinoMCP package in Package Manager, then
drag plugin/bin/Release/net8.0/rhinomcp.rhp into a Rhino window, or install it
from the Plug-ins page in Rhino's options. Restart Rhino and run mcpstart.
Publishing is only for the package owner: build in Release, copy manifest.yml into
bin/Release, then run yak build and yak push rhinomcp_xxxx.yak. On a fork, yak push fails
with 403 because the rhinomcp package name belongs to its owner; you don't need it to build or
use the plugin.
Contributions are welcome. Feel free to open an issue or submit a pull request.
This is a third-party integration and is not made by McNeel. Built by Jingcheng Chen.
The Python package includes reusable guidance for transforms, planar regions,
organization, verification and recovery. Use get_modeling_guidance("overview"),
the asset_general_strategy MCP prompt, or the rhinomcp://guidance/{topic} resource.
Essential tool semantics stay in tool descriptions. No local experiment folder or
separate skill is needed. See packaged guidance
for available topics and release details.



