Initial commit: RhinoMCP project structure

- MCP Server (Python) with full tool definitions for Rhino/Grasshopper
- Rhino Plugin (C#) with HTTP server for command execution
- Support for geometry creation, manipulation, boolean operations
- Grasshopper integration: sliders, toggles, components, connections
- MIT License, README with architecture documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
architeur
2025-12-29 21:09:28 +01:00
commit e066f9fce5
11 changed files with 2283 additions and 0 deletions

107
README.md Normal file
View File

@@ -0,0 +1,107 @@
# RhinoMCP
Ein MCP-Server (Model Context Protocol) für die Integration von Claude AI mit Rhino 3D und Grasshopper.
## Features
- **Rhino-Geometrie erstellen** - Punkte, Linien, Kurven, Flächen, Volumenkörper
- **Grasshopper-Definitionen** - Komponenten erstellen, verbinden, Parameter setzen
- **GH-Dateien laden/modifizieren** - Bestehende Grasshopper-Definitionen bearbeiten
- **Geometrie analysieren** - Maße, Abstände, Flächen, Volumen berechnen
- **Export** - Verschiedene Formate (3DM, STEP, IGES, STL, etc.)
## Architektur
```
┌─────────────────────────────────────────────────────────┐
│ Claude Code / Claude.ai │
└──────────────────┬──────────────────────────────────────┘
│ MCP Protocol (stdio/SSE)
┌──────────────────▼──────────────────────────────────────┐
│ MCP-Server (Python) │
│ - Tool-Definitionen │
│ - Request/Response Handling │
└──────────────────┬──────────────────────────────────────┘
│ HTTP (localhost:9000)
┌──────────────────▼──────────────────────────────────────┐
│ Rhino-Plugin (C# .rhp) │
│ ├─ RhinoCommon API (Geometrie) │
│ ├─ Grasshopper SDK (Komponenten, Verbindungen) │
│ └─ HTTP-Server (empfängt Befehle) │
└─────────────────────────────────────────────────────────┘
```
## Voraussetzungen
- Rhino 8 oder Rhino 9 WIP
- Python 3.10+
- .NET Framework 4.8 / .NET 7.0 (für Rhino 8)
## Installation
### 1. MCP-Server (Python)
```bash
cd src/mcp-server
pip install -r requirements.txt
```
### 2. Rhino-Plugin
1. Öffne `src/rhino-plugin/RhinoMCP.sln` in Visual Studio
2. Build das Projekt
3. Kopiere `RhinoMCP.rhp` nach `%APPDATA%\McNeel\Rhinoceros\8.0\Plug-ins\`
4. Starte Rhino und aktiviere das Plugin
### 3. Claude Code Konfiguration
Füge in `~/.claude/claude_desktop_config.json` hinzu:
```json
{
"mcpServers": {
"rhino": {
"command": "python",
"args": ["C:/Entwicklung/Rhino-MCP/src/mcp-server/server.py"]
}
}
}
```
## Verwendung
Nach der Installation kann Claude direkt mit Rhino kommunizieren:
```
"Erstelle einen Würfel mit 10mm Kantenlänge"
"Öffne die Grasshopper-Definition und setze den Slider 'Breite' auf 500"
"Exportiere die aktuelle Geometrie als STEP-Datei"
```
## Projektstruktur
```
RhinoMCP/
├── src/
│ ├── mcp-server/ # Python MCP-Server
│ │ ├── server.py # Hauptserver (stdio + SSE)
│ │ ├── tools/ # Tool-Implementierungen
│ │ └── requirements.txt
│ └── rhino-plugin/ # C# Rhino-Plugin
│ └── RhinoMCP/
│ ├── RhinoMCP.csproj
│ ├── Plugin.cs
│ └── HttpServer.cs
├── docs/ # Dokumentation
├── examples/ # Beispiel-Definitionen
├── LICENSE
└── README.md
```
## Lizenz
MIT License - siehe [LICENSE](LICENSE)
## Mitwirken
Beiträge sind willkommen! Bitte erstelle einen Issue oder Pull Request.