autodesk-fusion-mcp

frankhommers/autodesk-fusion-mcp Checked 3 days ago

MCP server that runs inside Autodesk Fusion (formerly Autodesk Fusion 360) as an add-in, letting AI agents drive your CAD session over Streamable HTTP.

Standalone MCP server that runs inside Autodesk Fusion (formerly Autodesk Fusion 360) as an add-in. AI agents connect over Streamable HTTP -- the current MCP transport specification -- with no external proxy, middleware, or dependencies required. 1. Download AutodeskFusionMCP-v*.zip from the Releases page. 2. Extract the zip into your Fusion add-ins folder: - macOS: ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns/ - Windows: %APPDATA%\Autodesk\Autodesk Fusion 360\API\AddIns\ 3.

Summary extracted from the README.

Autodesk Fusion MCP Server

Standalone MCP server that runs inside Autodesk Fusion (formerly Autodesk Fusion 360) as an add-in. AI agents connect over Streamable HTTP -- the current MCP transport specification -- with no external proxy, middleware, or dependencies required.

Highlights

  • Streamable HTTP transport -- implements the MCP Streamable HTTP spec natively; no legacy SSE polling or sidecar servers.
  • Protocol compatibility -- supports stateless 2026-07-28 requests and retains 2025-11-25, 2025-06-18, and 2025-03-26 clients on the same endpoint. See protocol behavior and compatibility.
  • Zero external dependencies -- uses only Python's standard library and the Fusion SDK (adsk.*).
  • Thread-safe bridge -- HTTP requests are relayed to Fusion's main thread via a Custom Event / work-queue dispatcher, preventing crashes.
  • 14 dedicated MCP tools -- each with a clean, focused schema for better LLM tool selection.

Supported Platforms

  • Windows
  • Mac OS

Installation

  1. Download AutodeskFusionMCP-v*.zip from the Releases page.
  2. Extract the zip into your Fusion add-ins folder:
    • macOS: ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns/
    • Windows: %APPDATA%\Autodesk\Autodesk Fusion 360\API\AddIns\
  3. Make sure the extracted folder is named AutodeskFusionMCP (rename it if the zip extracts to a different name).
  4. Open Fusion, press Shift+S, select the Add-Ins tab, and run AutodeskFusionMCP.
  5. The server listens on http://127.0.0.1:8765/mcp.

Option B: Clone from source

  1. Clone this repository into your Fusion add-ins folder:
    • macOS: ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns/
    • Windows: %APPDATA%\Autodesk\Autodesk Fusion 360\API\AddIns\
  2. Make sure the directory is named AutodeskFusionMCP.
  3. Open Fusion, press Shift+S, select the Add-Ins tab, and run AutodeskFusionMCP.
  4. The server listens on http://127.0.0.1:8765/mcp.

MCP Client Configuration

Add to your MCP client config (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "autodesk-fusion-mcp": {
      "type": "http",
      "url": "http://127.0.0.1:8765/mcp"
    }
  }
}

Tools

Tool Description
call_autodesk_api Execute a generic Fusion API call via dotted path
execute_python Run Python code inside the live Fusion session
capture_viewport PNG capture with temporary views, transparency, solid backgrounds and cropping
get_viewport Read camera state and viewport dimensions
set_viewport Standard views, projection, orbit, pan, zoom, fit and camera restoration
get_active_selection Get objects currently selected in the viewport
manage_annotations List, claim, complete or release session-only selection annotations
fetch_api_documentation Search Fusion API metadata via runtime introspection
fetch_online_documentation Fetch Autodesk cloudhelp docs for a class/member
fetch_design_guide Read the bundled design guide
save_script Save a reusable Python script
load_script Load a previously saved script
list_scripts List saved scripts with metadata
delete_script Delete a saved script

Generic API example

{
  "api_path": "rootComponent.sketches.add",
  "args": ["rootComponent.xYConstructionPlane"],
  "remember_as": "my_sketch"
}

Path shortcuts: app, ui, design, rootComponent, $stored_name.

Constructors accepted in args: Point3D, Vector3D, Point2D, ValueInput, ObjectCollection, Matrix3D.

Selection example

The get_active_selection tool returns details of objects selected in the viewport and stores them as $selection_0, $selection_1, etc. for use in follow-up API calls.

Selection annotations

Open Selection annotations from the Design workspace's Utilities → Add-Ins panel. Select objects in Fusion, click Capture selection, type a note, and click Add. The captured selection stays attached even when you select something else. Shortcut: right-click a selection and choose Annotate selection to open the panel with that selection already captured. Ask your agent to process the open annotations. Adding a note does not automatically start an agent.

Annotations are grouped by document and live only in memory. Closing a document, stopping the add-in, or exiting Fusion discards them. Closing the palette does not discard them; reopen it from the toolbar.

To follow geometry through edits, each captured object gets a small Fusion attribute (a marker, group autodesk-fusion-mcp) holding only the annotation ID. Fusion carries markers along when geometry is recomputed or split. Markers are removed when the annotation is deleted or completed and when the add-in stops. Adding or removing a marker is an undo step in Fusion, and markers present when you save are stored with that version. Remove markers from design in the palette removes every marker from the active design, including leftovers from a crash or an earlier session. Objects in referenced (external) components cannot carry markers; they are tracked in memory only.

Each captured selection shows its status after later edits:

  • ok: unchanged.

  • changed: still present, but its size or position differs from capture.

  • split: divided into several pieces; the agent receives all of them.

  • missing: consumed or deleted (for example an edge that became a fillet). Claiming is refused; edit the annotation and capture it again.

  • unverified: the timeline is rolled back, so nothing can be checked.

  • Open: editable and removable.

  • In progress: claimed by an agent; editing and reactivation are blocked in both the UI and backend. The trash button still removes the row immediately. Removing a row does not stop or notify the client. Its existing object references remain usable until it completes/releases the claim; the row stays gone.

  • Completed: retained with the agent's result. Delete it with the trash button, or choose Edit / Reactivate and save to reopen it.

  • Interrupted / failed: released by the agent after failure/cancellation; retained for review, editing/reactivation or deletion.

The agent workflow uses manage_annotations:

  1. {"action":"list"} returns annotations for the active document without claiming or consuming them.
  2. {"action":"claim","id":"…","revision":1} atomically claims an open annotation and returns its claim_token, the current $references of the captured objects, and warnings for changed, split or unverified selections.
  3. Work with those references in the same active document. Do not use clear_context while references are needed. Other agents must not work on claimed annotations.
  4. {"action":"complete","id":"…","claim_token":"…","result":"…"} marks it done. On failure, cancellation or abandonment, use "action":"release" instead and explain what happened in result. References are removed at completion/release; the captured objects remain attached to the annotation.

Always complete or release a claim, including when stopping early. A lock has no automatic timeout: silence does not prove the agent has stopped. If an agent crashes before releasing, you can remove its row with the trash button. References for a removed in-progress row are retained until the agent finishes, the document closes, or the add-in stops. A released annotation is not automatically retried. The user reactivates it.

Edits use revision checks, so an old UI cannot overwrite a newer annotation. If captured geometry is missing, claiming it is rejected; edit the annotation and capture its selection again. Annotations do not freeze geometry or prevent ordinary modeling changes by the user or other agents.

Architecture

AI agent
  |  Streamable HTTP (POST/GET/DELETE /mcp)
  v
lib/mcp_server.py           -- HTTP server (threading, stdlib only)
  |
fusion_bridge/dispatch.py   -- Custom Event queue relay
  |
fusion_bridge/operations.py -- per-tool routing
  |
fusion_bridge/selection.py  -- viewport selection reader
fusion_bridge/python_exec.py -- Python execution
fusion_bridge/viewport.py   -- camera controls and viewport capture
fusion_bridge/doc_lookup.py -- API docs introspection
fusion_bridge/script_store.py -- script CRUD
  |
adsk.core / adsk.fusion     -- Fusion 360 SDK (main thread)

Testing

Unit tests

Run the test suite (no Fusion required):

python3 -m unittest discover -s tests

CI runs these tests on every push and pull request via GitHub Actions. Real HTTP tests cover both protocol eras, connection reuse, and cancellation without requiring Fusion. A live Fusion/client smoke test is still needed before releasing transport changes.

Protocol compliance with MCP Inspector

The official MCP Inspector can verify Streamable HTTP compliance against a running server.

Against the live Fusion add-in (port 8765):

npx @modelcontextprotocol/inspector --cli http://127.0.0.1:8765/mcp --transport http --method tools/list

Against the standalone test server (no Fusion required):

python3 test_server.py                  # starts a dummy server on port 9765
npx @modelcontextprotocol/inspector --cli http://127.0.0.1:9765/mcp --transport http --method tools/list

Reporting Issues

Please report any issues on the Issues page.

Author

Frank Hommers / Initialize

License

This project is licensed under the terms of the MIT license. See LICENSE.

Changelog

  • v 1.6.0

    • Track annotated geometry with Fusion attribute markers (group autodesk-fusion-mcp) so annotations follow recomputes and splits
    • Report each selection as ok, changed, split, missing or unverified in the palette and in manage_annotations; claims return every piece of a split selection plus warnings, and refuse missing geometry
    • Remove markers on delete, completion and add-in stop; Remove markers from design purges all markers, including leftovers
  • v 1.5.0

    • Add session-only selection annotations: a Fusion palette to attach notes to captured selections, and the manage_annotations tool so agents can list, claim, complete or release them with revision and claim-token checks
    • Right-click a selection and choose Annotate selection to open the palette with that selection already captured
    • Removing a row never aborts client work; references stay valid until the agent completes or releases its claim
    • Palette and About dialog prefer Fusion's Artifakt Element font
  • v 1.4.1

    • Wait for Fusion's main thread before binding the MCP server; bound dispatcher waits and distinguish queued cancellation from running work
    • Scope legacy cancellation by server, session, and request ID; retire queued work and background startup tasks when the add-in stops
    • Add regression coverage for cancellation isolation and Stop/Run races; 133 automated tests pass on Linux, macOS, and Windows
  • v 1.4.0

    • Add get_viewport and set_viewport: camera snapshots, standard views, projection, orbit, pan, zoom, and fit
    • Extend capture_viewport with temporary views, transparent or solid backgrounds, anti-aliasing control, native dimensions, and cropping
    • Support MCP 2026-07-28 while retaining all three supported 2025 revisions on the same endpoint; persistent Python calls using the new protocol require an explicit session_id
    • Fix empty-response framing for HTTP keep-alive clients; validate browser origins and scope modern cancellation to individual requests
    • Log the Fusion and Python runtime versions; verify the bundled Autodesk utilities against Fusion 2705.1.11
    • Validate with 108 automated tests and 35 live viewport checks on macOS; expand Python 3.14 CI to Linux, macOS, and Windows
  • v 1.3.0

    • fetch_online_documentation returns a preview flag, so an agent can see that a class is preview API before building on it. Autodesk renames these between releases without a deprecation period
    • Design guide: fixed every example, which wrapped its arguments in an operation field that no tool accepts
    • Design guide: new sections on preview APIs and on sheet metal ordering, covering foldFeatures, joinByBendFeatures, cornerClosureFeatures and flat patterns
  • v 1.2.0

    • fetch_online_documentation now understands all three Autodesk help layouts. Property pages contribute property_type, access and property_description; class pages contribute their methods, properties and accessed_from member lists
    • Property syntax lines are recognised (they carry no argument list, and Autodesk leaves the emphasis tag unclosed)
    • Fixed every sample on a page inheriting the first sample's URL
    • Fixed descriptions coming back empty, as Autodesk emits <p class="api">
  • v 1.1.0

    • Negotiate the MCP protocol version instead of always answering 2025-03-26; 2025-11-25 and 2025-06-18 are now supported, which fixes clients refusing to connect (#1)
    • Tolerate the MCP-Protocol-Version request header introduced in 2025-06-18
    • /health now reports supported_protocols
    • Fixed fetch_online_documentation silently dropping the syntax field after Autodesk changed its help markup from <strong> to <b>
    • Per-command execution duration and ISO 8601 timestamps in the log
    • CI now runs on Python 3.14, matching the interpreter Fusion bundles
  • v 1.0.0

    • Initial release
    • 11 dedicated MCP tools with individual schemas
    • Streamable HTTP transport (MCP spec 2025-03-26)
    • Thread-safe main-thread dispatch
    • Viewport selection reader (get_active_selection)
    • Python code execution with persistent sessions
    • API documentation introspection
    • Script management (save/load/list/delete)
    • Zero external dependencies