Skip to main content
Glama
kbangaru-cyber

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 个工具)

工具

描述

create_pointcreate_points

单个或批量创建点

create_linecreate_polyline

直线和多段线

create_curve

插值 NURBS 曲线

create_circlecreate_arccreate_ellipse

圆形几何体

create_rectangle

矩形多段线

create_spherecreate_boxcreate_cylindercreate_conecreate_torus

实体图元

create_extrusioncreate_pipe

沿曲线拉伸和管道

create_surface_from_pointscreate_mesh

NURBS 曲面和网格

create_text

文字点

create_loft

通过横截面放样曲面

create_sweep1create_sweep2

单轨和双轨扫掠

create_revolve

绕轴旋转轮廓

create_planar_surfacecreate_patch

平面和补丁曲面

变换(8 个工具)

moverotatescalescale_non_uniformmirrorcopyarray_lineararray_polar

布尔运算(3 个工具)

boolean_unionboolean_differenceboolean_intersection

修改(18 个工具)

工具

描述

deleteset_colorset_materialset_nameset_layer

基本修改

groupungroup

分组

joinexplode

连接和分解几何体

trimsplit

修剪和分割曲线

offset_curveoffset_surface

偏移几何体

fillet_edgechamfer_edgefillet_curves

边缘处理

cap_planar_holes

封盖开放的 brep

extend_curverebuild_curve

曲线编辑

project_to_surface

将曲线投影到曲面

duplicate_edgeduplicate_border

提取边缘/边界

块和实例(4 个工具)

create_blockinsert_blocklist_blocksexplode_block

用户数据(2 个工具)

set_user_textget_user_text:存储元数据、BIM 数据、成本等。

图层(6 个工具)

list_layerscreate_layerdelete_layerset_layer_colorset_layer_visibilityset_current_layer

材质(3 个工具)

list_materialscreate_materialassign_material

分析(10 个工具)

工具

描述

get_bounding_boxget_areaget_volumeget_length

测量

distanceclosest_point

空间查询

intersect

查找对象之间的交点

get_curvature

曲率分析

is_point_on_surfaceis_point_in_solid

点包含测试

诊断(4 个工具)

工具

描述

check_objects

检查有效性,查找坏几何体

get_naked_edges

查找曲面中的间隙

check_mesh

网格质量分析

repair_mesh

自动修复网格问题

视图(5 个工具)

zoom_extentsset_viewcapture_view(带 base64 选项)、list_viewsset_display_mode

Grasshopper(3 个工具)

gh_run_scriptgh_set_slidergh_get_outputs

代码执行(2 个工具)

run_pythonrun_command:完全访问 rhinoscriptsyntax 和 RhinoCommon

撤销/重做(2 个工具)

undoredo

场景(4 个工具)

scene_infoget_objectsget_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 sync

2. 启动 Rhino 监听器

在 Rhino 中:

  1. 转到 工具 > PythonScript > 运行

  2. 选择 rhino/listener.py

  3. 你应该看到:

============================================================
  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://scene/info

当前场景概览

rhino://layers

图层树

rhino://materials

材质列表

rhino://blocks

块定义

配置

环境变量

默认值

描述

RHINO_MCP_HOST

127.0.0.1

Rhino 监听器主机

RHINO_MCP_PORT

9876

Rhino 监听器端口

RHINO_MCP_TIMEOUT

30

命令超时(秒)

开发

# 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 插件。

A
license - permissive license
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    D
    maintenance
    Enables 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.
    13
    91
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    GOLEM-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.
    12
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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