A Model Context Protocol server that enables Cline to translate natural language prompts into Fusion 360 CAD operations by mapping commands to Fusion's API and generating executable Python scripts.
A Model Context Protocol (MCP) server that interfaces between Cline and Autodesk Fusion 360. This server exposes Fusion 360 toolbar-level commands as callable tools that map directly to Fusion's API.
This project allows Cline to:
Clone this repository:
git clone https://github.com/yourusername/fusion360-mcp-server.git cd fusion360-mcp-server
Install dependencies:
pip install -r requirements.txt
cd src python main.py
This will start the FastAPI server at http://127.0.0.1:8000
.
cd src python main.py --mcp
This will start the server in MCP mode, reading from stdin and writing to stdout.
GET /
: Check if the server is runningGET /tools
: List all available toolsPOST /call_tool
: Call a single tool and generate a scriptPOST /call_tools
: Call multiple tools in sequence and generate a scriptcurl -X GET http://127.0.0.1:8000/tools
curl -X POST http://127.0.0.1:8000/call_tool \ -H "Content-Type: application/json" \ -d '{ "tool_name": "CreateSketch", "parameters": { "plane": "xy" } }'
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 } } ] }'
The server currently supports the following Fusion 360 tools:
To use this server with Cline, add it to your MCP settings configuration file:
{ "mcpServers": { "fusion360": { "command": "python", "args": ["/path/to/fusion360-mcp-server/src/main.py", "--mcp"], "env": {}, "disabled": false, "autoApprove": [] } } }
Tools are defined in src/tool_registry.json
. Each tool has:
Example tool definition:
{ "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" }
The server generates Fusion 360 Python scripts based on the tool calls. These scripts can be executed in Fusion 360's Script Editor.
Example generated script:
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: {}'.format(traceback.format_exc()))
src/tool_registry.json
SCRIPT_TEMPLATES
in src/script_generator.py
_process_parameters
in src/script_generator.py
This project is licensed under the MIT License - see the LICENSE file for details.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!