golem-3dmcp 0.1.dev8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- golem_3dmcp-0.1.dev8/.gitignore +64 -0
- golem_3dmcp-0.1.dev8/LICENSE +21 -0
- golem_3dmcp-0.1.dev8/PKG-INFO +386 -0
- golem_3dmcp-0.1.dev8/README.md +346 -0
- golem_3dmcp-0.1.dev8/pyproject.toml +91 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/__init__.py +16 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/__main__.py +5 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/__init__.py +0 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/dispatcher.py +220 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/grasshopper/__init__.py +0 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/grasshopper/gh_handlers.py +690 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/grasshopper/gh_server.py +392 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/__init__.py +70 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/creation.py +2243 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/files.py +507 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/grasshopper.py +619 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/manipulation.py +1466 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/operations.py +1739 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/scene.py +992 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/scripting.py +417 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/surfaces.py +1239 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/handlers/viewport.py +792 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/protocol.py +143 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/server.py +508 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/startup.py +161 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/utils/__init__.py +0 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/utils/error_handler.py +215 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/utils/geometry_serializer.py +671 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/utils/guid_registry.py +285 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/_rhino_plugin/utils/screenshot.py +236 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/cli.py +341 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/config.py +37 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/connection.py +367 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/models/__init__.py +1 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/models/common.py +131 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/models/geometry.py +304 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/models/scene.py +206 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/protocol.py +132 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/server.py +82 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/__init__.py +97 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/creation.py +412 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/files.py +186 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/grasshopper.py +202 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/manipulation.py +309 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/operations.py +313 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/scene.py +276 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/scripting.py +176 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/surfaces.py +356 -0
- golem_3dmcp-0.1.dev8/src/golem_3dmcp/tools/viewport.py +225 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Python bytecode
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.pyc
|
|
6
|
+
*.pyo
|
|
7
|
+
*.pyd
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
env/
|
|
13
|
+
ENV/
|
|
14
|
+
.env
|
|
15
|
+
|
|
16
|
+
# Distribution / packaging
|
|
17
|
+
dist/
|
|
18
|
+
build/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
*.egg
|
|
21
|
+
MANIFEST
|
|
22
|
+
|
|
23
|
+
# pytest
|
|
24
|
+
.pytest_cache/
|
|
25
|
+
.cache/
|
|
26
|
+
htmlcov/
|
|
27
|
+
.coverage
|
|
28
|
+
coverage.xml
|
|
29
|
+
*.cover
|
|
30
|
+
|
|
31
|
+
# mypy / pyright / ruff
|
|
32
|
+
.mypy_cache/
|
|
33
|
+
.ruff_cache/
|
|
34
|
+
.pytype/
|
|
35
|
+
|
|
36
|
+
# macOS
|
|
37
|
+
.DS_Store
|
|
38
|
+
.AppleDouble
|
|
39
|
+
.LSOverride
|
|
40
|
+
Icon?
|
|
41
|
+
._*
|
|
42
|
+
.Spotlight-V100
|
|
43
|
+
.Trashes
|
|
44
|
+
|
|
45
|
+
# Editor / IDE
|
|
46
|
+
.vscode/
|
|
47
|
+
.idea/
|
|
48
|
+
*.swp
|
|
49
|
+
*.swo
|
|
50
|
+
*~
|
|
51
|
+
|
|
52
|
+
# Secrets / environment overrides
|
|
53
|
+
.env.local
|
|
54
|
+
.env.*.local
|
|
55
|
+
secrets.yaml
|
|
56
|
+
secrets.json
|
|
57
|
+
|
|
58
|
+
# Logs
|
|
59
|
+
*.log
|
|
60
|
+
logs/
|
|
61
|
+
|
|
62
|
+
# PyPI / packaging
|
|
63
|
+
*.whl
|
|
64
|
+
.eggs/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KingHippo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: golem-3dmcp
|
|
3
|
+
Version: 0.1.dev8
|
|
4
|
+
Summary: The most powerful MCP server for Rhinoceros 3D — 105 tools giving AI agents full read/write access to Rhino 8
|
|
5
|
+
Project-URL: Homepage, https://github.com/TheKingHippopotamus/GOLEM-3DMCP-Rhino-
|
|
6
|
+
Project-URL: Repository, https://github.com/TheKingHippopotamus/GOLEM-3DMCP-Rhino-
|
|
7
|
+
Project-URL: Documentation, https://github.com/TheKingHippopotamus/GOLEM-3DMCP-Rhino-/tree/main/docs
|
|
8
|
+
Project-URL: Issues, https://github.com/TheKingHippopotamus/GOLEM-3DMCP-Rhino-/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/TheKingHippopotamus/GOLEM-3DMCP-Rhino-/blob/main/CHANGELOG.md
|
|
10
|
+
Author: King Hippopotamus
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: 3d,ai,architecture,cad,claude,computational-design,grasshopper,mcp,model-context-protocol,parametric-design,rhino,rhinoceros
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
26
|
+
Classifier: Typing :: Typed
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
|
+
Requires-Dist: click>=8.0.0
|
|
29
|
+
Requires-Dist: httpx>=0.24.0
|
|
30
|
+
Requires-Dist: mcp[cli]>=1.0.0
|
|
31
|
+
Requires-Dist: pydantic>=2.0.0
|
|
32
|
+
Requires-Dist: rich>=13.0.0
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: mypy>=1.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pre-commit>=3.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: ruff>=0.4.0; extra == 'dev'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# GOLEM-3DMCP
|
|
42
|
+
|
|
43
|
+
> *"Shaped from clay, brought to life by words"*
|
|
44
|
+
|
|
45
|
+
**The most powerful MCP server for Rhinoceros 3D — 105 tools giving Claude full read/write access to Rhino 8.**
|
|
46
|
+
|
|
47
|
+
[](https://pypi.org/project/golem-3dmcp/)
|
|
48
|
+
[](LICENSE)
|
|
49
|
+
[](https://www.rhino3d.com/)
|
|
50
|
+
[](https://python.org)
|
|
51
|
+
[](https://modelcontextprotocol.io/)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
GOLEM-3DMCP implements the [Model Context Protocol](https://modelcontextprotocol.io/) to give Claude Code direct, programmatic control of Rhino 8 — create geometry, run booleans, drive Grasshopper, capture viewports, and execute arbitrary Python scripts, all through natural language.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Demo — City Built Entirely by Claude
|
|
60
|
+
|
|
61
|
+
> An entire city generated in Rhino 8 through GOLEM-3DMCP — roads, skyscrapers, houses, trees, people, vehicles, a stadium, bridge, ferris wheel, harbor, wind turbines, and a floating GOLEM hologram. All created by Claude Code using natural language commands.
|
|
62
|
+
|
|
63
|
+
[](https://youtu.be/GoWN9vGlWCs)
|
|
64
|
+
<p align="center"><strong>Watch the full demo video on YouTube</strong></p>
|
|
65
|
+
|
|
66
|
+
<p align="center">
|
|
67
|
+
<img src="screenshots/city_wide.png" alt="GOLEM City — Wide Overview" width="800"/>
|
|
68
|
+
</p>
|
|
69
|
+
<p align="center"><em>Full city overview — ground, roads, buildings, park, harbor, sky</em></p>
|
|
70
|
+
|
|
71
|
+
<p align="center">
|
|
72
|
+
<img src="screenshots/city_skyline.png" alt="GOLEM City — Skyline" width="800"/>
|
|
73
|
+
</p>
|
|
74
|
+
<p align="center"><em>Skyline view — skyscrapers, bridge, wind turbines, floating GOLEM hologram</em></p>
|
|
75
|
+
|
|
76
|
+
<p align="center">
|
|
77
|
+
<img src="screenshots/city_monument.png" alt="GOLEM City — Monument" width="800"/>
|
|
78
|
+
</p>
|
|
79
|
+
<p align="center"><em>Close-up — GOLEM monument plaza, residential buildings, fountain</em></p>
|
|
80
|
+
|
|
81
|
+
<p align="center">
|
|
82
|
+
<img src="screenshots/city_street.png" alt="GOLEM City — Street Level" width="800"/>
|
|
83
|
+
</p>
|
|
84
|
+
<p align="center"><em>Street level — vehicles, people, street lamps, stadium, harbor with boats</em></p>
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Install in 30 seconds
|
|
89
|
+
|
|
90
|
+
### 1. Install the MCP server
|
|
91
|
+
```bash
|
|
92
|
+
pip install golem-3dmcp
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 2. Deploy the Rhino plugin (one-time)
|
|
96
|
+
```bash
|
|
97
|
+
golem install-rhino
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 3. Add to your AI agent
|
|
101
|
+
|
|
102
|
+
**Claude Code / Cursor / Windsurf / any MCP host:**
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"mcpServers": {
|
|
106
|
+
"golem-3dmcp": {
|
|
107
|
+
"command": "uvx",
|
|
108
|
+
"args": ["golem-3dmcp"]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 4. Verify
|
|
115
|
+
```bash
|
|
116
|
+
golem doctor
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
That's it. Start talking to Rhino through AI.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Architecture
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Claude Code
|
|
127
|
+
|
|
|
128
|
+
| MCP (stdio, JSON-RPC)
|
|
129
|
+
v
|
|
130
|
+
+---------------------------+
|
|
131
|
+
| MCP Server |
|
|
132
|
+
| Python 3.10+ |
|
|
133
|
+
| FastMCP + 9 tool |
|
|
134
|
+
| modules |
|
|
135
|
+
+---------------------------+
|
|
136
|
+
|
|
|
137
|
+
| TCP 127.0.0.1:9876
|
|
138
|
+
| Length-prefixed JSON
|
|
139
|
+
v
|
|
140
|
+
+---------------------------+
|
|
141
|
+
| Rhino Plugin |
|
|
142
|
+
| Python 3.9 (embedded) |
|
|
143
|
+
| TCP Server |
|
|
144
|
+
| Dispatcher |
|
|
145
|
+
| 9 handler modules |
|
|
146
|
+
+---------------------------+
|
|
147
|
+
|
|
|
148
|
+
| RhinoCommon + rhinoscriptsyntax
|
|
149
|
+
v
|
|
150
|
+
+---------------------------+ +-------------------------+
|
|
151
|
+
| Rhinoceros 3D | <---> | Grasshopper |
|
|
152
|
+
| UI Thread | | Sub-server :9877 |
|
|
153
|
+
| Document, Geometry, | | Definitions, Params, |
|
|
154
|
+
| Layers, Views | | Components, Bake |
|
|
155
|
+
+---------------------------+ +-------------------------+
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 105 Tools Across 9 Categories
|
|
161
|
+
|
|
162
|
+
| Category | Tools | Highlights |
|
|
163
|
+
|----------|:-----:|------------|
|
|
164
|
+
| **Scene Intelligence** | 10 | Document info, layers, objects, groups, blocks — no object cap, full pagination |
|
|
165
|
+
| **Geometry Creation** | 38 | Points, curves, NURBS, solids, mesh, SubD, text, dimensions, hatches |
|
|
166
|
+
| **Geometry Operations** | 19 | Boolean union/difference/intersection, trim, split, offset, fillet, chamfer, intersect, mesh from NURBS |
|
|
167
|
+
| **Surface Operations** | 12 | Loft, sweep1/2, revolve, extrude, network surface, patch, edge surface, unroll |
|
|
168
|
+
| **Object Manipulation** | 21 | Move, copy, rotate, scale, mirror, array (linear/polar/along curve), join, explode, group, properties |
|
|
169
|
+
| **Grasshopper** | 9 | Open definitions, set/get parameters, recompute, bake, inspect component graph |
|
|
170
|
+
| **Viewport & Visualization** | 13 | Capture screenshots (base64 PNG), camera control, named views, display modes |
|
|
171
|
+
| **File Operations** | 9 | Save, open, import, export (STL, OBJ, STEP, IGES, FBX, 3MF, DWG, PDF, and more) |
|
|
172
|
+
| **Script Execution** | 4 | Execute arbitrary Python with full RhinoCommon access, run Rhino commands, evaluate expressions |
|
|
173
|
+
|
|
174
|
+
See [docs/TOOL_REFERENCE.md](docs/TOOL_REFERENCE.md) for the complete reference with parameters and examples.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Quick Start
|
|
179
|
+
|
|
180
|
+
### 1. Install and set up
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
pip install golem-3dmcp
|
|
184
|
+
golem install-rhino
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### 2. Load the plugin into Rhino
|
|
188
|
+
|
|
189
|
+
Open Rhino 8, then open the Script Editor (`Tools > Python Script > Edit`).
|
|
190
|
+
Open `startup.py` (deployed by `golem install-rhino`) and click **Run**.
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
GOLEM-3DMCP: Starting server on 127.0.0.1:9876...
|
|
194
|
+
GOLEM-3DMCP: Server started successfully!
|
|
195
|
+
GOLEM-3DMCP: 135 handler methods registered.
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
For auto-start on every Rhino launch: `Tools > Options > RhinoScript > Startup Scripts > Add startup.py`
|
|
199
|
+
|
|
200
|
+
### 3. Register with Claude Code
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
claude mcp add --config .mcp.json
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### 4. Start modeling with Claude
|
|
207
|
+
|
|
208
|
+
Open Claude Code and try:
|
|
209
|
+
|
|
210
|
+
> *"Create a 200 x 100 x 50 box at the origin, then create a sphere of radius 30 centred at [100, 50, 50]. Boolean-union the two objects."*
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Requirements
|
|
215
|
+
|
|
216
|
+
| Requirement | Version |
|
|
217
|
+
|-------------|---------|
|
|
218
|
+
| Rhinoceros 3D | 8.x (macOS) |
|
|
219
|
+
| Python | 3.10+ (for MCP server) |
|
|
220
|
+
| macOS | 12 Monterey or newer |
|
|
221
|
+
|
|
222
|
+
The Rhino plugin runs inside Rhino's embedded Python 3.9 with zero external dependencies.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Configuration
|
|
227
|
+
|
|
228
|
+
| Variable | Default | Description |
|
|
229
|
+
|----------|---------|-------------|
|
|
230
|
+
| `GOLEM_RHINO_HOST` | `127.0.0.1` | Rhino plugin host |
|
|
231
|
+
| `GOLEM_RHINO_PORT` | `9876` | Rhino plugin TCP port |
|
|
232
|
+
| `GOLEM_GH_PORT` | `9877` | Grasshopper sub-server port |
|
|
233
|
+
| `GOLEM_TIMEOUT` | `30` | Command timeout (seconds) |
|
|
234
|
+
| `GOLEM_HEAVY_TIMEOUT` | `120` | Heavy operation timeout (seconds) |
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Example Usage
|
|
239
|
+
|
|
240
|
+
### Create and combine geometry
|
|
241
|
+
```
|
|
242
|
+
Create a 100 x 50 x 30 box on a layer called 'Structure',
|
|
243
|
+
then boolean-union it with a sphere of radius 20 centred at [50, 25, 30].
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Query the scene
|
|
247
|
+
```
|
|
248
|
+
List all objects on the 'Walls' layer and tell me their volumes.
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Drive Grasshopper
|
|
252
|
+
```
|
|
253
|
+
Open parametric_facade.gh, set the 'PanelCount' slider to 24,
|
|
254
|
+
recompute, and bake the result to a 'Facade' layer.
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Capture a viewport
|
|
258
|
+
```
|
|
259
|
+
Set perspective view to shaded mode, zoom to extents, and capture a screenshot.
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Execute arbitrary Python
|
|
263
|
+
```python
|
|
264
|
+
# Claude runs this inside Rhino via execute_python:
|
|
265
|
+
import Rhino.Geometry as rg
|
|
266
|
+
pts = [rg.Point3d(i*10, 0, i**2) for i in range(20)]
|
|
267
|
+
crv = rg.Curve.CreateInterpolatedCurve(pts, 3)
|
|
268
|
+
sc.doc.Objects.AddCurve(crv)
|
|
269
|
+
__result__ = {"point_count": len(pts), "length": crv.GetLength()}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Project Structure
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
golem-3dmcp/
|
|
278
|
+
├── src/golem_3dmcp/ # MCP Server package (Python 3.10+)
|
|
279
|
+
│ ├── __init__.py # Package init + version
|
|
280
|
+
│ ├── __main__.py # python -m entry point
|
|
281
|
+
│ ├── cli.py # CLI (golem command)
|
|
282
|
+
│ ├── server.py # FastMCP entry point
|
|
283
|
+
│ ├── connection.py # TCP client (singleton, thread-safe)
|
|
284
|
+
│ ├── protocol.py # Wire format: 4-byte length prefix + JSON
|
|
285
|
+
│ ├── config.py # Environment variable configuration
|
|
286
|
+
│ ├── models/ # Pydantic data models
|
|
287
|
+
│ ├── tools/ # 9 MCP tool modules
|
|
288
|
+
│ └── _rhino_plugin/ # Bundled Rhino plugin (deployed via golem install-rhino)
|
|
289
|
+
│
|
|
290
|
+
├── tests/ # 226 tests (pytest)
|
|
291
|
+
├── docs/ # Architecture, protocol spec, tool reference
|
|
292
|
+
├── .github/workflows/ # CI/CD (test + PyPI publish)
|
|
293
|
+
├── pyproject.toml # Package definition
|
|
294
|
+
└── .mcp.json # Example MCP configuration
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Documentation
|
|
300
|
+
|
|
301
|
+
- [Architecture](docs/ARCHITECTURE.md) — System design, threading model, data flow
|
|
302
|
+
- [Tool Reference](docs/TOOL_REFERENCE.md) — All 105 tools with parameters and examples
|
|
303
|
+
- [Protocol Specification](docs/PROTOCOL.md) — TCP wire format, message framing, error codes
|
|
304
|
+
- [Troubleshooting](docs/TROUBLESHOOTING.md) — Common issues and solutions
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Testing
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
# Unit tests (no Rhino needed)
|
|
312
|
+
pytest tests/ -v --ignore=tests/test_integration.py
|
|
313
|
+
|
|
314
|
+
# Full suite (integration tests auto-skip if Rhino not running)
|
|
315
|
+
pytest tests/ -v
|
|
316
|
+
|
|
317
|
+
# Integration tests only (requires Rhino + plugin running)
|
|
318
|
+
pytest tests/test_integration.py -v -m integration
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Troubleshooting
|
|
324
|
+
|
|
325
|
+
| Problem | Quick Fix |
|
|
326
|
+
|---------|-----------|
|
|
327
|
+
| Connection refused | Start Rhino + run `startup.py` |
|
|
328
|
+
| Port already in use | `lsof -i :9876` then kill the process |
|
|
329
|
+
| MCP server not in Claude | Run `claude mcp add --config .mcp.json` |
|
|
330
|
+
| Grasshopper tools fail | Open Grasshopper in Rhino first |
|
|
331
|
+
| Python version error | Need Python 3.10+ for MCP server |
|
|
332
|
+
|
|
333
|
+
See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for detailed solutions.
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## License
|
|
338
|
+
|
|
339
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Credits
|
|
344
|
+
|
|
345
|
+
<p align="center">
|
|
346
|
+
<img src="nexus-svgs/king-hippo.svg" alt="King Hippopotamus" width="250"/>
|
|
347
|
+
</p>
|
|
348
|
+
|
|
349
|
+
<p align="center">
|
|
350
|
+
Created by <strong>King Hippopotamus</strong><br/>
|
|
351
|
+
Built by <strong>NEXUS AI</strong> — 30 parallel agents across 3 phases
|
|
352
|
+
</p>
|
|
353
|
+
|
|
354
|
+
### The NEXUS Team That Built GOLEM
|
|
355
|
+
|
|
356
|
+
<p align="center">
|
|
357
|
+
<img src="nexus-svgs/CEO.svg" alt="CEO — The Lion" width="120" title="CEO — The Lion"/>
|
|
358
|
+
<img src="nexus-svgs/CTO.svg" alt="CTO — The Owl" width="120" title="CTO — The Owl"/>
|
|
359
|
+
<img src="nexus-svgs/CPO.svg" alt="CPO — The Fox" width="120" title="CPO — The Fox"/>
|
|
360
|
+
<img src="nexus-svgs/COO.svg" alt="COO — The Bear" width="120" title="COO — The Bear"/>
|
|
361
|
+
<img src="nexus-svgs/CFO.svg" alt="CFO — The Cobra" width="120" title="CFO — The Cobra"/>
|
|
362
|
+
<img src="nexus-svgs/CISO.svg" alt="CISO — The Scorpion" width="120" title="CISO — The Scorpion"/>
|
|
363
|
+
</p>
|
|
364
|
+
<p align="center">
|
|
365
|
+
<img src="nexus-svgs/CMO.svg" alt="CMO — The Peacock" width="120" title="CMO — The Peacock"/>
|
|
366
|
+
<img src="nexus-svgs/CRO.svg" alt="CRO — The Wolf" width="120" title="CRO — The Wolf"/>
|
|
367
|
+
<img src="nexus-svgs/CHRO.svg" alt="CHRO — The Elephant" width="120" title="CHRO — The Elephant"/>
|
|
368
|
+
<img src="nexus-svgs/CLO.svg" alt="CLO — The Raven" width="120" title="CLO — The Raven"/>
|
|
369
|
+
<img src="nexus-svgs/CAIO.svg" alt="CAIO — The Octopus" width="120" title="CAIO — The Octopus"/>
|
|
370
|
+
</p>
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
<p align="center"><em>195 autonomous agents | 20 departments | 11 tiers</em></p>
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
**GOLEM-3DMCP** uses:
|
|
379
|
+
- [FastMCP](https://github.com/jlowin/fastmcp) — MCP server framework
|
|
380
|
+
- [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/) — Rhino geometry API
|
|
381
|
+
- [rhinoscriptsyntax](https://developer.rhino3d.com/api/RhinoScriptSyntax/) — Python scripting for Rhino
|
|
382
|
+
- [Grasshopper SDK](https://developer.rhino3d.com/api/grasshopper/) — Parametric design control
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
*"From formless clay, through the power of words, form emerges."*
|