Skip to main content
Glama

Fusion 360 MCP Integration

by sockcymbal

Autodesk Fusion 360 MCP 集成

Fusion MCP(模型上下文协议)应用程序是一个集成系统,使 AI 助手能够以编程方式与 Autodesk Fusion 360 进行交互。此实现具体演示了如何通过简单的 API 调用创建参数化 3D 模型,从而弥合了对话式 AI 和 CAD 软件之间的差��。

概述

Fusion 360 MCP 集成使 AI 助手能够控制 Fusion 360 执行 3D 建模任务。该项目尤其适用于以下领域:

  • AI辅助CAD设计工作流程
  • 参数化3D模型生成
  • 在 Fusion 360 中自动执行重复设计任务
  • 创建 Fusion 360 的编程接口

成分

该集成由三个主要部分组成:

1. LiveCube 脚本( LiveCube.pyLiveCube.manifest

Fusion 360 插件:

  • 在 Fusion 360 中作为脚本运行
  • 创建具有指定尺寸的参数立方体
  • 在端口 18080 上公开 HTTP 端点以接收命令
  • 可以通过简单的 HTTP GET 请求触发

2. 融合服务器( fusion_server.py

中介服务器:

  • 充当 MCP 和 Fusion 360 之间的桥梁
  • 监听 8000 端口上的 MCP 请求
  • 将 MCP 调用转换为 Fusion 360 可以理解的格式
  • 处理与 LiveCube 脚本的通信

3. MCP 服务器( fusion_mcp.py

模型上下文协议服务器:

  • 提供人工智能助手可以使用的工具
  • 与 Autodesk 平台服务 (APS) 集成,实现云自动化
  • 提供用于创建参数立方体generate_cube工具
  • 使用 OAuth 身份验证来安全访问 APS

特征

  • 立方体创建:生成具有指定尺寸的参数立方体
  • Autodesk 平台服务集成:使用 APS 设计自动化进行复杂操作
  • 简单的 HTTP 接口:用于控制 Fusion 360 的易于使用的 API
  • 符合 MCP 标准:可与任何兼容 MCP 的 AI 助手配合使用

安装

先决条件

  • Autodesk Fusion 360(2023 或更新版本)
  • Python 3.9+ 及 pip
  • 具有 API 访问权限的 Autodesk 平台服务帐户
  • MCP 兼容的 AI 助手(如 Windsurf 环境中的 Claude)

设置说明

  1. 安装Python依赖项
    pip install -r requirements.txt
  2. 设置环境变量:使用您的 Autodesk Platform Services 凭据创建keys.env文件:
    APS_CLIENT_ID=your_client_id APS_CLIENT_SECRET=your_client_secret FUSION_ACTIVITY_ID=your_activity_id
  3. 在 Fusion 360 中安装 LiveCube 脚本
    • 打开 Fusion 360
    • 导航至脚本和插件 (Shift+S)
    • 点击绿色“+”按钮并选择“添加脚本”
    • 浏览并选择此存储库中的LiveCube文件夹
    • 该脚本现在应该出现在你的脚本列表中

用法

启动服务器

  1. 启动 Fusion 服务器
    python fusion_server.py
    这将开始监听http://localhost:8000
  2. 运行 LiveCube 脚本
    • 在 Fusion 360 中,转到脚本和插件
    • 选择 LiveCube 并点击“运行”
    • 这将在端口 18080 上启动 Fusion 360 内的 HTTP 服务器
  3. 启动 MCP 服务器
    python fusion_mcp.py
    这将默认启动带有 stdio 传输的 MCP 服务器。

与人工智能助手一起使用

配置兼容 MCP 的 AI 助手,使其连接到 Fusion MCP 服务器。例如,使用 Claude Desktop:

{ "mcpServers": { "fusion": { "command": "python", "args": ["/path/to/fusion_mcp.py"] } } }

然后,AI 可以使用generate_cube工具在 Fusion 360 中创建立方体。

直接 API 访问

您还可以直接与 LiveCube 脚本 HTTP 端点进行交互:

GET http://127.0.0.1:18080/cmd?edge=50

这将在 Fusion 360 中创建一个边长为 50 毫米的立方体。

开发者笔记

  • MCP 服务器使用 OAuth 2.0 身份验证与 Autodesk 平台服务 (APS) 进行通信
  • 对于高级用例,修改fusion_mcp.py以添加除创建多维数据集之外的其他工具
  • 通过在fusion_server.py和相应的 Fusion 360 脚本中添加新的处理程序,可以扩展系统架构以支持其他 Fusion 360 操作

执照

麻省理工学院

致谢

  • Autodesk 的 Fusion 360 API 和平台服务
  • 模型上下文协议 (MCP) 创建者,用于实现 AI 工具互操作性 npx @modelcontextprotocol/server-everything
### Or specify stdio explicitly ```shell npx @modelcontextprotocol/server-everything stdio

运行 SSE 服务器

npx @modelcontextprotocol/server-everything sse

运行可流式传输的 HTTP 服务器

npx @modelcontextprotocol/server-everything streamableHttp
-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

使 AI 助手能够以编程方式与 Autodesk Fusion 360 进行交互,以通过简单的 API 调用创建参数化 3D 模型。

  1. 概述
    1. 成分
      1. 1. LiveCube 脚本( LiveCube.py和LiveCube.manifest )
      2. 2. 融合服务器( fusion_server.py )
      3. 3. MCP 服务器( fusion_mcp.py )
    2. 特征
      1. 安装
        1. 先决条件
        2. 设置说明
      2. 用法
        1. 启动服务器
        2. 与人工智能助手一起使用
        3. 直接 API 访问
      3. 开发者笔记
        1. 执照
          1. 致谢
            1. 运行 SSE 服务器
            2. 运行可流式传输的 HTTP 服务器

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            Transform your Make scenarios into callable tools for AI assistants. Leverage your existing automation workflows while enabling AI systems to trigger and interact with them seamlessly.
            Last updated -
            6
            35
            132
            MIT License
          • -
            security
            A
            license
            -
            quality
            This project provides a robust integration between AI assistants and FreeCAD CAD software using the Model Context Protocol (MCP). It allows external applications to interact with FreeCAD through a standardized interface, offering multiple connection methods and specialized tools.
            Last updated -
            13
            MIT License
            • Linux
          • A
            security
            A
            license
            A
            quality
            Allows AI assistants to interact with Autodesk Revit through the MCP protocol, enabling the AI to create, modify, and delete elements in Revit projects.
            Last updated -
            15
            27
            1
            MIT License
          • -
            security
            -
            license
            -
            quality
            Enables AI assistants like Claude to interact with Autodesk Construction Cloud Build platform for construction project management, including issues tracking, RFIs, submittals, and document management through natural language.
            Last updated -

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/sockcymbal/autodesk-fusion-mcp-python'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server