RhinoMCP
RhinoMCP:一个用于 Rhino 3D 的 MCP 服务器
105 个工具,用于通过 Model Context Protocol 进行 AI 驱动的 3D 建模、分析、诊断和 Grasshopper 集成。
RhinoMCP 通过一套全面的工具将 Claude 连接到 Rhino 3D,涵盖从基本图元到高级曲面建模(放样、扫掠、旋转)、布尔运算、网格诊断、块管理和 Grasshopper 参数化设计等所有内容。
架构
┌────────────────┐ stdio ┌──────────────┐ TCP/JSON ┌──────────────┐
│ Claude Desktop │◄──────────►│ rhino_mcp │◄─────────────►│ Rhino 3D │
│ │ (MCP) │ (Python) │ localhost: │ listener.py │
│ │ │ server.py │ 9876 │ (inside │
└────────────────┘ └──────────────┘ │ Rhino) │
└──────────────┘MCP 服务器(rhino_mcp/)。使用 FastMCP 的 Python 包。通过 stdio 与 Claude 通信,通过 TCP 与 Rhino 通信。
Rhino 监听器(rhino/listener.py)。在 Rhino 内部运行的 Python 脚本。打开 TCP 服务器,接收 JSON 命令,使用 RhinoCommon/rhinoscriptsyntax 执行这些命令,并返回结果。
Related MCP server: Grasshopper MCP
功能
几何创建(21 个工具)
工具 | 描述 |
| 单个或批量创建点 |
| 直线和多段线 |
| 插值 NURBS 曲线 |
| 圆形几何体 |
| 矩形多段线 |
| 实体图元 |
| 沿曲线拉伸和管道 |
| NURBS 曲面和网格 |
| 文字点 |
| 通过横截面放样曲面 |
| 单轨和双轨扫掠 |
| 绕轴旋转轮廓 |
| 平面和补丁曲面 |
变换(8 个工具)
move、rotate、scale、scale_non_uniform、mirror、copy、array_linear、array_polar
布尔运算(3 个工具)
boolean_union、boolean_difference、boolean_intersection
修改(18 个工具)
工具 | 描述 |
| 基本修改 |
| 分组 |
| 连接和分解几何体 |
| 修剪和分割曲线 |
| 偏移几何体 |
| 边缘处理 |
| 封盖开放的 brep |
| 曲线编辑 |
| 将曲线投影到曲面 |
| 提取边缘/边界 |
块和实例(4 个工具)
create_block、insert_block、list_blocks、explode_block
用户数据(2 个工具)
set_user_text、get_user_text:存储元数据、BIM 数据、成本等。
图层(6 个工具)
list_layers、create_layer、delete_layer、set_layer_color、set_layer_visibility、set_current_layer
材质(3 个工具)
list_materials、create_material、assign_material
分析(10 个工具)
工具 | 描述 |
| 测量 |
| 空间查询 |
| 查找对象之间的交点 |
| 曲率分析 |
| 点包含测试 |
诊断(4 个工具)
工具 | 描述 |
| 检查有效性,查找坏几何体 |
| 查找曲面中的间隙 |
| 网格质量分析 |
| 自动修复网格问题 |
视图(5 个工具)
zoom_extents、set_view、capture_view(带 base64 选项)、list_views、set_display_mode
Grasshopper(3 个工具)
gh_run_script、gh_set_slider、gh_get_outputs
代码执行(2 个工具)
run_python、run_command:完全访问 rhinoscriptsyntax 和 RhinoCommon
撤销/重做(2 个工具)
undo、redo
场景(4 个工具)
scene_info、get_objects、get_object(包含边缘信息的详细)、select_objects
导入/导出(2 个工具)
export(.3dm、.obj、.stl、.step、.iges、.fbx)、import_file
粗体 = v2.0 新增
先决条件
Rhino 7 或 8(Windows 或 Mac)
Python 3.10+
uv 包管理器(安装)
安装
1. 克隆并安装
git clone https://github.com/kbangaru-cyber/rhino-mcp.git
cd Rhino_MCP
uv sync2. 启动 Rhino 监听器
在 Rhino 中:
转到 工具 > PythonScript > 运行
选择
rhino/listener.py你应该看到:
============================================================
RhinoMCP Listener v2.0.0
Listening on 127.0.0.1:9876
Registered handlers: 90
Ready for MCP connection (Claude)
============================================================3. 配置 Claude Desktop
Claude Desktop
编辑 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"
}
}
}
}使用示例
创建简单的建筑形体
“为建筑体量创建一个 10x8x4 米的盒子,然后在中心添加一个半径为 2、高度为 6 的圆柱体作为塔楼。将它们并集,并对所有边缘进行半径为 0.3 的圆角。”
诊断模型问题
“检查场景中的所有对象是否有问题。查找任何裸露边缘,并告诉我需要修复什么。”
参数化设计
“通过创建轮廓曲线并旋转来制作花瓶形状。然后在它周围创建装饰性圆柱体的极轴阵列。”
内置提示
RhinoMCP 包含引导式工作流提示:
model-from-description:从文本描述创建 3D 模型的结构化工作流diagnose-model:查找和修复模型问题的系统方法parametric-design:Grasshopper/参数化工作流指南
资源
服务器将实时数据作为 MCP 资源公开:
URI | 描述 |
| 当前场景概览 |
| 图层树 |
| 材质列表 |
| 块定义 |
配置
环境变量 | 默认值 | 描述 |
|
| Rhino 监听器主机 |
|
| Rhino 监听器端口 |
|
| 命令超时(秒) |
开发
# 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集成测试
在 Rhino 运行且监听器激活的情况下:
uv run pytest -v -m integration协议
命令是通过 TCP 发送的 JSON 对象(以换行符分隔):
{"id": "abc123", "action": "create_sphere", "params": {"center": [0,0,0], "radius": 5}}响应:
{"id": "abc123", "ok": true, "result": {"guid": "d3e4f5..."}}线程安全
Rhino 监听器在 Rhino 8+ 上使用 Rhino.RhinoApp.InvokeOnUiThread() 以确保所有几何操作都在 UI 线程上运行。在 Rhino 7 上,操作直接执行(这对于单客户端连接是安全的)。
许可证
MIT。参见 LICENSE。
作者
Karthick Raja B G,作品集 · GitHub
相关工作:SPIDER,一个用于计算几何和空间分析的 Grasshopper 插件。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceConnects Rhino3D to Claude AI via the Model Context Protocol, enabling AI-assisted 3D modeling and design workflows through direct control of Rhino's functionality.12
- AlicenseNot gradedqualityCmaintenanceEnables AI-powered computational design in Rhino/Grasshopper with ML-based automatic layout optimization, component clustering, performance prediction, and real-time code execution in running Rhino instances.16MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Autodesk Revit to query project data, manage elements, and execute generated code via the Model Context Protocol. It provides full compatibility with GitHub Copilot and Claude to automate BIM modeling workflows.1391MIT
- AlicenseNot gradedqualityBmaintenanceGOLEM-3DMCP implements the Model Context Protocol to give AI agents direct, programmatic control of Rhino 8 — create geometry, run booleans, drive Grasshopper, capture viewports, and execute arbitrary Python scripts, all through natural language. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible host.12MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
DXF and PDF/X-4 for AI agents: structured facts, PNG renders, an interactive in-chat viewer.
Free OpenAI-compatible inference with signed provenance receipts and 3 focused MCP tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kbangaru-cyber/Rhino-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server