New Grasshopper tools: - grasshopper_delete_component: Remove components from canvas - grasshopper_add_group: Add comment groups around components - grasshopper_add_scribble: Add text annotations - grasshopper_rename_component: Rename component nicknames New GIS/Terrain tools: - rhino_import_geotiff: Import GeoTIFF as heightfield mesh - rhino_import_shapefile: Import ESRI Shapefiles - rhino_import_xyz: Import XYZ point clouds - rhino_transform_coordinates: Offset/transform coordinates - rhino_get_bounding_box: Get object bounds - rhino_create_grid: Create survey grids - rhino_create_site_section: Generate terrain profiles - rhino_calculate_area_volume: Calculate cut/fill volumes Added: - CLAUDE.md: Project documentation with dev guidelines - install.bat: Windows installer script - MeshTerrainHandler.cs: Separate handler for mesh/terrain/GIS 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6.4 KiB
6.4 KiB
RhinoMCP - Claude Code Projektdokumentation
Projektübersicht
RhinoMCP ist ein MCP (Model Context Protocol) Plugin, das Claude AI direkten Zugriff auf Rhino 3D und Grasshopper ermöglicht. Es wurde für Landschaftsarchitektur, Straßeninfrastruktur und Regenwassermanagement entwickelt.
Architektur
┌─────────────────────────────────────────────────────────┐
│ Claude.ai / Claude Code │
└──────────────────┬──────────────────────────────────────┘
│ MCP Protocol (stdio)
┌──────────────────▼──────────────────────────────────────┐
│ MCP-Server (Python) │
│ src/mcp-server/server.py │
│ - Tool-Definitionen │
│ - Request/Response Handling │
└──────────────────┬──────────────────────────────────────┘
│ HTTP (localhost:9000)
┌──────────────────▼──────────────────────────────────────┐
│ Rhino-Plugin (C# .rhp) │
│ src/rhino-plugin/RhinoMCP/ │
│ ├─ RhinoMcpPlugin.cs (Plugin-Einstieg) │
│ ├─ HttpServer.cs (HTTP-Endpoint) │
│ ├─ CommandHandler.cs (Rhino-Befehle) │
│ ├─ GrasshopperHandler.cs(GH-Befehle) │
│ └─ MeshTerrainHandler.cs(Mesh/GIS-Tools) │
└─────────────────────────────────────────────────────────┘
Technische Details
- Rhino-Version: Rhino 9 WIP
- Framework: .NET 7.0
- RhinoCommon/Grasshopper SDK: 8.0.23304.9001
- HTTP-Server: EmbedIO auf Port 9000
- MCP-Transport: stdio
Verfügbare Tools
Rhino-Geometrie
rhino_create_point,rhino_create_line,rhino_create_polylinerhino_create_circle,rhino_create_sphere,rhino_create_boxrhino_create_surface,rhino_create_curverhino_move,rhino_rotate,rhino_scale,rhino_copyrhino_boolean_union,rhino_boolean_difference,rhino_boolean_intersectionrhino_export,rhino_run_command
Grasshopper
grasshopper_open_definition,grasshopper_get_definition_infograsshopper_add_component,grasshopper_connect_componentsgrasshopper_add_slider,grasshopper_set_slider_valuegrasshopper_set_toggle_value,grasshopper_set_panel_textgrasshopper_bake,grasshopper_save_definition,grasshopper_recomputegrasshopper_delete_component,grasshopper_add_groupgrasshopper_add_scribble,grasshopper_rename_component
Mesh/Terrain/GIS
rhino_mesh_from_points,rhino_import_mesh,rhino_mesh_booleanrhino_terrain_contours,rhino_terrain_slope_analysisrhino_terrain_watershed,rhino_terrain_low_pointsrhino_create_drainage_line,rhino_create_road_surfacerhino_import_geotiff,rhino_import_shapefile,rhino_import_xyzrhino_transform_coordinates,rhino_get_bounding_boxrhino_create_grid,rhino_create_site_section,rhino_calculate_area_volume
Installation
- Plugin bauen:
dotnet build --configuration Release install.batausführen oder manuell nach%APPDATA%\McNeel\Rhinoceros\9.0\Plug-ins\RhinoMCP (1.0.0)\kopieren- MCP-Server in Claude Code konfigurieren
Entwicklungsrichtlinien
Automatisches Commit bei Kapazitätswarnung
WICHTIG: Ab 85% Chat-Kapazität muss automatisch:
- Aktueller Stand dokumentiert werden
- Alle Änderungen committet werden
- Zusammenfassung der offenen Aufgaben erstellt werden
Code-Struktur
- Maximale Dateigröße: 300 Zeilen pro Datei
- Bei Überschreitung: Logisch aufteilen in separate Handler-Klassen
Aktuelle Aufteilungsempfehlungen
| Datei | Zeilen | Status | Empfehlung |
|---|---|---|---|
| CommandHandler.cs | ~683 | Zu groß | Aufteilen in GeometryHandler, TransformHandler |
| MeshTerrainHandler.cs | ~1509 | Zu groß | Aufteilen in MeshHandler, TerrainHandler, GISHandler, RoadHandler |
| GrasshopperHandler.cs | ~671 | Zu groß | Aufteilen in GH_ComponentHandler, GH_DocumentHandler |
| server.py | ~1185 | Zu groß | Tool-Definitionen in separate Module |
Changelog
2025-12-29
- Initiale Entwicklung des RhinoMCP Plugins
- Implementiert: Rhino-Geometrie, Grasshopper-Integration, Mesh/Terrain-Tools
- Neue GH-Tools:
delete_component,add_group,add_scribble,rename_component - GIS-Tools: GeoTIFF, Shapefile, XYZ Import
- Terrain-Analyse: Konturlinien, Gefälle, Wasserscheiden
Offene Aufgaben
- Code-Refactoring: Große Dateien aufteilen (max. 300 Zeilen)
- Unit-Tests implementieren
- Fehlerbehandlung verbessern
- Dokumentation erweitern
Projektstruktur
Rhino-MCP/
├── CLAUDE.md # Diese Dokumentation
├── README.md # Öffentliche Dokumentation
├── LICENSE # MIT Lizenz
├── install.bat # Windows-Installer
├── src/
│ ├── mcp-server/
│ │ ├── server.py # MCP-Server (TODO: aufteilen)
│ │ └── requirements.txt
│ └── rhino-plugin/
│ └── RhinoMCP/
│ ├── RhinoMCP.csproj
│ ├── RhinoMcpPlugin.cs
│ ├── HttpServer.cs
│ ├── CommandHandler.cs # TODO: aufteilen
│ ├── GrasshopperHandler.cs # TODO: aufteilen
│ └── MeshTerrainHandler.cs # TODO: aufteilen
└── docs/ # Zusätzliche Dokumentation