MCP.so
ログイン

Rhino MCP Server

@jingcheng-chen

基本情報

カテゴリ

その他

ライセンス

MIT

トランスポート

stdio

作者

jingcheng-chen

投稿者

Jingcheng Chen

Rhino MCP Server について

RhinoMCP connects Rhino 3D to AI Agent through the Model Context Protocol (MCP)

Rhino MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "rhino": {
      "command": "uvx",
      "args": [
        "rhinomcp"
      ]
    }
  }
}

Rhino MCP Server のツール

70

Create a loft surface through multiple curves. Parameters: - curve_ids: List of curve IDs (GUIDs) to loft through (minimum 2 curves). Curves should be in order from start to end of the loft. - name: Optional name for the resulting surface - closed: If True, creates a closed loft (connects last curve back to first) - loft_type: Type of loft (0=Normal, 1=Loose, 2=Tight, 3=Straight, 4=Developable) Returns: - Dictionary with result_ids (list of created surface IDs) and message Example: # Create two circles and loft between them circle1 = create_object(type="CIRCLE", params={"center": [0,0,0], "radius": 5}) circle2 = create_object(type="CIRCLE", params={"center": [0,0,10], "radius": 3}) result = loft(curve_ids=[circle1_id, circle2_id], name="my_loft")

Extrude a curve along a direction vector to create a surface or solid. Parameters: - curve_id: The curve ID (GUID) to extrude - direction: Extrusion direction as [x, y, z] vector (e.g., [0, 0, 10] for 10 units up) - name: Optional name for the resulting object - cap: If True and curve is closed, caps the ends to create a solid (default: True) Returns: - Dictionary with result_id (created object ID) and message Example: # Create a circle and extrude it upward to make a cylinder circle = create_object(type="CIRCLE", params={"center": [0,0,0], "radius": 5}) result = extrude_curve(curve_id=circle_id, direction=[0, 0, 10], name="cylinder")

Sweep one or more profile curves along a rail curve. Parameters: - rail_id: The rail curve ID (GUID) - the path along which to sweep - profile_ids: List of profile curve IDs (GUIDs) - the shapes to sweep - name: Optional name for the resulting surface - closed: If True, creates a closed sweep - cap_planar_ends: If True, cap planar holes at document tolerance. Every result must become a valid solid before any result is added; otherwise the operation fails and leaves the document unchanged (default: False). Returns: - Dictionary with result_ids (list of created surface IDs) and message Example: # Create a rail (line) and profile (circle), then sweep rail = create_object(type="LINE", params={"start": [0,0,0], "end": [10,0,5]}) profile = create_object(type="CIRCLE", params={"center": [0,0,0], "radius": 1}) result = sweep1(rail_id=rail_id, profile_ids=[profile_id], name="swept_tube")

Offset a curve by a specified distance. Parameters: - curve_id: The curve ID (GUID) to offset - distance: Offset distance (positive = one side, negative = other side) - name: Optional name for the resulting curve - plane: Optional plane normal [x, y, z] for the offset direction. If not provided, uses the curve's plane or world XY. - corner_style: How to handle corners (0=None, 1=Sharp, 2=Round, 3=Smooth, 4=Chamfer) Returns: - Dictionary with result_ids (list of created curve IDs) and message Example: # Offset a curve by 2 units result = offset_curve(curve_id=my_curve_id, distance=2.0, name="offset_curve")

Create a pipe (tube) along a curve. Parameters: - curve_id: The curve ID (GUID) to create pipe along - radius: Radius of the pipe - name: Optional name for the resulting object - cap: If True, caps the ends of the pipe (default: True) - fit_rail: If True, fits the pipe more closely to the rail curve Returns: - Dictionary with result_ids (list of created object IDs) and message Example: # Create a curved line and make it into a pipe curve = create_object(type="ARC", params={"center": [0,0,0], "radius": 10, "start_angle": 0, "end_angle": 90}) result = pipe(curve_id=curve_id, radius=0.5, name="pipe_tube")

Analyze object validity and common geometry measurements. Provide exactly one target selector: - id: Analyze one object by GUID - name: Analyze one object by name - object_ids: Analyze multiple objects by GUID - selected: Analyze the current Rhino selection Returns: - object_count: Number of analyzed objects - analyses: Per-object reports with validity, bounding box dimensions, and type-specific measurements such as length, area, volume, centroid, closed/solid flags, and Brep/Mesh counts where available. For Breps, naked_edge_count counts all naked topological edges, including inner hole boundaries and excluding joined edges and seams.

Perform a boolean union on multiple solid objects, combining them into one. Parameters: - object_ids: List of object IDs (GUIDs) to union together (minimum 2) - delete_sources: Whether to delete the source objects after union (default: True) - name: Optional name for the resulting object - dry_run: Preview the result and its metrics without modifying the document (default: False) Returns: A message indicating the result of the operation. Note: Objects must be valid closed solids (Breps, Extrusions, or Surfaces).

Perform a boolean difference (subtraction) - subtract objects from a base object. Parameters: - base_id: The object ID (GUID) of the base object to subtract from - subtract_ids: List of object IDs (GUIDs) to subtract from the base - delete_sources: Whether to delete the source objects after operation (default: True) - name: Optional name for the resulting object - dry_run: Preview the result and its metrics without modifying the document (default: False) Returns: A message indicating the result of the operation. Note: Objects must be valid closed solids (Breps, Extrusions, or Surfaces).

Perform a boolean intersection - keep only the overlapping volume of objects. Parameters: - object_ids: List of object IDs (GUIDs) to intersect (minimum 2) - delete_sources: Whether to delete the source objects after operation (default: True) - name: Optional name for the resulting object - dry_run: Preview the result and its metrics without modifying the document (default: False) Returns: A message indicating the result of the operation. Note: Objects must be valid closed solids (Breps, Extrusions, or Surfaces) that overlap.

Capture a screenshot of a Rhino viewport for visual analysis. This tool captures the current state of a Rhino viewport as an image, allowing Claude to visually understand and analyze the 3D model. Parameters: - viewport: Target viewport to capture. Options: - "active": The currently active viewport (default) - "perspective": The perspective viewport - "top": Top orthographic view (plan view) - "front": Front orthographic view - "right": Right orthographic view - "back": Back orthographic view - "left": Left orthographic view - "bottom": Bottom orthographic view - Or any custom viewport name defined in the document - width: Image width in pixels (default: 800, range: 100-4096) - height: Image height in pixels (default: 600, range: 100-4096) - show_grid: Show the viewport grid (default: True) - show_axes: Show world axes indicator (default: True) - show_cplane_axes: Show construction plane axes (default: False) - zoom_to_fit: Fit visible objects to the requested image dimensions (default: False). The original camera and projection are restored after capture. Returns: An Image object that Claude can analyze visually. Use Cases: - Verify geometry creation matches user intent - Analyze spatial relationships between objects - Check visual appearance and layout - Debug modeling issues by seeing the actual result - Capture multiple views for comprehensive understanding Example workflow: 1. capture_viewport(viewport="perspective") - Get overall 3D view 2. capture_viewport(viewport="top", zoom_to_fit=True) - Get plan view 3. capture_viewport(viewport="front") - Get elevation view

Create a new layer in the Rhino document. Parameters: - name: The name of the new layer. If omitted, Rhino automatically generates the layer name. - color: Optional [r, g, b] color values (0-255) for the layer - parent: Optional parent reference. Use an exact full path such as "Assembly::Left" when names repeat; a simple name is accepted only when it identifies exactly one nondeleted layer. Missing or ambiguous parents and duplicate sibling names return errors. Returns: A message indicating the created layer name, or a clear creation error. Examples of params: - name: "Layer 1" - color: [255, 0, 0] - parent: "Assembly::Left"

Create a new object in the Rhino document. Parameters: - type: Object type ("POINT", "LINE", "POLYLINE", "CIRCLE", "ARC", "ELLIPSE", "CURVE", "BOX", "SPHERE", "CONE", "CYLINDER", "SURFACE"). For pipes, use the dedicated `pipe` tool. - name: Optional name for the object - color: Optional [r, g, b] color values (0-255) for the object - params: Type-specific parameters dictionary (see documentation for each type) - translation: Optional [x, y, z] translation vector - rotation: Optional [x, y, z] rotation in radians - scale: Optional [x, y, z] scale factors The params dictionary is type-specific. For POINT, the params dictionary should contain the following keys: - x: x coordinate of the point - y: y coordinate of the point - z: z coordinate of the point For LINE, the params dictionary should contain the following keys: - start: [x, y, z] start point of the line - end: [x, y, z] end point of the line For POLYLINE, the params dictionary should contain the following keys: - points: List of [x, y, z] points that define the polyline For CIRCLE, the params dictionary should contain the following keys: - center: [x, y, z] center point of the circle - radius: Radius of the circle For ARC, the params dictionary should contain the following keys: - center: [x, y, z] center point of the arc - radius: Radius of the arc - angle: Angle of the arc in degrees For ELLIPSE, the params dictionary should contain the following keys: - center: [x, y, z] center point of the ellipse - radius_x: Radius of the ellipse along X axis - radius_y: Radius of the ellipse along Y axis For CURVE, the params dictionary should contain the following keys: - points: List of [x, y, z] control points that define the curve - degree: Degree of the curve (default is 3, if user asked for smoother curve, degree can be higher) If the curve is closed, the first and last points should be the same. For BOX, the params dictionary should contain the following keys: - width: Width of the box along X axis of the object - length: Length of the box along Y axis of the object - height: Height of the box along Z axis of the object For SPHERE, the params dictionary should contain the following key: - radius: Radius of the sphere For CONE, the params dictionary should contain the following keys: - radius: Radius of the cone - height: Height of the cone - cap: Boolean to indicate if the cone should be capped at the base, default is True For CYLINDER, the params dictionary should contain the following keys: - radius: Radius of the cylinder - height: Height of the cylinder - cap: Boolean to indicate if the cylinder should be capped at the base, default is True For SURFACE, the params dictionary should contain the following keys: - count : ([number, number]) Tuple of two numbers defining number of points in the u,v directions - points: Flattened interpolation points (not control vertices), with the second grid index varying fastest. For degree selection and a validated biquadratic panel recipe, consult get_modeling_guidance("verification"). - degree: ([number, number], optional) Degree of the surface (default is 3, if user asked for smoother surface, degree can be higher) - closed: ([bool, bool], optional) Two booleans defining if the surface is closed in the u,v directions Returns: A dict with success, id, name, type, message, plus bounding_box (the new object's axis-aligned extent) and, for curve-like types, geometry — each present only when the plugin reported it. Exceptions propagate as MCP tool errors. Examples of params: - POINT: {"x": 0, "y": 0, "z": 0} - LINE: {"start": [0, 0, 0], "end": [1, 1, 1]} - POLYLINE: {"points": [[0, 0, 0], [1, 1, 1], [2, 2, 2]]} - CIRCLE: {"center": [0, 0, 0], "radius": 1.0} - CURVE: {"points":…

Create multiple objects at once in the Rhino document. Parameters: - objects: A list of dictionaries, each containing the parameters for a single object Each object should have the following values: - type: Object type ("POINT", "LINE", "POLYLINE", "BOX", "SPHERE", etc.) - name: Optional name for the object - color: Optional [r, g, b] color values (0-255) for the object - params: Type-specific parameters dictionary (see documentation for each type in create_object() function) - translation: Optional [x, y, z] translation vector - rotation: Optional [x, y, z] rotation in radians - scale: Optional [x, y, z] scale factors Returns: A message indicating the created objects. Examples of params: [ { "type": "POINT", "name": "Point 1", "params": {"x": 0, "y": 0, "z": 0} }, { "type": "LINE", "name": "Line 1", "params": {"start": [0, 0, 0], "end": [1, 1, 1]} }, { "type": "POLYLINE", "name": "Polyline 1", "params": {"points": [[0, 0, 0], [1, 1, 1], [2, 2, 2]]} }, { "type": "CURVE", "name": "Curve 1", "params": {"points": [[0, 0, 0], [1, 1, 1], [2, 2, 2]], "degree": 3} }, { "type": "BOX", "name": "Box 1", "color": [255, 0, 0], "params": {"width": 1.0, "length": 1.0, "height": 1.0}, "translation": [0, 0, 0], "rotation": [0, 0, 0], "scale": [1, 1, 1] }, { "type": "SPHERE", "name": "Sphere 1", "color": [0, 255, 0], "params": {"radius": 1.0}, "translation": [0, 0, 0], "rotation": [0, 0, 0], "scale": [1, 1, 1] } ]

Create one planar Brep face from closed coplanar boundary curves. The outer curve bounds the face and each distinct inner curve becomes one hole. Inner loops must be strictly inside the outer loop and mutually disjoint and nonnested. Input curves are preserved. Returns the created object id and face/loop counts. Exceptions propagate as MCP tool errors.

Project a curve onto surfaces, polysurfaces, or meshes. Parameters: - curve_id: The curve ID (GUID) to project - target_ids: List of surface, polysurface, or mesh IDs to project onto - direction: Projection direction as [x, y, z] vector - name: Optional name for the resulting curves Returns: - Dictionary with result_ids (list of created curve IDs) and message

Find intersection points or curves between two curves. Parameters: - curve_id_a: The first curve ID - curve_id_b: The second curve ID - tolerance: Optional intersection tolerance (defaults to document tolerance) - name: Optional base name for created intersection objects Returns: - Dictionary with point_ids, curve_ids, and message

Split a curve at specified parameters or points. Parameters: - curve_id: The curve ID to split - parameters: Optional list of curve parameters to split at - point_ids: Optional list of point object IDs to split at (closest points on curve will be used) - delete_source: Whether to delete the original curve (default: True) - name: Optional name for the resulting curve segments Returns: - Dictionary with result_ids (list of created curve segment IDs) and message

Delete a layer in the Rhino document. If name is provided, it will try to delete the layer with the given name. If guid is provided, it will try to delete the layer with the given guid. If neither is provided, it will return an error. Parameters: - name: The name of the layer to delete. - guid: The guid of the layer to delete. Returns: A message indicating the layer was deleted. Examples of params: - name: "Layer 1" - guid: "00000000-0000-0000-0000-000000000000"

Delete an object from the Rhino document. Parameters: - id: The id of the object to delete - name: The name of the object to delete - all: If True, delete every object in the document. Exactly one of id, name, or all=True must be provided. Errors propagate as MCP tool errors.

Describe what this MCP server itself can do. Unlike get_commands, which lists Rhino's own application commands (Box, Circle, ...) for use with run_command, this lists the MCP command surface: every command the server handles and whether it is read-only, so you can discover what is callable here instead of guessing a name. Returns: - version: the plugin version - command_count: how many commands the server handles - commands: a list of {name, read_only, supports_dry_run}, sorted by name. supports_dry_run is absent on plugins older than the flag; read that as no. - perception: the opt-in envelope flags (include_delta, include_health) and what each attaches to a mutating command's result - server_version: this Python server's version - plugin_matches_server: whether plugin and server versions agree (null when either is unknown) - update_advice: which side is older and how to update it, or null

Execute RhinoCommon C# code directly in Rhino. This tool allows you to execute C# code that uses the RhinoCommon API directly. The code is compiled and executed at runtime using Roslyn. IMPORTANT NOTES: ================ 1. The code runs in a scripting context with the following globals available: - `doc`: The active RhinoDoc (Rhino.RhinoDoc) - `output`: A StringBuilder to capture output (use output.AppendLine("...")) 2. Common namespaces are pre-imported: - System, System.Collections.Generic, System.Linq - Rhino, Rhino.Geometry, Rhino.DocObjects, Rhino.Commands 3. Use `output.AppendLine()` to return results to the caller (like print() in Python) Parameters: - code: The C# code to execute Example Usage: -------------- Task: "Create a sphere at the origin" ```csharp var sphere = new Sphere(Point3d.Origin, 5.0); var brep = sphere.ToBrep(); doc.Objects.AddBrep(brep); doc.Views.Redraw(); output.AppendLine($"Created sphere with radius 5 at origin"); ``` Task: "List all curves in the document" ```csharp var curves = doc.Objects.FindByObjectType(ObjectType.Curve); output.AppendLine($"Found {curves.Length} curves:"); foreach (var obj in curves) { output.AppendLine($" - {obj.Id}: {obj.Name ?? "(unnamed)"}"); } ``` Task: "Create a line between two points" ```csharp var start = new Point3d(0, 0, 0); var end = new Point3d(10, 10, 0); var line = new Line(start, end); doc.Objects.AddLine(line); doc.Views.Redraw(); output.AppendLine($"Created line from {start} to {end}"); ``` Common Mistakes to Avoid: - Forgetting to use `output.AppendLine()` to return results - Not calling `doc.Views.Redraw()` after adding objects - Using types without their namespace (use Point3d, not Rhino.Geometry.Point3d) Returns: - success: Whether the code executed successfully - output: Any output from output.AppendLine() calls - message: Error message if failed (includes compilation errors) Any changes made to the document will be undone if the script fails. Safety: this tool compiles+runs arbitrary C# inside Rhino. Gated by the RHINO_MCP_ENABLE_CSHARP env var (default on for local dev). Set to "0" to refuse calls — recommended when the MCP server is exposed to untrusted clients.

Execute RhinoScript Python code in Rhino. CRITICAL - BEFORE USING THIS TOOL: ================================= You MUST call get_rhinoscript_docs() or search_rhinoscript_functions() first to find the correct function signatures. DO NOT guess function names or parameters. Required Workflow: 1. Call get_rhinoscript_docs("your goal") to find relevant functions 2. Read the documentation carefully - note exact signatures and parameter types 3. Write code using ONLY the documented signatures 4. Call this tool with the code Parameters: - code: The RhinoScript Python code to execute Code Requirements: - Import rhinoscriptsyntax: `import rhinoscriptsyntax as rs` - Use print() to return output/results to the caller - Use EXACT function signatures from documentation - Handle None returns from functions that might fail Example Workflow: ----------------- Task: "Create a loft surface between two curves" Step 1: get_rhinoscript_docs("loft surface curves") -> Returns AddLoftSrf documentation with exact signature Step 2: Read that AddLoftSrf takes object_ids (list of curve GUIDs) Step 3: Write and execute: ```python import rhinoscriptsyntax as rs # Get the curves (assumes they exist) curves = rs.GetObjects("Select curves for loft", rs.filter.curve) if curves: loft = rs.AddLoftSrf(curves) print(f"Created loft: {loft}") ``` Common Mistakes to Avoid: - Using non-existent functions (ALWAYS verify with docs first) - Wrong parameter order (check signature carefully) - Wrong parameter types (e.g., passing Point3d when list expected) - Forgetting to import rhinoscriptsyntax Returns: - success: Whether the code executed successfully - output: Any print() output from the script - message: Error message if failed Any changes made to the document will be undone if the script fails. Safety: this tool runs arbitrary Python inside Rhino. Gated by the RHINO_MCP_ENABLE_RHINOSCRIPT env var (default on for local dev). Set to "0" to refuse calls — recommended when the MCP server is exposed to untrusted clients.

List Rhino command names available in the current session. Use this together with `run_command` to discover what is invokable before guessing a command name. Filter is a case-insensitive substring match — pass "boolean" to find every boolean-related command, "view" for view commands, and so on. Parameters: - filter: Optional case-insensitive substring. Empty string returns all commands. - loaded_only: If True (default), only commands from currently loaded plugins are returned. Set False to also include commands from unloaded plugins. Returns a JSON object: {"count": N, "commands": ["Box", "Circle", ...]}

Get a lightweight summary of the current Rhino document. This returns aggregated statistics about the model without individual object details: - Document metadata (name, units, tolerance, dates) - Total object count - Object counts grouped by type (e.g., 50 curves, 30 surfaces) - Object counts grouped by layer - Model-wide bounding box encompassing all objects - Full layer hierarchy with parent-child relationships and per-layer object counts Use this tool first to understand the model composition before querying specific objects. For detailed object information, use get_objects with filters.

Read the versioned Rhino modeling guide bundled with this server. Consult transforms for anchors and world-origin rotation, planar_regions for faces with holes, organization for layer assignment, verification for checking results, or recovery after uncertain edits. overview lists the workflow and topics. Works without a Rhino connection; does not change documents.

Get detailed information about a specific object in the Rhino document. The information contains the object's id, name, type, all custom user attributes and geometry info. Provide at least one selector: id or name of the object to get information about. If both are provided, id takes priority. If neither selector is known, use get_objects first to discover objects and their ids or names. Returns: - A dictionary containing the object's information - The dictionary will have the following keys: - "id": The id of the object - "name": The name of the object - "type": The type of the object - "layer": The layer of the object - "material": The material of the object - "color": The color of the object - "bounding_box": The bounding box of the object - "geometry": The geometry info of the object - "attributes": A dictionary containing all custom user attributes of the object Parameters: - id: The id of the object to get information about - name: The name of the object to get information about

Query objects in the Rhino document with filtering and pagination. Use this tool to retrieve specific subsets of objects after first calling get_document_summary to understand the model composition. Parameters: - offset: Number of objects to skip (default: 0) - limit: Maximum objects to return (default: 50, max: 200) - layer_filter: Return only objects on this layer (name or full path) - type_filter: Return only objects of this type: POINT, LINE, POLYLINE, CIRCLE, ARC, CURVE, BOX, SPHERE, CONE, CYLINDER, SURFACE, BREP, EXTRUSION, MESH - bbox_filter: Return objects within bounding box [[min_x,min_y,min_z],[max_x,max_y,max_z]] - include_geometry: Include detailed geometry data (default: true, false for lightweight listing) Returns: - objects: Array of object information - total_matching: Total count matching filters - offset, limit: Applied pagination - has_more: Whether more objects are available - filters: The filters that were applied Example: Get all curves on layer "Walls": get_objects(layer_filter="Walls", type_filter="CURVE") Example: Get next page of results: get_objects(offset=50, limit=50)

Get or set the current layer in the Rhino document. If name is provided, it will try to set the current layer to the layer with the given name. If guid is provided, it will try to set the current layer to the layer with the given guid. If neither is provided, it will return the current layer. Parameters: - name: The name of the layer to set the current layer to. - guid: The guid of the layer to set the current layer to. Returns: A message indicating the current layer. Examples of params: - name: "Layer 1" - guid: "00000000-0000-0000-0000-000000000000"

Get detailed information about the currently selected objects in Rhino Parameters: - include_attributes: Whether to include the custom user attributes of the objects in the response

Create and wire a Grasshopper graph in one batched canvas operation. Each component needs an alias plus component_name or component_guid. Use aliases in connections, values, groups, and preview_policy; the response returns aliases mapped to generated instance IDs. Use gh_mutate_graph for follow-up edits and rewires involving existing components by persisted alias, Grasshopper instance GUID, or nickname. Number Slider components support value/min/max/decimals. Layout supports max_columns to wrap long dataflow chains into a compact readable canvas. Minimal shape: components=[ {"alias": "a", "component_name": "Number Slider", "value": 3.5, "min": 0, "max": 10}, {"alias": "add", "component_name": "Addition"}, ], connections=[{"source": "a", "target": "add", "target_input_index": 0}], layout={"enabled": True, "max_columns": 6}

Search the installed Grasshopper component library.

Search multiple Grasshopper component names and return ranked matches. The legacy results field keeps the best match for each query. Use matches or ambiguous to disambiguate names like "Square" or "Grid" by category, subcategory, nickname, or GUID before creating components.

List installed Grasshopper component categories and subcategories.

Get installed Grasshopper components, optionally filtered by category.

Inspect a Grasshopper component type before creating an instance.

Inspect multiple Grasshopper component types and I/O maps in one call. Each selector needs name/component_name or guid/component_guid. Prefer GUIDs when search returns ambiguous names.

List components on the active Grasshopper canvas.

Get detailed metadata for one Grasshopper canvas object.

Add a Grasshopper component to the active canvas. Provide component_name or component_guid. If both are supplied, the GUID is resolved first to avoid ambiguous names.

Lay out Grasshopper canvas objects using wires as a left-to-right graph.

Delete one Grasshopper canvas object.

Update basic Grasshopper object metadata, position, enabled state, or preview state.

Delete objects from the active Grasshopper canvas.

Connect one Grasshopper output parameter to one input parameter.

Disconnect one Grasshopper wire, or all sources from a target input.

Create or activate a Grasshopper document for subsequent canvas commands.

Get information about the active Grasshopper document.

Return a structured snapshot of the active Grasshopper canvas.

Inspect all Grasshopper objects tagged with a graph id.

Delete all Grasshopper objects tagged with a graph id.

Batch edit, rewire, and verify an existing or new Grasshopper graph. Use this after gh_build_graph for follow-up edits: insert components, disconnect/reconnect wires, update values/preview/nicknames, delete objects, group/layout the changed graph, recompute, and verify outputs in one rollback-safe call. Selectors in source, target, layout targets, groups, and preview_policy can be request-local aliases, persisted aliases, Grasshopper instance GUIDs, or nicknames. Port selection supports indices or names/nicknames: source_output_name="R", target_input_name="L". Insert a component between two existing components by GUID: operations=[ { "op": "disconnect", "source": "source-guid", "source_output_name": "G", "target": "target-guid", "target_input_name": "L", }, {"op": "create", "alias": "flatten", "component_name": "Flatten Tree"}, {"op": "connect", "source": "source-guid", "source_output_name": "G", "target": "flatten"}, {"op": "connect", "source": "flatten", "target": "target-guid", "target_input_name": "L"}, {"op": "recompute"}, ] Use layout={"enabled": True, "targets": ["source-guid", "flatten", "target-guid"], "max_columns": 4} to keep the edited area readable.

Set a slider, toggle, panel, value list, or regular input parameter value.

Read structured data from a Grasshopper output parameter.

Capture live Grasshopper preview in a Rhino viewport without baking. The plugin computes preview bounds from visible IGH_PreviewObject ClippingBox values, optionally filtered by graph_id or aliases/GUIDs in targets, zooms the Rhino viewport to those bounds, and returns a PNG image.

Run a Grasshopper solution and report runtime warnings/errors.

Expire the whole Grasshopper solution or selected components.

Report the spatial relationship between two objects. Parameters: - object_ids: Exactly two object GUIDs to measure between. Returns: - object_a, object_b: the two object GUIDs - clash: whether the two objects intersect - intersection_count: number of intersections (brep curves+points, or curve events); 0 for the bbox method - bbox_gap: exact minimum distance between the two bounding boxes (0 if they meet or overlap), a lower bound on the true surface-to-surface distance - method: how clash was determined ("brep", "curve", or "bbox"). "bbox" means the pair has no exact pairwise intersection here and overlap was judged by bounding box, so read it as approximate.

Modify an existing object in the Rhino document. Parameters: - id: The id of the object to modify - name: The name of the object to modify - new_name: Optional new name for the object - new_color: Optional [r, g, b] color values (0-255) for the object - translation: Optional [x, y, z] translation vector - rotation: Optional [x, y, z] rotation in radians around the pre-edit bounding-box center, not the world origin - scale: Optional [x, y, z] scale factors anchored at the pre-edit bounding-box minimum - visible: Optional boolean to set visibility Combined transforms apply scale, then Z/Y/X rotations, then translation. For world-origin rotation or composed poses, read get_modeling_guidance("transforms"). Returns a dict with success, id, name, message, plus bounding_box — the object's new post-edit axis-aligned extent — and, for curve-like types, geometry, each present only when the plugin reported it. Errors propagate as MCP tool errors.

Create multiple objects at once in the Rhino document. Parameters: - objects: A List of objects, each containing the parameters for a single object modification - all: Optional boolean to modify all objects, if true, only one object is required in the objects dictionary Each object can have the following parameters: - id: The id of the object to modify - new_color: Optional [r, g, b] color values (0-255) for the object - translation: Optional [x, y, z] translation vector - rotation: Optional [x, y, z] rotation in radians - scale: Optional [x, y, z] scale factors - visible: Optional boolean to set visibility Returns: A message indicating the modified objects.

Get lightweight object metadata and custom user strings. Parameters: - id: The id of the object to inspect - name: The name of the object to inspect Returns: A dictionary containing object name, layer, color/material sources, visibility/lock state, and user_strings. If both id and name are provided, id is used.

Update lightweight object metadata and custom user strings. Parameters: - id: The id of the object to update - name: The name of the object to update - new_name: Optional new object name - layer: Optional destination layer name or full path - color: Optional RGB color [r, g, b]. Sets color source to object. - material_index: Optional Rhino material table index. Sets material source to object. - visible: Optional visibility flag. False hides the object. - locked: Optional locked flag. True locks the object. - user_strings: Optional key/value metadata. Values are stored as strings; null deletes a key. - delete_user_strings: Optional list of user-string keys to delete. - clear_user_strings: If true, remove all existing user strings before applying updates. Returns: The updated lightweight object metadata.

Search RhinoScript functions by keyword or description. Use this tool to find the correct function names before writing any RhinoScript code. Parameters: - query: What you want to do (e.g., "loft", "create surface from curves", "boolean union", "extrude") - limit: Maximum number of results to return (default: 10) Returns: - List of matching functions with name, signature, description, and module Example queries: - "loft surface" -> finds AddLoftSrf, etc. - "boolean" -> finds BooleanDifference, BooleanUnion, BooleanIntersection - "create curve" -> finds AddCurve, AddLine, AddArc, etc. - "rotate" -> finds RotateObject, RotateObjects, etc. IMPORTANT: Always use this tool BEFORE writing RhinoScript code to find correct function names.

Get comprehensive RhinoScript documentation for a topic. This is the PRIMARY tool to use before writing any RhinoScript Python code. It searches for relevant functions and returns complete documentation including signatures, parameters, return values, and examples. Parameters: - topic: What you want to accomplish (e.g., "loft surface between curves", "boolean operations", "extrude curve") - include_examples: Whether to include code examples (default: True) - max_functions: Maximum number of function docs to return (default: 5) Returns: - Comprehensive documentation for the most relevant functions CRITICAL: You MUST call this tool before using execute_rhinoscript_python_code. Using functions without checking their documentation leads to syntax errors. Example usage: 1. User asks: "Create a loft surface between two curves" 2. Call: get_rhinoscript_docs("loft surface curves") 3. Read the returned documentation carefully 4. Write code using ONLY the exact signatures shown

List all available RhinoScript modules and their function counts. Use this to explore what's available in RhinoScript when you're not sure what module contains the functions you need. Returns: - List of all modules with function counts and descriptions

Get all functions in a specific RhinoScript module with their signatures. Parameters: - module_name: The module name (e.g., "curve", "surface", "mesh", "transformation") Use list_rhinoscript_modules() first to see available modules. Returns: - All functions in the module with signatures and brief descriptions

Execute a Rhino command string and return whatever the command window prints. This is the escape hatch for Rhino commands that do not yet have a typed MCP tool. Anything you can type into the Rhino command line works here, including aliases and macros. Prefix the command name with an underscore to force the English name (e.g. "_Box 0,0,0 10,10,10"). Multiple commands can be chained with newlines. Pair this with `get_commands` to discover what command names are available before invoking. Prefer the typed tools (create_object, boolean_union, etc.) when one exists — they are validated and return structured data. Parameters: - command: Rhino command string to execute, e.g. "_Box 0,0,0 10,10,10". - echo: If True, the command is echoed in the Rhino command window as it runs. Default False to keep the output focused on diagnostics. Returns the captured command-window output as a string. Failed commands are prefixed with "Command failed:" so the agent can distinguish failure from silent success without parsing JSON. Safety: this tool is gated by the RHINO_MCP_ENABLE_RUN_COMMAND env var (default on for local dev). Set it to "0" to refuse calls before they reach Rhino — recommended whenever the MCP server is exposed to untrusted clients.

Cut a plane through objects and measure each cross-section, without creating anything in the document. Provide exactly one target selector: - id: section one object by GUID - name: section one object by name - object_ids: section multiple objects by GUID - selected: section the current Rhino selection Provide exactly one cut: - plane: a single cut. Either {"axis": "X"|"Y"|"Z", "value": <number>} for an axis-aligned world plane, or {"origin": [x, y, z], "normal": [x, y, z]} for an arbitrary plane. - profile: a stack of parallel cuts for a sectional-area curve, as {"axis": "X"|"Y"|"Z", "count": <2..100>, "start": <number?>, "end": <number?>}. Without start/end the stack spans the selection's extent along the axis. Returns (plane mode): - mode "plane", object_count, the resolved cut plane, total_section_area, total_loop_count, and per-object profiles. Each loop reports closed, perimeter, and, only when it closed, area and centroid. A single cut can produce several disjoint loops, so areas are summed per object. Returns (profile mode): - mode "profile", axis, count, and sections: one {position, total_section_area, loop_count} per slice, i.e. the cross-sectional area along the axis.

Select objects in the Rhino document. Parameters: - filters: A dictionary containing the filters. The filters parameter is necessary, unless it's empty, in which case all objects will be selected. - filters_type: The type of the filters, it's "and" or "or", default is "and" Note: Name and custom attribute filter values are lists of strings (even if there's only one value). `color` is a single RGB triplet (not a list of triplets). Filter semantics: - With filters_type="and", an object matches when every filter key matches at least one of that key's listed values. - With filters_type="or", an object matches when any filter key matches any listed value. - Name and custom-attribute string matches are exact (case-sensitive). Keys: - name: list of object names, e.g. ["Box1", "Box2"] - color: single RGB triplet, e.g. [255, 0, 0] - any other key is treated as a user custom attribute and the value is a list of strings. Example: filters = { "name": ["object_name1", "object_name2"], "category": ["custom_attribute_value"] }, filters_type = "or" Returns: A number indicating the number of objects that have been selected.

Undo the last operation(s) in the Rhino document. Parameters: - steps: Number of operations to undo (default: 1) Returns: A message indicating how many operations were undone.

Redo the last undone operation(s) in the Rhino document. Parameters: - steps: Number of operations to redo (default: 1) Returns: A message indicating how many operations were redone.

概要

What is Rhino?

RhinoMCP is a Model Context Protocol server that connects Rhino 3D and Grasshopper to AI agents such as Claude and Cursor. It lets assistants model geometry, read the active document, and build Grasshopper definitions using natural language. It targets Rhino 8 on Windows and macOS and requires Python 3.10+.

How to use Rhino?

Install the rhinomcp plugin via Rhino’s Package Manager, then configure your AI client to run uvx rhinomcp as a local MCP server. In Rhino, type mcpstart to start the TCP bridge (one command per session). Once connected, the AI assistant’s tools become available and you can model, inspect, or script by chatting.

Key features of Rhino

  • Natural-language control of Rhino geometry and Grasshopper graphs.
  • Viewport capture gives the AI visual feedback of the model.
  • Build and wire entire Grasshopper definitions in a single batched operation.
  • Execute native Rhino commands, RhinoScript-Python, or RhinoCommon C#.
  • Single plugin and config entry cover both Rhino and Grasshopper.
  • Two-way interaction: create and read geometry, select and modify objects.

Use cases of Rhino

  • Rapidly prototype 3D models by describing shapes in plain language.
  • Automate repetitive modeling tasks like creating arrays or applying booleans.
  • Let an AI assistant explore design variations by adjusting geometry and Grasshopper parameters.
  • Query and analyze the current Rhino document (measurements, layers, object info) via chat.
  • Learn or debug Grasshopper definitions: ask the AI to build, wire, and solve a graph.

よくある質問

1

What is RhinoMCP?

RhinoMCP is an MCP server that acts as a bridge between Rhino 3D/Grasshopper and AI assistants, allowing them to model, edit, and script inside Rhino through natural language.

2

Which Rhino version and operating systems are supported?

RhinoMCP targets Rhino 8 on Windows and macOS. Rhino 8 must be installed.

3

How do I install and start the server?

Install the `rhinomcp` plugin from Rhino’s Package Manager, then restart Rhino. Configure your AI client with `uvx rhinomcp` (requires `uv`). In Rhino, run the `mcpstart` command to start the bridge. Only one RhinoMCP server should run at a time.

4

Can RhinoMCP work with Grasshopper?

Yes. With Rhino open and `mcpstart` running, the AI can open or create a Grasshopper document, search for components, build and wire a graph, set sliders, and solve it.

5

Does RhinoMCP support custom scripting?

Yes. The server provides tools to run native Rhino commands, execute RhinoScript-Python code, and run RhinoCommon C# code, with built-in RhinoScript documentation lookup for deeper control.

コメント

「その他」の他のコンテンツ