Grasshopper Parametric Design

Grasshopper Parametric Design

🚀 蝈蝈 MCP 桥接服务器

蝈蝈 MCP 桥接服务器是一个用于连接 Grasshopper 和 Claude Desktop 的中转服务器,它基于模型上下文协议(MCP)标准构建,能有效实现两者之间的数据交互与功能协同。

🚀 快速开始

Grasshopper MCP Bridge 可通过 MCP 协议将 Grasshopper 和 Claude Desktop 连接起来,使用前请按以下步骤操作:

  1. 克隆仓库
git clone https://github.com/yourusername/grasshopper-mcp.git
cd grasshopper-mcp
  1. 安装 Python 依赖项
pip install -r requirements.txt
  1. 编译 Grasshopper 组件
// 在 GH_MCP 文件夹中打开 Visual Studio 项目并进行编译
  1. 启动桥接服务器
python grasshopper_mcp/bridge.py

启动桥接服务器

在 Grasshopper 的命令行界面中输入以下命令:

import sys
sys.path.append(r"你的路径\grasshopper-mcp\grasshopper_mcp")
import bridge
bridge.start()

连接到 Claude Desktop

  1. 打开 Claude 桌面版。
  2. 转到 编辑 > 首选项 > 网络设置
  3. 输入地址:http://localhost:8080
  4. 保存设置并重新启动 Claude。

✨ 主要特性

  • 通过 MCP 协议将 Grasshopper 和 Claude Desktop 连接起来。
  • 提供直观的工具功能,用于创建和连接 Grasshopper 组件。
  • 支持高级意图识别,可根据简单描述自动生成复杂组件模式。
  • 包含适用于所有组件的预设库。
  • 附带详细说明文档。

🔧 技术细节

系统架构

grasshopper-mcp/
├── grasshopper_mcp/       # Python 桥接服务器
│   ├── __init__.py
│   └── bridge.py          # 主桥接服务器实现
├── GH_MCP/                # Grasshopper 组件 (C#)
│   └── ...
├── releases/              # 预编译二进制文件
│   └── GH_MCP.gha         # 编译好的 Grasshopper 组件
├── setup.py               # Python 包设置
└── README.md              # 本文件

项目结构

grasshopper-mcp/
├── grasshopper_mcp/       # Python 桥接服务器
│   ├── __init__.py
│   └── bridge.py          # 主桥接服务器实现
├── GH_MCP/                # Grasshopper 组件 (C#)
│   └── ...
├── releases/              # 预编译二进制文件
│   └── GH_MCP.gha         # 编译好的 Grasshopper 组件
├── setup.py               # Python 包设置
└── README.md              # 本文件

📚 详细文档

故障排除

问题1:Grasshopper 组件未加载

  • 确保 .gha 文件位于正确位置。
  • 在 Grasshopper 中,转到 文件 > 首选项 > 库 并点击“解除阻止”以解除新组件的限制。
  • 重启 Rhino 和 Grasshopper。

问题2:桥接服务器无法启动

  • 如果命令无效,请使用 python -m grasshopper_mcp.bridge 替代。
  • 确保所有 Python 依赖项已安装。
  • 检查端口 8080 是否被其他程序占用。

如何贡献

欢迎贡献!请随意提交 Pull Request。

📄 许可证

本项目遵循 MIT 许可证,具体内容请参见 LICENSE 文件。

致谢

  • 感谢 Rhino 和 Grasshopper 社区提供的优秀工具。
  • 感谢 Anthropic 提供的 Claude Desktop 和 MCP 协议。
  • 0 关注
  • 0 收藏,20 浏览
  • system 提出于 2025-10-01 23:42

相似服务问题

相关AI产品