Home / MCP / GH MCP Server

GH MCP Server

Provides an approach for designers to interact with Rhino and Grasshopper via LLMs to analyze 3D models, model procedurally, and generate GHPython scripts.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "grasshopper": {
            "command": "path_to_GH_mcp_server/.venv/bin/python",
            "args": [
                "path_to_GH_mcp_server/run_server.py"
            ]
        }
    }
}

GH MCP Server lets you connect Rhino and Grasshopper to an LLM-powered assistant. You can analyze 3D models, perform modeling tasks, and automatically generate GHPython code in Grasshopper based on your guidance. This makes design exploration and scripting more fluid by combining Rhino/Grasshopper with conversational AI.

How to use

You will interact with the GH MCP Server through an MCP client such as Claude Desktop. Start Rhino to prepare your workflow, then ensure the Grasshopper environment is ready for scripting. In Claude Desktop, configure the Grasshopper MCP entry so prompts can be sent to the local server and receive generated scripts or analysis results.

How to use with the client

1. Launch Rhino and open the 3D model you want to analyze or modify.

2. In Grasshopper, set up a project that can receive generated GHPython code and execute it within the Grasshopper canvas.

3. Open the client application and connect to the Grasshopper MCP server configuration you created. Start interacting with the model by asking the assistant to read the file, analyze objects, or write GHPython code for your design tasks.

Example prompts you can try

Read the file "D:\test01.3dm" first and analyse the objects in this file.

Write GHpython to create a tower referring to zaha and write the ghpython code to "D:\zaha01.py".

Available tools

analyse_3dm

Analyze a 3D model file to extract objects, properties, and spatial relationships to inform subsequent Grasshopper scripting.

generate_ghpython

Automatically generate GHPython code in Grasshopper based on user guidance and model analysis.

interact_gh

Interact with Grasshopper workflows through natural language prompts to modify parameters, create components, and wire GHPython scripts.