@mrbeandev/rhinopilot-mcp
v2.1.9
Published
RhinoPilot MCP server for Rhino 3D. Requires the RhinoPilotHelper Rhino Plugin to be installed and running.
Maintainers
Readme
RhinoPilot MCP
A Model Context Protocol (MCP) server for Rhino 3D, using the official @modelcontextprotocol/sdk. This server enables AI assistants and other MCP-compatible clients to interact with Rhino 3D software.
Overview
RhinoPilot MCP implements an MCP server that connects to Rhino via a secure socket connection. It provides tools for creating and manipulating 3D geometry, managing layers, capturing viewport images, and more.
Features
- MCP Server: Fully compliant with the Model Context Protocol standard using the official SDK
- Stdio Transport: Uses stdio for communication, making it compatible with various MCP clients
- Rhino Integration: Connects to the Rhino plugin via encrypted socket communication
- Geometry Creation: Create points, lines, circles, curves, NURBS surfaces, and solids
- Layer Management: Create, delete, and manage layers
- Object Selection: Select, delete, and retrieve information about objects
- Viewport Management: Capture images, list viewports, and control display modes
Prerequisites
- Node.js 18.0.0 or higher
- A running Rhino instance with the RhinoPilotHelper plugin installed
Installation
Using npx (Recommended)
You can run the RhinoPilot MCP server directly using npx without installing it:
npx @mrbeandev/rhinopilot-mcpGlobal Installation
To install the package globally:
npm install -g @mrbeandev/rhinopilot-mcpThen run it with:
rhinopilot-mcpLocal Development
Clone this repository
Install dependencies:
npm installBuild the project:
npm run buildRun the server:
npm run start
Command Line Usage
Options
npx @mrbeandev/rhinopilot-mcp [options]Available options:
--host=<hostname>: Specify Rhino Plugin host (default: localhost)--port=<port>: Specify Rhino Plugin port (default: 8081)-h, --help: Show help message-v, --version: Show version information
Available Tools
The RhinoPilot MCP server provides a wide range of tools for interacting with Rhino:
Document and Connection Management
- get_document_info: Retrieve information about the current Rhino document
- check_connection: Check if the connection to the Rhino plugin is active
- connect_to_rhino: Connect to the Rhino plugin
- disconnect_from_rhino: Disconnect from the Rhino plugin
Geometry Creation
- create_point: Create a point at the specified coordinates
- create_line: Create a line between two points
- create_circle: Create a circle with specified center point and radius
- create_arc: Create an arc with center point, radius, start angle and end angle
- create_ellipse: Create an ellipse with center, x-axis endpoint and y-axis endpoint
- create_polyline: Create a polyline from a list of points
- create_curve: Create a curve from control points
- create_sphere: Create a sphere with center point and radius
- create_box: Create a box with origin, width, height, and depth
- create_cone: Create a cone with base point, height, and radius
- create_cylinder: Create a cylinder with base point, height, and radius
- create_nurbs_surface: Create a NURBS surface from a grid of control points
- create_rectangular_surface: Create a rectangular surface with origin point, width and height
Layer Management
- create_layer: Create a new layer in the document
- delete_layer: Delete a layer from the document
- get_current_layer: Get the current active layer
- get_all_layers: Get a list of all layers in the document
- set_current_layer: Set the current active layer
Object Management
- get_object_info: Get information about a specific object
- delete_object: Delete an object from the document
- select_objects: Select objects in the document
- get_selected_objects_info: Get information about the currently selected objects
Visual and Display Management
- capture_viewport_image: Capture an image of the current viewport
- get_viewport_list: Get a list of available viewports
- get_display_modes: Get a list of available display modes
- set_viewport_display_mode: Set the display mode for a specific viewport
Scripting
- execute_rhino_script: Execute a Rhino script command
Example Usage
Here's how to use the tools with an MCP client:
// Using an MCP client to connect to the server
const result = await client.callTool({
name: "create_box",
arguments: {
origin: [0, 0, 0],
width: 10,
height: 5,
depth: 3
}
});
// Create a layer and set it as current
await client.callTool({
name: "create_layer",
arguments: {
name: "MyNewLayer",
color: [255, 0, 0] // Red color
}
});
await client.callTool({
name: "set_current_layer",
arguments: {
name: "MyNewLayer"
}
});License
This project is licensed under the MIT License.
