Grasshopper Parametric Design MCP server

Connects Grasshopper parametric design software with Claude through a bidirectional TCP server and Python bridge, enabling natural language control of architectural and engineering modeling workflows.
Back to servers
Provider
Alfred at NYCU
Release date
Mar 20, 2025
Language
Python
Package
Stats
605 downloads
12 stars

The Grasshopper MCP Bridge serves as a connection point between Grasshopper and Claude Desktop, using the Model Context Protocol (MCP) standard. This bridge allows you to control Grasshopper through natural language commands, with features like intent recognition and component pattern creation.

Installation

Prerequisites

  • Rhino 7 or higher
  • Grasshopper
  • Python 3.8 or higher
  • Claude Desktop

Installing the Grasshopper MCP Component

Method 1: Download pre-compiled component (Recommended)

  1. Download the GH_MCP.gha file from the GitHub repository
  2. Copy it to the Grasshopper components folder: %APPDATA%\Grasshopper\Libraries\

Method 2: Build from source

If you prefer building from source, clone the repository and build the C# project using Visual Studio.

Installing the Python MCP Bridge Server

Method 1: Install from PyPI (Recommended)

pip install grasshopper-mcp

Method 2: Install from GitHub

pip install git+https://github.com/alfredatnycu/grasshopper-mcp.git

Method 3: Install from Source Code

git clone https://github.com/alfredatnycu/grasshopper-mcp.git
cd grasshopper-mcp
pip install -e .

Install a Specific Version

pip install grasshopper-mcp==0.1.0

Or from a specific GitHub tag:

pip install git+https://github.com/alfredatnycu/[email protected]

Usage

Setting Up

  1. Start Rhino and Grasshopper Launch Rhino and open Grasshopper.

  2. Add the GH_MCP Component to Your Canvas Find the GH_MCP component in the Grasshopper component panel and add it to your canvas.

  3. Start the Python MCP Bridge Server Open a terminal and run:

    python -m grasshopper_mcp.bridge
    

    Note: The grasshopper-mcp command might not work directly due to Python script path issues. Using python -m grasshopper_mcp.bridge is more reliable.

  4. Connect Claude Desktop to the MCP Bridge

    Method 1: Manual Connection In Claude Desktop, connect to the MCP Bridge server using:

    • Protocol: MCP
    • Host: localhost
    • Port: 8080

    Method 2: Auto-Start Configuration Configure Claude Desktop to automatically start the MCP Bridge server:

    "grasshopper": {
      "command": "python",
      "args": ["-m", "grasshopper_mcp.bridge"]
    }
    
  5. Start Using Grasshopper with Claude Desktop You can now control Grasshopper through natural language commands in Claude Desktop.

Example Commands

You can use commands like:

  • "Create a circle with radius 5 at point (0,0,0)"
  • "Connect the circle to a extrude component with a height of 10"
  • "Create a grid of points with 5 rows and 5 columns"
  • "Apply a random rotation to all selected objects"

Troubleshooting

GH_MCP Component Not Loading

  • Ensure the .gha file is in the correct location
  • In Grasshopper, go to File > Preferences > Libraries and click "Unblock" to unblock new components
  • Restart Rhino and Grasshopper

Bridge Server Won't Start

  • If grasshopper-mcp command doesn't work, use python -m grasshopper_mcp.bridge instead
  • Ensure all required Python dependencies are installed
  • Check if port 8080 is already in use by another application

Claude Desktop Can't Connect

  • Ensure the bridge server is running
  • Verify you're using the correct connection settings (localhost:8080)
  • Check the console output of the bridge server for any error messages

Commands Not Executing

  • Verify the GH_MCP component is on your Grasshopper canvas
  • Check the bridge server console for error messages
  • Ensure Claude Desktop is properly connected to the bridge server

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later