RhinoMCP
Enables AI-driven 3D modeling, analysis, diagnostics, and Grasshopper integration within Rhino 3D through 90+ tools via the Model Context Protocol.
README
RhinoMCP: an MCP Server for Rhino 3D
105 tools for AI-driven 3D modeling, analysis, diagnostics, and Grasshopper integration via the Model Context Protocol.
RhinoMCP connects Claude to Rhino 3D through a comprehensive set of tools covering everything from basic primitives to advanced surface modeling (loft, sweep, revolve), boolean operations, mesh diagnostics, block management, and parametric design with Grasshopper.
Architecture
┌────────────────┐ stdio ┌──────────────┐ TCP/JSON ┌──────────────┐
│ Claude Desktop │◄──────────►│ rhino_mcp │◄─────────────►│ Rhino 3D │
│ │ (MCP) │ (Python) │ localhost: │ listener.py │
│ │ │ server.py │ 9876 │ (inside │
└────────────────┘ └──────────────┘ │ Rhino) │
└──────────────┘
MCP Server (rhino_mcp/). Python package using FastMCP. Communicates with Claude via stdio and with Rhino via TCP.
Rhino Listener (rhino/listener.py). Python script that runs inside Rhino. Opens a TCP server, receives JSON commands, executes them using RhinoCommon/rhinoscriptsyntax, and returns results.
Capabilities
Geometry Creation (21 tools)
| Tool | Description |
|---|---|
create_point, create_points |
Single or batch point creation |
create_line, create_polyline |
Lines and polylines |
create_curve |
Interpolated NURBS curves |
create_circle, create_arc, create_ellipse |
Circular geometry |
create_rectangle |
Rectangular polylines |
create_sphere, create_box, create_cylinder, create_cone, create_torus |
Solid primitives |
create_extrusion, create_pipe |
Extrude and pipe along curves |
create_surface_from_points, create_mesh |
NURBS surfaces and meshes |
create_text |
Text dots |
create_loft |
Loft surfaces through cross-sections |
create_sweep1, create_sweep2 |
Single and two-rail sweeps |
create_revolve |
Revolve profiles around an axis |
create_planar_surface, create_patch |
Planar and patch surfaces |
Transforms (8 tools)
move, rotate, scale, scale_non_uniform, mirror, copy, array_linear, array_polar
Boolean Operations (3 tools)
boolean_union, boolean_difference, boolean_intersection
Modification (18 tools)
| Tool | Description |
|---|---|
delete, set_color, set_material, set_name, set_layer |
Basic modifications |
group, ungroup |
Grouping |
join, explode |
Join and explode geometry |
trim, split |
Trim and split curves |
offset_curve, offset_surface |
Offset geometry |
fillet_edge, chamfer_edge, fillet_curves |
Edge treatments |
cap_planar_holes |
Cap open breps |
extend_curve, rebuild_curve |
Curve editing |
project_to_surface |
Project curves onto surfaces |
duplicate_edge, duplicate_border |
Extract edges/borders |
Blocks & Instances (4 tools)
create_block, insert_block, list_blocks, explode_block
User Data (2 tools)
set_user_text, get_user_text: store metadata, BIM data, costs, etc.
Layers (6 tools)
list_layers, create_layer, delete_layer, set_layer_color, set_layer_visibility, set_current_layer
Materials (3 tools)
list_materials, create_material, assign_material
Analysis (10 tools)
| Tool | Description |
|---|---|
get_bounding_box, get_area, get_volume, get_length |
Measurements |
distance, closest_point |
Spatial queries |
intersect |
Find intersections between objects |
get_curvature |
Curvature analysis |
is_point_on_surface, is_point_in_solid |
Point containment tests |
Diagnostics (4 tools)
| Tool | Description |
|---|---|
check_objects |
Check validity, find bad geometry |
get_naked_edges |
Find gaps in surfaces |
check_mesh |
Mesh quality analysis |
repair_mesh |
Fix mesh issues automatically |
View (5 tools)
zoom_extents, set_view, capture_view (with base64 option), list_views, set_display_mode
Grasshopper (3 tools)
gh_run_script, gh_set_slider, gh_get_outputs
Code Execution (2 tools)
run_python, run_command: full access to rhinoscriptsyntax and RhinoCommon
Undo/Redo (2 tools)
undo, redo
Scene (4 tools)
scene_info, get_objects, get_object (detailed with edge info), select_objects
Import/Export (2 tools)
export (.3dm, .obj, .stl, .step, .iges, .fbx), import_file
Bold = new in v2.0
Prerequisites
- Rhino 7 or 8 (Windows or Mac)
- Python 3.10+
- uv package manager (install)
Installation
1. Clone and install
git clone https://github.com/kbangaru-cyber/rhino-mcp.git
cd Rhino_MCP
uv sync
2. Start the Rhino listener
In Rhino:
- Go to Tools > PythonScript > Run
- Select
rhino/listener.py - You should see:
============================================================
RhinoMCP Listener v2.0.0
Listening on 127.0.0.1:9876
Registered handlers: 90
Ready for MCP connection (Claude)
============================================================
3. Configure Claude Desktop
Claude Desktop
Edit claude_desktop_config.json:
{
"mcpServers": {
"rhino": {
"command": "uv",
"args": ["--directory", "/ABSOLUTE/PATH/TO/Rhino_MCP", "run", "rhino-mcp"],
"env": {
"RHINO_MCP_HOST": "127.0.0.1",
"RHINO_MCP_PORT": "9876",
"RHINO_MCP_TIMEOUT": "30"
}
}
}
}
Usage Examples
Create a simple building form
"Create a 10x8x4 meter box for the building volume, then add a cylinder of radius 2 and height 6 at the center for a tower. Union them together and fillet all edges with radius 0.3."
Diagnose model problems
"Check all objects in the scene for problems. Find any naked edges and tell me what needs fixing."
Parametric design
"Create a vase shape by making a profile curve and revolving it. Then create a polar array of decorative cylinders around it."
Built-in Prompts
RhinoMCP includes guided workflow prompts:
model-from-description: structured workflow for creating 3D models from text descriptionsdiagnose-model: systematic approach to finding and fixing model problemsparametric-design: guide for Grasshopper/parametric workflows
Resources
The server exposes live data as MCP resources:
| URI | Description |
|---|---|
rhino://scene/info |
Current scene overview |
rhino://layers |
Layer tree |
rhino://materials |
Material list |
rhino://blocks |
Block definitions |
Configuration
| Environment Variable | Default | Description |
|---|---|---|
RHINO_MCP_HOST |
127.0.0.1 |
Rhino listener host |
RHINO_MCP_PORT |
9876 |
Rhino listener port |
RHINO_MCP_TIMEOUT |
30 |
Command timeout (seconds) |
Development
# Install dev dependencies
uv sync --extra dev
# Run tests (no Rhino needed)
uv run pytest -v
# Lint
uv run ruff check .
# Type check
uv run mypy rhino_mcp
Integration testing
With Rhino running and the listener active:
uv run pytest -v -m integration
Protocol
Commands are JSON objects sent over TCP (newline-delimited):
{"id": "abc123", "action": "create_sphere", "params": {"center": [0,0,0], "radius": 5}}
Responses:
{"id": "abc123", "ok": true, "result": {"guid": "d3e4f5..."}}
Thread Safety
The Rhino listener uses Rhino.RhinoApp.InvokeOnUiThread() on Rhino 8+ to ensure all geometry operations run on the UI thread. On Rhino 7, operations execute directly (which is safe for single-client connections).
License
MIT. See LICENSE.
Author
Karthick Raja B G, portfolio · GitHub
Related work: SPIDER, a Grasshopper plugin for computational geometry and spatial analysis.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。