QR

quocvibui/rhino3d-mcp

分析与监控

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 4 forks 质量 68 趋势 14MIT

Talk to Rhino in plain English through Claude, or write Python scripts to generate patterns. 100+ modeling tools, tested with Rhino 8. Pure Python implementation.

概览

AI-powered 3D modeling in Rhino 8 through Model Context Protocol. MCP server with 135+ tools for code execution, geometry creation, surface/curve/mesh operations, transformations, booleans, layer/material/group/block management, views, annotations, and analysis in Rhino 8. - 135 comprehensive 3D modeling tools - Safe JSON protocol over TCP sockets - Modular architecture for easy expansion - CPython 3 compatible (Rhino 8) - Direct scripting API (works without Claude) Edit ~/Library/Application Support/Claude/claude_desktop_config.json: Try: Get scene info from Rhino and create a box at origin Our current Rhino MCP allows for code execution, this means Claude can execute code directly in Rhino. In order to get the best result. Drop the documents in resources/ into your project folder.

README

以下为原文 README 节选,完整内容请查看原文。

Rhino MCP

AI-powered 3D modeling in Rhino 8 through Model Context Protocol.

Overview

MCP server with 135+ tools for code execution, geometry creation, surface/curve/mesh operations, transformations, booleans, layer/material/group/block management, views, annotations, and analysis in Rhino 8.

Key Features:

  • 135 comprehensive 3D modeling tools
  • Safe JSON protocol over TCP sockets
  • Modular architecture for easy expansion
  • CPython 3 compatible (Rhino 8)
  • Direct scripting API (works without Claude)

Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. Start Rhino Listener

In Rhino 8, run:

_-RunPythonScript "/path/to/rhino-mcp/server.py" _Enter

You should see:

============================================================
RhinoMCP Listener
============================================================
Starting background listener thread...
Listener started successfully
135+ commands ready
============================================================

3. Configure Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
	"mcpServers": {
		"rhino": {
			"command": "/usr/local/bin/python3",
			"args": ["/path/to/rhino-mcp/main.py"]
		}
	}
}

4. Restart Claude Desktop & Test

Try: Get scene info from Rhino and create a box at origin

5. Customizing your Claude Project

Our current Rhino MCP allows for code execution, this means Claude can execute code directly in Rhino. In order to get the best result. Drop the documents in resources/ into your project folder. Add this instruction to the project:

If you have problems with debugging, search up: "https://developer.rhino3d.com/api/RhinoScriptSyntax/" or "RhinoAPI", "RhinoScriptSyntax"

Documentation

Architecture

┌─────────────────┐
│  Claude Desktop │ (Python 3.10+)
└────────┬────────┘
         │ MCP Protocol
         ▼
┌─────────────────┐
│    main.py      │ FastMCP server with 135+ tools
│    tools/       │ Modular tool definitions
└────────┬────────┘
         │ JSON over TCP (localhost:54321)
         ▼
┌─────────────────┐
│   server.py     │ Socket server (CPython 3 - Rhino 8)
│   rhino/        │ RhinoScriptSyntax wrappers
└─────────────────┘
         │
         ▼
    Rhino 8 API

Three Layers:

  1. MCP Layer (main.py, tools/) - Python 3.10+, exposes 135+ tools to Claude
  2. Socket Server (server.py) - CPython 3, runs inside Rhino 8
  3. Rhino Modules (rhino/) - Organized by API category

File Structure

rhino-mcp/
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "rhino": { "command": "/usr/local/bin/python3", "args": ["/path/to/rhino-mcp/main.py"] } } }