跳到主要内容
StableCAD & Parametric

MCP for Rhino — Connect AI Agents to Rhino

懂得文档的 Agent,而不只是会执行命令的 Agent。先读取图层、单位与公差,再创建符合你实际打开文件的几何体。

Read-only by default8 typed toolsCheckpointed writes
Technical specification
宿主软件
Rhino 7, Rhino 8, Rhino 9 (WIP track)
运行时
RhinoCommon / .NET 7 + Python 3 bridge
传输方式
stdio (local) and streamable HTTP (studio)
安装方式
Yak package + npx dccmcp-rhino
Grasshopper
Solver control, slider input, bake-back, definition introspection
支持平台
Windows, macOS
Last reviewed
2026-09-20
概述

什么是 MCP for Rhino?

MCP for Rhino is a local MCP server plus a Rhino plugin that connects AI agents to a real Rhino session. Agents discover 8 typed tools — including doc.inspect, curve.create, surface.loft and block.instance_place — and call them to inspect, create, modify and validate work inside the live application.

Unlike generated Rhino scripts, every call is validated against your current document, classified as read, write or execute, and recorded in an audit log. Rhino stays open, the document stays live, and destructive operations are checkpointed so they can be rolled back.

It works with Claude Code, Codex, Cursor, GitHub Copilot, Claude Desktop, Gemini CLI, Trae, Doubao, Qwen Code, CodeBuddy, Custom MCP clients over stdio or streamable HTTP.

  • 宿主软件: Rhino 7, Rhino 8, Rhino 9 (WIP track)
  • 运行时: RhinoCommon / .NET 7 + Python 3 bridge
  • 传输方式: stdio (local) and streamable HTTP (studio)
为什么会失败

没有契约时,让 Agent 驱动 Rhino 会出什么问题

01

公差与单位会悄悄毁掉几何

一个按毫米假设的模型进了按英尺设置的文档,产出的就是垃圾。Agent 在创建任何东西之前必须拿到文档上下文。

02

Grasshopper 定义对自动化不透明

Agent 做参数化工作往往只能盲写组件。缺少内省能力,Agent 就不知道哪些滑块重要、该烘焙哪些输出。

03

烘焙操作会污染文档

失控的烘焙会把图层塞满无名几何体、破坏图块定义,让后续制图变得不可靠。

如何工作

MCP for Rhino 如何保住设计意图、结构与可追溯性

一个 MCP Server 加一个 Rhino 插件,为 Agent 提供对 Rhino 文档与 Grasshopper 定义的类型化访问:几何创建、图层与图块管理、求解器控制与烘焙。

感知文档的几何

每个几何工具都从 doc.inspect 取得单位与公差上下文,Agent 创建的曲线半径就符合文档应有的数值。

Grasshopper 内省

枚举输入输出、读取滑块范围、设置取值、求解,再把指定输出烘焙到具名图层——整个闭环可脚本化、可复核。

具名图层纪律

烘焙目标必须显式声明。Agent 必须先选择或创建图层,且每个插入对象都带来源元数据。

用图块实例,而不是复制品

放置并变换图块实例,而不是炸开几何体,让大模型保持轻快、图纸保持一致。

工具参考

MCP for Rhino 工具清单与风险等级

Agent 在连接时就能发现这份清单。你可以决定哪些自动放行、哪些需要人工确认、哪些在生产文件中直接禁用。

工具名与参数签名保持英文——它们是 Agent 实际调用的接口。

  • doc.inspectUnits, tolerances, layers, groups, blocks, named views and object counts.read
  • curve.createLines, arcs, polylines and interpolated curves with validated parameters.write
  • surface.loftLoft, revolve, extrude and sweep operations over typed curve inputs.write
  • block.instance_placePlace and transform block instances with rotation and scale constraints.write
  • grasshopper.set_inputSet slider, toggle, value-list and panel inputs by nickname with range checks.write
  • grasshopper.solveTrigger a solve, wait for completion and return structured output metadata.execute
  • grasshopper.bakeBake named outputs to explicit layers with provenance attributes.write
  • export.geometryExport selections to STEP, IGES, DWG, OBJ or 3MF with unit conversion.execute
安装

四步安装 MCP for Rhino

全部本地运行。服务默认只绑定回环地址,且只暴露你在 Rhino 中批准的工具。

预发布。 以下命令描述的是我们即将发布的接口,软件包尚未发布。 Get notified when MCP for Rhino launches.

STEP 01

安装 Rhino 插件

通过 Rhino 包管理器安装 Yak 包,或在构建机上用命令行安装。

yak install dccmcp-rhino
STEP 02

启动桥接服务

桥接服务把 MCP 客户端连到你正在运行的 Rhino 文档,以及任何已打开的 Grasshopper 定义。

npx dccmcp-rhino@latest serve --doc active
STEP 03

注册服务

把桥接写进 Claude Code、Codex、Cursor、OpenClaw 或任何其他 MCP 客户端。可以指向正在运行的文档,也可以让它无界面启动 Rhino 做批处理。

{
  "mcpServers": {
    "rhino": { "command": "npx", "args": ["dccmcp-rhino", "serve"] }
  }
}
STEP 04

绑定定义文件

让 Agent 指向一个或多个 .gh 文件,这样它能在改动之前先内省输入与输出。

dccmcp-rhino bind ./facade-generator.gh

MCP for Rhino works with the agents you already use

  • Claude Code
  • Codex
  • Cursor
  • GitHub Copilot
  • Claude Desktop
  • Gemini CLI
  • Trae
  • Doubao
  • Qwen Code
  • CodeBuddy
  • Custom MCP clients

Any other MCP-compatible client works too — one config entry, stdio by default.

Read the docs
常见问题

团队在安装前最常问的问题

如果没有覆盖到你的问题,直接写信给我们——技术问题我们给技术回答。
  • 可以。把服务指向 .gh 或 .ghx 文件,它会内省组件、输入、输出与滑块范围。你不需要为让 Agent 使用而重写定义。

  • doc.inspect 会返回文档单位体系与公差,几何工具会按此归一。如果 Agent 请求的值违反公差约束,调用会被拒绝并给出说明,而不是悄悄产出坏几何。

  • 不需要。Rhino 7 与 Rhino 8 都支持,另有 Rhino 9 WIP 的早期通道。部分 Grasshopper 内省能力在 Rhino 8 及更新版本上更完整。

  • 烘焙目标是显式的。Agent 必须声明已有或新建的图层,每个插入对象都会带上定义名、运行 ID 与时间戳等来源属性。

  • 可以。桥接支持面向 CI 与批处理流水线的无界面模式,前提是你的 Rhino 授权条款允许无人值守使用。

npx dccmcp-blender@latest serve

Put an agent inside your real tools — without putting your pipeline at risk

Install an integration, set a policy, and let your agent inspect, build and validate work in Blender, Maya, Houdini, 3ds Max, Rhino, ZBrush, Photoshop, FreeCAD, QGIS or OpenCV. Free to start, local by default.

macOS · Windows · Linux — no cloud dependency required