### Developer Setup and Run MCP-Link-Server (Bash) Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/WELCOME.md This snippet outlines the steps for developers to set up and run the MCP-Link-Server using a custom Python environment. It involves cloning the repository, installing dependencies, and executing the server script. Note that the static build includes enhanced features not present in standard Python installations. ```bash git clone https://github.com/AuraFriday/mcp-link-server.git cd mcp-link-server pip install -r requirements.txt python server.py ``` -------------------------------- ### Get Fusion Best Practices Guide Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/README.md This snippet retrieves the Fusion best practices guide. It provides AI with information on recommended patterns and guidelines for developing within Fusion, such as coordinate systems, body naming, and PTransaction usage. ```python fusion360.execute({ "operation": "get_best_practices" }) ``` -------------------------------- ### Get Fusion Online Documentation with Samples Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/README.md This snippet fetches rich online documentation for Fusion API classes and members, including working code samples. It requires specifying the 'class_name' and optionally 'member_name' to retrieve detailed information and practical examples. ```python fusion360.execute({ "operation": "get_online_documentation", "class_name": "ExtrudeFeatures", "member_name": "createInput" }) ``` -------------------------------- ### View Server Logs for Fusion 360 Registration Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/QUICK_START.md Examine the server's log file to confirm that the 'fusion360' tool has been successfully registered. This command uses `tail` to show the last 100 lines and `grep -v` to exclude 'ping' entries, focusing on registration messages. ```powershell tail -100 C:\Users\cnd\AppData\Local\Temp\friday.log | grep -v ": ping" ``` -------------------------------- ### Example Error Output for Fusion 360 Connection Step Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/IMPLEMENTATION_SUMMARY.md This example illustrates the detailed error reporting implemented for connection steps within the Fusion 360 add-in. It shows the specific step that failed, the error message, and the expected locations for troubleshooting. ```text Step 1: Finding native messaging manifest... ERROR: Could not find native messaging manifest Expected locations: Windows: %LOCALAPPDATA%\AuraFriday\com.aurafriday.shim.json ``` -------------------------------- ### Install Fusion 360 MCP Server Add-in (Bash) Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/README.md This bash script demonstrates the manual installation process for the Fusion 360 MCP Server add-in by cloning the repository. It outlines the steps to clone the Git repository and then load it as a Fusion add-in through the Fusion 360 interface. ```bash git clone https://github.com/AuraFriday/Fusion-360-MCP-Server.git ``` -------------------------------- ### Fusion 360 API Examples Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/ARCHITECTURE.md Illustrates common Fusion 360 API calls for interacting with the active product, components, sketches, and features. These methods are used to programmatically manipulate designs within Fusion 360. ```javascript app.activeProduct.rootComponent rootComponent.sketches.add() sketch.sketchCurves.sketchLines.addTwoPointRectangle() rootComponent.features.extrudeFeatures.addSimple() etc. ``` -------------------------------- ### SSE Message Format Example Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/ARCHITECTURE.md This example demonstrates the Server-Sent Events (SSE) message format used by the Fusion 360 MCP Server. It shows different event types like 'endpoint' and 'message', with 'data' payloads containing either endpoint URLs or JSON-RPC messages. ```text event: endpoint data: /messages/?session_id=abc123 event: message data: {"jsonrpc": "2.0", "id": "uuid", "result": {...}} event: message data: {"reverse": {"tool": "fusion360", "call_id": "xyz", "input": {...}}} ``` -------------------------------- ### MCP Client Connection Error Handling Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/ARCHITECTURE.md Provides an example of how to handle potential connection errors when initializing and connecting the MCPClient. It uses a try-except block to catch exceptions and display user-friendly error messages. ```python try: client = MCPClient(...) success = client.connect() if not success: ui.messageBox("Connection failed") except Exception as e: futil.handle_error("Connection error", show_message_box=True) ``` -------------------------------- ### Get API Documentation with Fusion 360 MCP Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/README.md Demonstrates how to retrieve API documentation for Fusion 360 using the MCP-Link Server. It covers searching by class name, getting rich documentation with code samples for specific members, and fetching best practices guides. This operation requires the MCP-Link server to be running and accessible. ```python fusion360.execute({ "operation": "get_api_documentation", "search_term": "Sketch", "category": "class_name", "max_results": 3 }) # Get rich docs with code samples fusion360.execute({ "operation": "get_online_documentation", "class_name": "ExtrudeFeatures", "member_name": "createInput" }) # Returns: Full parameter descriptions, return types, and 8 working examples! # Get best practices guide fusion360.execute({ "operation": "get_best_practices" }) # Returns: Coordinate systems, body naming, construction planes, PTransaction patterns ``` -------------------------------- ### API Path Examples in Python Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/README.md Demonstrates various ways to access Fusion 360 API elements, including direct access via the app object, using stored objects, full module paths, and static methods. ```python "design.rootComponent.sketches.add" "$sketch.sketchCurves.sketchCircles.addByCenterRadius" "adsk.core.Point3D.create" "adsk.core.ValueInput.createByString" ``` -------------------------------- ### Verify Fusion 360 Add-in Logs Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/QUICK_START.md Check the Fusion 360 TEXT COMMANDS window for specific log messages to confirm the add-in has successfully registered and connected to the server. These messages indicate the status of the manifest, server URL, and SSE connection. ```text [OK] Found manifest: ... [OK] Server URL: https://127-0-0-1.local.aurafriday.com:... [OK] SSE Connected! Session ID: ... [SUCCESS] fusion360 registered successfully! ``` -------------------------------- ### MCP Tool Calling Example in Python Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/README.md Provides the structure for calling other MCP tools. It includes the operation type, the name of the tool to be called, and the arguments to pass to that tool. ```python { "operation": "call_tool", "tool_name": "sqlite", "arguments": {"input": {...}} } ``` -------------------------------- ### Best Practices Guide Source: https://context7.com/aurafriday/fusion-360-mcp-server/llms.txt Retrieves comprehensive Fusion 360 design best practices, including coordinate system conventions, body naming strategies, construction plane techniques, and atomic undo with PTransaction. ```APIDOC ## POST /fusion360/execute (Best Practices) ### Description Retrieves comprehensive Fusion 360 design best practices. ### Method POST ### Endpoint /fusion360/execute ### Parameters #### Request Body - **operation** (string) - Required - Set to "get_best_practices". ### Request Example ```json { "fusion360.execute": { "operation": "get_best_practices" } } ``` ### Response #### Success Response (200) - **best_practices** (array) - An array of strings, each representing a best practice. #### Response Example ```json [ "Coordinate System: X=Width(red), Y=Height(green/UP), Z=Depth(blue)", "Body Naming: Always name bodies immediately after creation", "Use XZ plane for \"floor\" sketches, extrude in Y for height", "PTransaction for atomic undo:" " app.executeTextCommand('PTransaction.Start \"My Operation\"')" " # ... operations ..." " app.executeTextCommand('PTransaction.Commit')" ] ``` ``` -------------------------------- ### Test Fusion 360 Tool Call from AI Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/QUICK_START.md This Python code snippet demonstrates how to call the 'fusion360' tool from an AI agent, sending a simple 'echo_test' command with a message parameter. The output is expected to appear in the Fusion 360 TEXT COMMANDS window. ```python result = mcp.call_tool("fusion360", { "command": "echo_test", "parameters": { "message": "Hello from AI!" } }) ``` -------------------------------- ### Configure MCP-Link Fusion Add-in Auto-Connect and Debug Logging Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/QUICK_START.md These Python configuration settings control the automatic connection behavior and the verbosity of logging for the MCP-Link add-in. `MCP_AUTO_CONNECT` determines if the add-in connects on startup, while `DEBUG` and `MCP_DEBUG` control general and specific MCP logging. ```python # config.py MCP_AUTO_CONNECT = True # Connects automatically on startup # config.py DEBUG = True # General add-in logging MCP_DEBUG = True # Verbose MCP connection logs ``` -------------------------------- ### Fusion 360 API Type Examples - Python Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/demo.md Provides examples of how to represent common Fusion 360 API types when interacting with the system via MCP. It shows the correct format for Point3D objects and how to use integer codes for Enum values. ```python # Point3D - WORKS {"type": "Point3D", "x": 0, "y": 0, "z": 0} # Enums - Use integer values # FeatureOperations: 0=NewBody, 1=Join, 2=Cut, 3=Intersect 0 # for NewBodyFeatureOperation ``` -------------------------------- ### JSON-RPC Request Format Example Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/ARCHITECTURE.md This JSON object illustrates the structure of a JSON-RPC request used for interacting with the Fusion 360 MCP Server. It includes fields for version, ID, method ('tools/call'), and parameters, specifying the tool name and its arguments. ```json { "jsonrpc": "2.0", "id": "uuid-here", "method": "tools/call", "params": { "name": "fusion360", "arguments": { "command": "create_box", "parameters": { "length": 10, "width": 10, "height": 10, "units": "cm" } } } } ``` -------------------------------- ### Tool Registration via POST Request Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/INTEGRATION_GUIDE.md This snippet details the tool registration process using a POST request to the `tools/call` endpoint with the `remote.register` method. It includes waiting for confirmation of success. ```text POST tools/call (remote.register) → Wait for confirmation → Success! ``` -------------------------------- ### Execute Python Code with MCP Bridge Source: https://context7.com/aurafriday/fusion-360-mcp-server/llms.txt Shows how to execute Python code using the MCP bridge. This example demonstrates storing parts data in SQLite, displaying a popup to the user with results, and opening a URL in the browser. ```python # Store analysis results in SQLite mcp.call('sqlite', { 'input': { 'sql': 'INSERT INTO parts (name, volume) VALUES (?, ?)', 'params': ['Bracket', 125.5], 'database': 'parts.db', 'tool_unlock_token': '29e63eb5' } }) # Show results popup to user mcp.call('user', { 'input': { 'operation': 'show_popup', 'html': '
Volume: 125.5 cm³
', 'width': 300, 'height': 150, 'tool_unlock_token': '1d9bf6a0' } }) # Open documentation in browser mcp.call('browser', { 'input': { 'operation': 'navigate', 'url': 'https://help.autodesk.com/view/fusion360/', 'tool_unlock_token': 'e5076d' } }) ``` -------------------------------- ### Atomic Commits for Patch Generation Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/CONTRIBUTING.md This example demonstrates a workflow for making small, logical changes and committing them individually. Atomic commits are crucial for generating clean, reviewable patch files. Each commit should have a clear message explaining the change. ```bash # Example of a good commit workflow # (edit file1.js, file2.js) git add . git commit -m "feat: Add geolocation tool foundation" # (edit file3.js) git add . git commit -m "fix: Correct error handling in geolocation response" ``` -------------------------------- ### SSE Connection Establishment Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/INTEGRATION_GUIDE.md This describes the Server-Sent Events (SSE) connection flow. It involves making a GET request to the SSE endpoint, receiving a session ID, storing the message endpoint, and starting a reader thread. ```text GET /sse → Receive session_id → Store message endpoint → Start reader thread ``` -------------------------------- ### MCP Client Startup Log Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/IMPLEMENTATION_SUMMARY.md This log details the successful startup sequence of the MCP client when MCP_AUTO_CONNECT is set to True. It shows the steps from finding the manifest to registering with the MCP server and establishing an SSE connection. ```text ============================================================ MCP Client Connection Starting ============================================================ Step 1: Finding native messaging manifest... [OK] Found manifest: C:\Users\...\com.aurafriday.shim.json Step 2: Reading manifest... [OK] Manifest loaded Step 3: Discovering MCP server endpoint... [OK] Server configuration received Step 4: Extracting server URL and auth... [OK] Server URL: https://127-0-0-1.local.aurafriday.com:XXXXX/sse Step 5: Connecting to SSE endpoint... [OK] SSE Connected! Session ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Step 6: Checking for remote tool... [OK] Remote tool found Step 7: Registering fusion360 with MCP server... ============================================================ [SUCCESS] fusion360 registered successfully! Listening for reverse tool calls in background... ============================================================ ``` -------------------------------- ### MCPClient Connection Sequence Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/ARCHITECTURE.md Details the step-by-step connection process initiated by the MCPClient to establish communication with the MCP Server. This flow involves finding manifests, running binaries, and registering tools. ```bash # User clicks 'Connect' # Fusion 360 creates a new MCPClient # MCPClient finds manifest # MCPClient reads manifest # MCPClient runs binary (with JSON config) # MCPClient connects to SSE # MCPClient registers tool # MCPClient starts listener # Fusion 360 receives connection confirmation ``` -------------------------------- ### Minimal Fusion 360 API Example: Extruded Text (Python) Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/extrude_text.md A complete, copy-pasteable Python script for Fusion 360 that demonstrates the entire process: getting the design, creating a sketch, adding text, and extruding it. This example is designed to be robust against recent API changes. ```Python # Always run inside Fusion's Python environment import adsk.core import adsk.fusion def run(context): ui = None try: app = adsk.core.Application.get() ui = app.userInterface design = adsk.fusion.Design.cast(app.activeProduct) if not design: ui.messageBox('No active Fusion design found.', 'Error') return root_comp = design.rootComponent # 1. Create a new sketch on the XY plane xy_plane = root_comp.xYConstructionPlane sketches = root_comp.sketches sketch = sketches.add(xy_plane) # 2. Create sketch text input text_input = None if hasattr(sketch.sketchTexts, 'createInput3'): text_input = sketch.sketchTexts.createInput3() else: # Fallback for older versions, height in cm text_input = sketch.sketchTexts.createInput2(adsk.core.ValueInput.createByReal(2.0)) # 2 cm height text_input.fontName = "Arial" text_input.text = "API Text" # Example: set as multi-line with center alignment text_input.setAsMultiLine() text_input.horizontalAlignment = adsk.fusion.HorizontalAlignments.CenterHorizontalAlign text_input.verticalAlignment = adsk.fusion.VerticalAlignments.CenterVerticalAlign # 3. Add the sketch text entity sketch_text = sketch.sketchTexts.add(text_input) # Position the text (example: move it after creation) # Note: Direct manipulation of SketchText position is limited. # Often, you'd define the position during input creation or transform the sketch. # For simplicity, we'll assume default placement is acceptable or transform later. # 4. Extrude the sketch text features = root_comp.features extrude_features = features.extrudeFeatures # Use the simplest extrude method distance_input = adsk.core.ValueInput.createByReal(1.0) # 1 cm extrusion extrude_input = extrude_features.addSimple(sketch_text, distance_input, adsk.fusion.FeatureOperations.NewBodyFeatureOperation) ui.messageBox('Successfully created extruded text.') except Exception as e: if ui: ui.messageBox(f'Failed: {str(e)}', 'Error') ``` -------------------------------- ### Object Construction Examples in Python Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/README.md Illustrates how to construct various Fusion 360 objects using dictionaries, including points, vectors, value inputs with different formats, and empty collections. It also shows how to reference stored objects and use enums as integers. ```python { "type": "Point3D", "x": 5, "y": 10, "z": 0 } { "type": "Vector3D", "x": 1, "y": 0, "z": 0 } { "type": "ValueInput", "value": 2.5 } { "type": "ValueInput", "expression": "2.5 cm" } { "type": "ObjectCollection" } "$my_sketch.originPoint" 0 ``` -------------------------------- ### AI Agent Request to Control Fusion 360 Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/INTEGRATION_GUIDE.md This shows an example of an AI agent's request to control Fusion 360, specifically asking to create a 10cm cube. ```text "Use the fusion360 tool to create a 10cm cube" ``` -------------------------------- ### Set Extrusion Start Extent with Offset in Python Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/best_practices.md Precisely positions the start of an extrusion operation using a base plane and a real-valued offset. This method is recommended over move operations for reliable positioning. ```python extInput.startExtent = adsk.fusion.FromEntityStartDefinition.create( basePlane, adsk.core.ValueInput.createByReal(height) ) ``` -------------------------------- ### Online Documentation Fetch Source: https://context7.com/aurafriday/fusion-360-mcp-server/llms.txt Fetches rich documentation from Autodesk's cloudhelp pages, including parameter tables, return types, and working code samples. ```APIDOC ## POST /fusion360/execute (Online Doc Fetch) ### Description Fetches detailed documentation from Autodesk's cloudhelp pages. ### Method POST ### Endpoint /fusion360/execute ### Parameters #### Request Body - **operation** (string) - Required - Set to "get_online_documentation". - **class_name** (string) - Required - The name of the class to get documentation for. - **member_name** (string) - Optional - The name of the member (method or property) to get documentation for. ### Request Example (Class Level) ```json { "fusion360.execute": { "operation": "get_online_documentation", "class_name": "ExtrudeFeatures" } } ``` ### Request Example (Member Level) ```json { "fusion360.execute": { "operation": "get_online_documentation", "class_name": "ExtrudeFeatures", "member_name": "createInput" } } ``` ### Response #### Success Response (200) - **documentation** (object) - An object containing detailed documentation. - **url** (string) - The URL of the online documentation. - **class_name** (string) - The name of the class. - **member_name** (string) - The name of the member (if specified). - **description** (string) - A description of the class or member. - **parameters** (array) - An array of parameter objects (if applicable). - **return_type** (string) - The return type of the member (if applicable). - **return_description** (string) - A description of the return value (if applicable). - **samples** (array) - An array of code sample objects (if applicable). #### Response Example ```json { "url": "https://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/ExtrudeFeatures_createInput.htm", "class_name": "ExtrudeFeatures", "member_name": "createInput", "description": "Creates an ExtrudeFeatureInput object...", "parameters": [ {"name": "profile", "type": "Base", "description": "The profile to extrude..."}, {"name": "operation", "type": "FeatureOperations", "description": "The feature operation..."} ], "return_type": "ExtrudeFeatureInput", "return_description": "The newly created ExtrudeFeatureInput object", "samples": [ {"name": "SimpleExtrude", "description": "Creates a simple extrusion", "url": "..."} ] } ``` ``` -------------------------------- ### Fusion 360 Python Tool Handler Example Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/INTEGRATION_SUMMARY.md An example implementation of a tool handler function in Python for Fusion 360. This function processes incoming commands from the MCP server, currently echoing back a confirmation, with a placeholder for future API calls. ```python import adsk.core import adsk.fusion def fusion_tool_handler(call_data): command = call_data['params']['arguments']['command'] params = call_data['params']['arguments'].get('parameters', {}) if command == 'create_box': app = adsk.core.Application.get() design = app.activeProduct rootComp = design.rootComponent # Create sketch sketches = rootComp.sketches xyPlane = rootComp.xYConstructionPlane sketch = sketches.add(xyPlane) # Draw rectangle length = params.get('length', 10) width = params.get('width', 10) lines = sketch.sketchCurves.sketchLines rect = lines.addTwoPointRectangle( adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(length, width, 0) ) # Extrude height = params.get('height', 10) prof = sketch.profiles[0] extrudes = rootComp.features.extrudeFeatures extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation) distance = adsk.core.ValueInput.createByReal(height) extInput.setDistanceExtent(False, distance) extrude = extrudes.add(extInput) return { "content": [{ "type": "text", "text": f"Created {length}x{width}x{height}cm box successfully" }], "isError": False } else: return { "content": [{ "type": "text", "text": f"Command '{command}' not yet implemented." }], "isError": True } ``` -------------------------------- ### Fetch Online Documentation for a Class Source: https://context7.com/aurafriday/fusion-360-mcp-server/llms.txt Retrieves detailed documentation for a specific class from Autodesk's cloudhelp pages. This includes parameter tables, return types, and code samples. ```python fusion360.execute({ "operation": "get_online_documentation", "class_name": "ExtrudeFeatures" }) ``` -------------------------------- ### Get Fusion Design and Root Component (Python) Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/extrude_text.md Retrieves the active Fusion 360 design and its root component. This is the initial step for most API operations that modify the design. It involves getting the application instance and casting it to a Design object. ```Python import adsk.core import adsk.fusion def get_design_and_root_component(): app = adsk.core.Application.get() design = adsk.fusion.Design.cast(app.activeProduct) if not design: raise Exception("No active Fusion design found.") root_comp = design.rootComponent return app, design, root_comp ``` -------------------------------- ### Create and Extrude 3D Text in Fusion 360 Source: https://context7.com/aurafriday/fusion-360-mcp-server/llms.txt This example demonstrates a multi-step process to create and extrude 3D text within Fusion 360. It involves creating a sketch, defining text input with dimensions, setting text properties like alignment, adding the text to the sketch, and finally extruding it. Each step utilizes the generic API call mechanism via `fusion360.execute`. ```python # Step 1: Create sketch on XY plane fusion360.execute({ "api_path": "design.rootComponent.sketches.add", "args": ["design.rootComponent.xYConstructionPlane"], "store_as": "text_sketch" }) # Step 2: Create text input (text, height in cm) fusion360.execute({ "api_path": "$text_sketch.sketchTexts.createInput2", "args": ["'Fusion Rocks!'", 1.5], "store_as": "text_input" }) # Step 3: Create corner points for text bounding box fusion360.execute({ "api_path": "adsk.core.Point3D.create", "args": [0, 0, 0], "store_as": "corner1" }) fusion360.execute({ "api_path": "adsk.core.Point3D.create", "args": [15, 3, 0], "store_as": "corner2" }) # Step 4: Configure text as multi-line (hAlign: 1=center, vAlign: 1=middle) fusion360.execute({ "api_path": "$text_input.setAsMultiLine", "args": ["$corner1", "$corner2", 1, 1, 0.0] }) # Step 5: Add text to sketch fusion360.execute({ "api_path": "$text_sketch.sketchTexts.add", "args": ["$text_input"], "store_as": "text_object" }) ``` -------------------------------- ### API Documentation Operations in Python Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/README.md Outlines the operations for retrieving API documentation through introspection, fetching online documentation, and accessing design best practices. Parameters for searching and filtering documentation are included. ```python { "operation": "get_api_documentation", "search_term": "ExtrudeFeature", "category": "class_name", "max_results": 3 } { "operation": "get_online_documentation", "class_name": "ExtrudeFeatures", "member_name": "createInput" } { "operation": "get_best_practices" } ``` -------------------------------- ### Implement Core Fusion 360 Command: Create Box (Python) Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/INTEGRATION_GUIDE.md This Python snippet demonstrates the initial steps for implementing a 'create_box' command within Fusion 360. It shows how to access the active design, create a new sketch on the XY plane, and begin drawing a rectangle using provided parameters for length and width. Further implementation is required to complete the drawing and extrusion. ```python if command == 'create_box': # Get active design design = app.activeProduct rootComp = design.rootComponent # Create new sketch sketches = rootComp.sketches xyPlane = rootComp.xYConstructionPlane sketch = sketches.add(xyPlane) # Draw rectangle length = params.get('length', 10) width = params.get('width', 10) ... ``` -------------------------------- ### Python Command Registry Update Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/INTEGRATION_GUIDE.md This snippet shows an update to the command registry in `commands/__init__.py`. It imports the `mcp_connection_handler` and adds it to the list of available commands, specifically for MCP connection. ```python from .mcpConnect import mcp_connection_handler as mcpConnect commands = [ mcpConnect, # MCP connection command (NEW) commandDialog, paletteShow, paletteSend ] ``` -------------------------------- ### Object Construction Logic Source: https://github.com/aurafriday/fusion-360-mcp-server/blob/main/docs/GENERIC_API_DESIGN.md Demonstrates the logic for constructing Fusion 360 objects dynamically based on input JSON. It shows how the system detects the object type, finds the corresponding class, checks for static creation methods, extracts parameters, and calls the appropriate method. ```text Input: {"type": "Point3D", "x": 10, "y": 5, "z": 0} ↓ 1. Detect "type" field → constructor mode ↓ 2. Find class: adsk.core.Point3D ↓ 3. Check for .create() static method → YES ↓ 4. Extract params: x=10, y=5, z=0 ↓ 5. Call: Point3D.create(10, 5, 0) ↓ 6. Return: