Fusion 360 MCP 服务器
模型上下文协议 (MCP) 服务器,用于连接 Cline 和 Autodesk Fusion 360。该服务器将 Fusion 360 工具栏级命令公开为可调用工具,可直接映射到 Fusion 的 API。
🧠 概述
该项目允许 Cline:
- 解析自然语言提示(例如,“制作一个圆角的盒子”)
- 将它们解析为 Fusion 工具操作(例如,CreateSketch → DrawRectangle → Extrude → Fillet)
- 通过这个 MCP 服务器调用这些工具
- 返回可以在 Fusion 360 中执行的 Python 脚本
🛠️ 安装
先决条件
- Python 3.9 或更高版本
- Autodesk Fusion 360
设置
- 克隆此存储库:
- 安装依赖项:
🚀 使用方法
运行 HTTP 服务器
这将在http://127.0.0.1:8000
启动 FastAPI 服务器。
作为 MCP 服务器运行
这将以 MCP 模式启动服务器,从 stdin 读取并写入 stdout。
API 端点
GET /
:检查服务器是否正在运行GET /tools
:列出所有可用工具POST /call_tool
:调用单个工具并生成脚本POST /call_tools
:按顺序调用多个工具并生成脚本
API 调用示例
列表工具
调用单一工具
调用多个工具
📦可用工具
该服务器当前支持以下 Fusion 360 工具:
创造
- CreateSketch :在指定平面上创建新草图
- DrawRectangle :在活动草图中绘制一个矩形
- DrawCircle :在活动草图中绘制一个圆圈
- 挤压:将轮廓挤压成 3D 体
- 旋转:围绕轴旋转轮廓
调整
- 圆角:向选定的边缘添加圆角
- 倒角:为选定的边缘添加倒角
- 壳:挖空具有指定壁厚的实体
- 合并:使用布尔运算合并两个物体
出口
- ExportBody :将主体导出到文件
🔌 MCP 集成
要将此服务器与 Cline 一起使用,请将其添加到您的 MCP 设置配置文件中:
🧩 工具注册表
工具定义在src/tool_registry.json
中。每个工具都有:
- name :工具的名称
- 描述:该工具的作用
- 参数:该工具接受的参数
- docs :链接到相关的 Fusion API 文档
工具定义示例:
📝 脚本生成
服务器根据工具调用生成 Fusion 360 Python 脚本。这些脚本可以在 Fusion 360 的脚本编辑器中执行。
生成的脚本示例:
🧪 扩展服务器
添加新工具
- 向
src/tool_registry.json
添加新的工具定义 - 向
src/script_generator.py
中的SCRIPT_TEMPLATES
添加脚本模板 - 在
src/script_generator.py
中的_process_parameters
中添加参数处理逻辑
📚 文档链接
🔄 未来的增强功能
- 上下文感知操作的会话状态跟踪
- 动态工具注册
- 通过套接字或文件轮询实现自动化
- 更多 Fusion 命令
📄 许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
模型上下文协议服务器,通过将命令映射到 Fusion 的 API 并生成可执行的 Python 脚本,使 Cline 能够将自然语言提示转换为 Fusion 360 CAD 操作。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.Last updated -484TypeScript
- -securityFlicense-qualityA Model Context Protocol server that allows management and execution of Blender Python scripts, enabling users to create, edit and run scripts in a headless Blender environment through natural language interfaces.Last updated -4Python
- AsecurityFlicenseAqualityA CLI tool that runs a Model Context Protocol server over stdio, enabling interaction with specification documents like business requirements, product requirements, and user stories for the Specif-ai platform.Last updated -90TypeScript
- -securityFlicense-qualityA Model Context Protocol server for Unity game development that enables users to manage projects, edit scenes, create prefabs, and generate scripts through natural language integration with Smithery.ai.Last updated -TypeScript