Fusion 360 MCP Server

MIT License

Integrations

  • Interfaces with Autodesk Fusion 360 to execute CAD modeling operations, allowing users to create 3D designs through natural language commands that are converted into Fusion 360 toolbar-level commands and Python scripts.

  • Provides an HTTP API server implementation with endpoints for listing tools, calling individual tools, and executing sequences of tools for Fusion 360 operations.

Servidor Fusion 360 MCP

Un servidor de Protocolo de contexto de modelo (MCP) que interactúa entre Cline y Autodesk Fusion 360. Este servidor expone los comandos de nivel de barra de herramientas de Fusion 360 como herramientas invocables que se asignan directamente a la API de Fusion.

🧠 Descripción general

Este proyecto permite a Cline:

  • Analizar indicaciones en lenguaje natural (por ejemplo, "Haz una caja con esquinas redondeadas")
  • Resolverlos en acciones de la herramienta Fusión (por ejemplo, Crear Boceto → Dibujar Rectángulo → Extruir → Redondear)
  • Llama a esas herramientas a través de este servidor MCP
  • Devuelve scripts de Python que se pueden ejecutar en Fusion 360

🛠️ Instalación

Prerrequisitos

  • Python 3.9 o superior
  • Autodesk Fusion 360

Configuración

  1. Clonar este repositorio:
    git clone https://github.com/yourusername/fusion360-mcp-server.git cd fusion360-mcp-server
  2. Instalar dependencias:
    pip install -r requirements.txt

🚀 Uso

Ejecución del servidor HTTP

cd src python main.py

Esto iniciará el servidor FastAPI en http://127.0.0.1:8000 .

Ejecutándose como un servidor MCP

cd src python main.py --mcp

Esto iniciará el servidor en modo MCP, leyendo desde stdin y escribiendo en stdout.

Puntos finales de API

  • GET / : Comprueba si el servidor está en ejecución
  • GET /tools : Lista todas las herramientas disponibles
  • POST /call_tool : Llamar a una sola herramienta y generar un script
  • POST /call_tools : Llamar a múltiples herramientas en secuencia y generar un script

Ejemplos de llamadas API

Herramientas de lista
curl -X GET http://127.0.0.1:8000/tools
Llamar a una sola herramienta
curl -X POST http://127.0.0.1:8000/call_tool \ -H "Content-Type: application/json" \ -d '{ "tool_name": "CreateSketch", "parameters": { "plane": "xy" } }'
Llamar a varias herramientas
curl -X POST http://127.0.0.1:8000/call_tools \ -H "Content-Type: application/json" \ -d '{ "tool_calls": [ { "tool_name": "CreateSketch", "parameters": { "plane": "xy" } }, { "tool_name": "DrawRectangle", "parameters": { "width": 10, "depth": 10 } }, { "tool_name": "Extrude", "parameters": { "height": 5 } } ] }'

📦 Herramientas disponibles

Actualmente, el servidor admite las siguientes herramientas de Fusion 360:

Crear

  • CreateSketch : crea un nuevo boceto en un plano específico
  • DrawRectangle : dibuja un rectángulo en el boceto activo
  • DrawCircle : dibuja un círculo en el boceto activo
  • Extruir : extruye un perfil en un cuerpo 3D
  • Girar : gira un perfil alrededor de un eje

Modificar

  • Filete : agrega un filete a los bordes seleccionados
  • Chaflán : agrega un chaflán a los bordes seleccionados
  • Carcasa : ahueca un cuerpo sólido con un espesor de pared especificado
  • Combinar : combina dos cuerpos mediante operaciones booleanas

Exportar

  • ExportBody : exporta un cuerpo a un archivo

🔌 Integración MCP

Para utilizar este servidor con Cline, agréguelo a su archivo de configuración de MCP:

{ "mcpServers": { "fusion360": { "command": "python", "args": ["/path/to/fusion360-mcp-server/src/main.py", "--mcp"], "env": {}, "disabled": false, "autoApprove": [] } } }

🧩 Registro de herramientas

Las herramientas se definen en src/tool_registry.json . Cada herramienta tiene:

  • nombre : El nombre de la herramienta
  • Descripción : Qué hace la herramienta
  • parámetros : Los parámetros que acepta la herramienta
  • docs : Enlace a la documentación relevante de la API de Fusion

Ejemplo de definición de herramienta:

{ "name": "Extrude", "description": "Extrudes a profile into a 3D body.", "parameters": { "profile_index": { "type": "integer", "description": "Index of the profile to extrude.", "default": 0 }, "height": { "type": "number", "description": "Height of the extrusion in mm." }, "operation": { "type": "string", "description": "The operation type (e.g., 'new', 'join', 'cut', 'intersect').", "default": "new" } }, "docs": "https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-6D381FCD-22AB-4F08-B4BB-5D3A130189AC" }

📝 Generación de scripts

El servidor genera scripts Python de Fusion 360 basados en las llamadas a la herramienta. Estos scripts se pueden ejecutar en el editor de scripts de Fusion 360.

Ejemplo de script generado:

import adsk.core, adsk.fusion, traceback def run(context): ui = None try: app = adsk.core.Application.get() ui = app.userInterface design = app.activeProduct # Get the active component in the design component = design.rootComponent # Create a new sketch on the xy plane sketches = component.sketches xyPlane = component.xYConstructionPlane sketch = sketches.add(xyPlane) # Draw a rectangle rectangle = sketch.sketchCurves.sketchLines.addTwoPointRectangle( adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(10, 10, 0) ) # Extrude the profile prof = sketch.profiles.item(0) extrudes = component.features.extrudeFeatures extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation) distance = adsk.core.ValueInput.createByReal(5) extInput.setDistanceExtent(False, distance) extrude = extrudes.add(extInput) ui.messageBox('Operation completed successfully') except: if ui: ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

🧪 Ampliación del servidor

Agregar nuevas herramientas

  1. Agregar una nueva definición de herramienta a src/tool_registry.json
  2. Agregue una plantilla de script a SCRIPT_TEMPLATES en src/script_generator.py
  3. Agregue lógica de procesamiento de parámetros a _process_parameters en src/script_generator.py

📚 Enlaces de documentación

🔄 Mejoras futuras

  • Seguimiento del estado de la sesión para operaciones sensibles al contexto
  • Registro dinámico de herramientas
  • Automatización mediante sondeo de sockets o archivos
  • Más comandos de Fusion

📄 Licencia

Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.

-
security - not tested
A
license - permissive license
-
quality - not tested

Un servidor de protocolo de contexto de modelo que permite a Cline traducir indicaciones en lenguaje natural en operaciones CAD de Fusion 360 asignando comandos a la API de Fusion y generando scripts de Python ejecutables.

  1. 🧠 Overview
    1. 🛠️ Installation
      1. Prerequisites
      2. Setup
    2. 🚀 Usage
      1. Running the HTTP Server
      2. Running as an MCP Server
      3. API Endpoints
      4. Example API Calls
    3. 📦 Available Tools
      1. Create
      2. Modify
      3. Export
    4. 🔌 MCP Integration
      1. 🧩 Tool Registry
        1. 📝 Script Generation
          1. 🧪 Extending the Server
            1. Adding New Tools
          2. 📚 Documentation Links
            1. 🔄 Future Enhancements
              1. 📄 License

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A 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 -
                  48
                  4
                  TypeScript
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A 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 -
                  4
                  Python
                • A
                  security
                  F
                  license
                  A
                  quality
                  A 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 -
                  9
                  0
                  TypeScript
                • -
                  security
                  F
                  license
                  -
                  quality
                  A 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

                View all related MCP servers

                ID: zorqcmyr4n