rhinoMcpServer
by: always-tinkering
RhinoMCP connects Rhino to Claude AI through the Model Context Protocol (MCP), enabling AI-assisted 3D modeling and architectural design.
πOverview
Purpose: This framework aims to implement a Model Context Protocol (MCP) server for the Rhino 3D environment, enabling AI assistants to create and manipulate 3D objects effectively.
Overview: The Rhino MCP Server allows integration of AI applications like Claude with Rhino 3D through the Model Context Protocol. This setup facilitates direct interaction for creating and managing 3D models via an AI interface, currently under development with active community involvement.
Key Features:
-
MCP Server Implementation: A system that streamlines communication between AI assistants and Rhino 3D, enabling seamless object creation and manipulation.
-
Unified Server Launcher: A versatile tool that lets users run various server modes including combined, standalone, and daemon setups, simplifying the execution process.
Rhino MCP Server
β οΈ UNDER CONSTRUCTION β οΈ
This project is under active development and is not yet fully functional. The Rhino plugin currently has issues with creating objects. Community support is welcome, especially from those experienced with Rhino API, C# plugins, or MCP integration. Please consider contributing by opening an issue on GitHub.
A Model Context Protocol (MCP) server implementation for Rhino 3D, enabling Claude AI to create and manipulate 3D objects.
Overview
This project implements an MCP server for Rhino 3D, allowing AI assistants like Claude to interact with Rhino via the Model Context Protocol. The server facilitates the creation and manipulation of 3D objects directly from the AI interface.
System Architecture
The system consists of Python components implementing the MCP server and C# components integrating with Rhino. The main interactions are:
- Python Socket Proxy (
socket_proxy.py
) forwards commands. - Python Daemon Server (
daemon_mcp_server.py
) receives commands via socket. - Python Combined MCP Server (
combined_mcp_server.py
) uses stdin/stdout for communication, recommended for use. - C# Rhino Plugin handling Rhino integration.
- Logging System centralizes logs from all components.
- Rhino 3D Software as the environment.
For detailed architecture and data flow, see the code_architecture.md
file.
Components
Server Implementations
-
Combined MCP Server (Recommended):
combined_mcp_server.py
β direct implementation using stdin/stdout. -
Socket-based Servers:
daemon_mcp_server.py
β background server receiving commands via socket.
socket_proxy.py
β forwards commands from stdin to the daemon server. -
Standalone Server:
standalone-mcp-server.py
β original standalone implementation.
Setup Instructions
1. Setup Claude Desktop
- Install Claude Desktop if not already installed.
- Configure the MCP server connection in Claude Desktop settings.
2. Run the Server
A unified server launcher allows running any server implementation:
./server_launcher.sh [mode]
Available modes:
combined
(default) β run the combined MCP serverstandalone
β run the standalone MCP serverdaemon
β run the daemon MCP serversocket-proxy
β run the socket proxydirect
β run both daemon and socket proxylogs
β view recent logsmonitor
β monitor logs in real-timeerrors
β view recent errorshelp
β show help message
Examples:
# Run the combined server (recommended)
./server_launcher.sh combined
# Or simply
./server_launcher.sh
# Run the socket-based approach (daemon + proxy)
./server_launcher.sh direct
# Monitor logs in real-time
./server_launcher.sh monitor
Available Tools
The server provides several 3D modeling tools:
geometry_tools.create_sphere
β create a sphere with center and radiusgeometry_tools.create_box
β create a box with specified dimensionsgeometry_tools.create_cylinder
β create a cylinder with parametersscene_tools.get_scene_info
β get information about the current scenescene_tools.clear_scene
β clear objects from the scenescene_tools.create_layer
β create a new layer in the document
Troubleshooting
If connection issues occur:
-
Ensure no old servers are running:
./server_launcher.sh help # cleans up existing processes
-
Check log files:
./server_launcher.sh logs # view logs ./server_launcher.sh errors # view errors
-
Restart Claude Desktop completely.
Improved Logging System
The system centralizes logs from all components in a unified format, stored under the logs/
directory with separate subdirectories:
- Server logs
- Plugin logs
- Claude AI logs
- Diagnostic logs
Log Management
Log management commands:
# View logs
./server_launcher.sh logs
# Monitor logs in real-time
./server_launcher.sh monitor
# View errors with context
./server_launcher.sh errors
# Generate error reports using the log manager
./log_manager.py report
For more on logging, see LOGGING.md.
Development
Project Structure
combined_mcp_server.py
: main MCP server implementationdiagnose_rhino_connection.py
: diagnostic tool for testing Rhino connectionlog_manager.py
: log management and analysisserver_launcher.sh
: unified server launcher scriptlogs/
: directory containing all logs
Adding New Features
- Add new tools as methods in
combined_mcp_server.py
. - Use the existing logging framework for error handling.
- Update diagnostic tools as needed.
License
This project is licensed under the MIT License. See LICENSE for details.