Skip to main content
Glama
fusion-cam

fusion-cam

Fusion-CAM-MCP

A Python MCP server that lets AI clients import STEP files from Inventor, machine them with Fusion's native CAM tools, and check the resulting G-code outside Fusion.

Inventor (inventor MCP) --STEP--> Fusion (FusionMCP add-in) <--TCP 127.0.0.1:27190-- fusion-cam MCP server <--stdio-- Claude
                                         setups, toolpaths, posting                  gcode_check (outside Fusion)

Verified on Fusion 2706.1.17 (Personal Use licence) and Inventor 2027.1, 2026-11-20. Phase records with real outputs are in docs/: phase0, phase1, phase2, phase3 and phase4. The design is in FUSION_MCP_PLAN.md.

Layout

  • addin/FusionMCP: the Fusion add-in. It runs a loopback socket bridge (127.0.0.1:27190, token in %APPDATA%\FusionMCP\token) and the ops that run on Fusion's main thread (ops/*.py, registered in ops/__init__.py). The maths with no Fusion import lives in ops/geomcalc.py, ops/camcalc.py and ops/units.py.

  • src/: the fusion-cam MCP server. Its tools are thin wrappers around BridgeClient.call(op, args). Generation polling is in src/polling.py.

  • external/gcode_check.py: the G-code checker (standard library only; usable as a library, a CLI or the gcode_check tool).

  • skills/: fusion-cam-usage (operating manual) and fusion-cam-recipes (machining choices), packaged as a plugin by .claude-plugin/.

  • tests/: unit tests (pytest) and live tests (pytest -m fusion). tests/data/plate holds the Fanuc programs posted for the test plate.

  • tools/install_addin.ps1: links the add-in into Fusion.

Related MCP server: Fusion MCP para Codex

Setup

1. Server environment

cd "C:\Fusion MCP"
py -3.12 -m venv .venv
.venv\Scripts\python.exe -m pip install -e ".[dev]"

This creates .venv\Scripts\fusion-cam-mcp.exe. mcp is pinned below 2, because mcp 2.x removed mcp.server.fastmcp.

2. Fusion add-in

powershell -ExecutionPolicy Bypass -File tools\install_addin.ps1

This creates a junction from %APPDATA%\Autodesk\Autodesk Fusion 360\API\AddIns\FusionMCP to the repo, so edits are live. Then in Fusion: Shift+S → Add-Ins → FusionMCP → Run, and tick Run on Startup. Text Commands shows FusionMCP listening on 127.0.0.1:27190. After editing ops/*.py, call reload_api. Changes to FusionMCP.py, bridge/*, ops/state.py or ops/breadcrumb.py need the add-in stopped and run again.

3. Register the server in Claude

Per project: copy .mcp.json.example to .mcp.json (it's gitignored) and approve the server when Claude Code asks. Or for all projects:

claude mcp add --scope user fusion-cam -- "C:\Fusion MCP\.venv\Scripts\fusion-cam-mcp.exe"

For Claude Desktop (chat), put the same block under mcpServers in %APPDATA%\Claude\claude_desktop_config.json. Start a new session, then call status.

4. Skills (plugin)

/plugin marketplace add "C:\Fusion MCP"
/plugin install fusion-cam@fusion-cam-mcp

For a quick local test, copy skills\fusion-cam-usage and skills\fusion-cam-recipes into %USERPROFILE%\.claude\skills\ instead.

Tools

All tool inputs and outputs are in mm (mm², mm³), seconds and mm/min. The raw Fusion API inside execute_python uses cm and radians.

Tool

What it does

status

Connection, open documents, active command/idle, last crash

execute_python

Python on Fusion's main thread (persistent namespace)

reload_api

Re-import ops/*.py after editing them

import_step(path, expected_size_mm, expected_volume_mm3, tolerance_pct=0.1)

Imports a STEP into a new scratch design. Returns bodies, bbox and volume, plus an optional axis-agnostic check

inspect()

Bodies, bbox, volume, top-face Z, horizontal planar faces by Z, holes (diameter, depth, through/blind, count)

screenshot(path, width, height, view)

Viewport PNG (iso/top/front/right/current), saved to test_output/ by default

close_scratch(name=None, scratch_id=None)

Closes, without saving, only documents that import_step created and that were never saved. Prefer scratch_id, because imported documents are named "Untitled" like a new user document

cam_status(check=True)

Setups (WCS, stock), operations (tool, toolpath valid, checkToolpath), NC programs, last_crash

cam_create_setup(stock_offset_mm=1, wcs="top-centre", body)

Milling setup with relative-box stock. Returns the stock box and WCS origin (world and WCS mm)

cam_list_strategies(setup)

Live strategy names (55 milling strategies on 2706.1.17)

cam_list_tools(source="samples", library, type, diameter_min_mm, diameter_max_mm, text)

Tools from Fusion's bundled sample JSON, a library .json, or cloud (opt-in)

cam_add_operation(strategy, tool_id, geometry, params, tool_number)

Operation with a JSON tool. geometry takes {"holes": {"diameter_mm": d}} or {"contour": "outline", "side": "outside"}. params are Fusion parameters by name; lengths need units, e.g. "1 mm"

cam_generate(targets, timeout_s=600, job)

Starts generation and polls with short calls. Returns validity and checkToolpath per operation

cam_machining_time(target, rapid_mm_min=5000, tool_change_s=15)

Cycle time (s), feed/rapid distance (mm), tool changes, per operation

cam_post(post="fanuc.cps", output_dir, filename, split="auto")

G-code via an NC program. On Personal Use it posts one program per tool. Returns the .nc paths, line counts and file heads

gcode_check(paths, stock_wcs_mm=None, setup, limits_wcs_mm, expected_tools, camotics=True)

Runs outside Fusion: height-map stock simulation plus rule checks by line, and CAMotics side by side when installed. The stock and tool list come from the setup if not given

Tools that modify documents (import_step, close_scratch and every cam_* op that creates or posts) refuse while a Fusion command dialog is open. The CAM tools only modify scratch documents from import_step unless you pass allow_user_document=true. A call that times out may still be running in Fusion, so call status/inspect/cam_status before retrying.

Each call writes fsync'd breadcrumbs to %APPDATA%\FusionMCP\breadcrumb.log: BEGIN/END per request, plus a STEP line before each risky adsk.cam call. If Fusion crashes, status reports last_crash with the op and the step. Do not repeat that call unchanged.

Inventor → STEP → Fusion hand-off

  1. Inventor (inventor MCP): open or build the part and check it with inspect(). Export STEP with the translator found by ClassId. On Inventor 2027, export_document fails with "Translator not found", so use execute_python:

    tr = app.ApplicationAddIns.ItemById("{90AF7F40-0C01-11D5-8E83-0010B541CD80}")   # STEP
    if not tr.Activated: tr.Activate()
    ctx = app.TransientObjects.CreateTranslationContext(); ctx.Type = 13059
    dm = app.TransientObjects.CreateDataMedium(); dm.FileName = r"C:\Fusion MCP\test_output\part.step"
    tr.SaveCopyAs(app.ActiveDocument, ctx, app.TransientObjects.CreateNameValueMap(), dm)
  2. Fusion (fusion-cam MCP): import_step(path, expected_size_mm=[...], expected_volume_mm3=...) with Inventor's bbox and volume. The size check is axis-agnostic and warns if the axes differ (Y-up vs Z-up).

  3. Run inspect() to choose strategies (top face, floors, holes), then screenshot() for a visual check.

  4. Run the CAM job (below), always followed by gcode_check, then close_scratch(scratch_id=...).

Worked job: the test plate (80×50×10 mm, R5 corners, Ø16 and 2× M6)

import_step("C:\\Fusion MCP\\test_output\\MCP_Test_Plate.step", expected_size_mm=[80, 50, 10], expected_volume_mm3=37395)
                        # 80.000×50.000×10.000 mm, 37395.009 mm³, check ok
inspect()               # top face Z10; holes 1× Ø16 and 2× Ø4.917, all through
cam_create_setup(stock_offset_mm=1, wcs="top-centre")                                 # stock 82×52×11
cam_add_operation("face", "49d0ef72-1d9e-4d80-aa4c-2fd9384de358")                     # T1 Ø50 face mill (Tutorial Tools)
cam_add_operation("contour2d", "593e3a17-2722-4974-b6d6-46521c351aa6",                 # T2 Ø10 flat end mill
                  geometry={"contour": "outline", "side": "outside"},
                  params={"bottomHeight_offset": "-0.5 mm", "doMultipleDepths": true, "maximumStepdown": "4 mm"})
cam_add_operation("drill", "4e82fd33-fab1-4910-b0b1-768c41323e30",                     # T3 Ø16 drill
                  geometry={"holes": {"diameter_mm": 16}}, params={"drillTipThroughBottom": true, "breakThroughDepth": "1 mm"})
cam_add_operation("drill", "e4b5958e-d3b7-4249-a084-d9cca4830757",                     # T4 Ø4.9 drill, peck
                  geometry={"holes": {"diameter_mm": 4.917}},
                  params={"drillTipThroughBottom": true, "breakThroughDepth": "1 mm", "cycleType": "'deep-drilling'", "incrementalDepth": "3 mm"})
cam_generate()          # all valid, checkToolpath true, 2.6 s
cam_machining_time()    # 151.2 s, 3 tool changes
cam_post("fanuc.cps")   # Personal Use: 4 programs, one per tool, in test_output\nc
gcode_check(paths=[...the 4 files...])   # ok; removed 9524 mm³, remaining 37380 vs CAD 37395 mm³
close_scratch(scratch_id=...)

G-code check CLI: python external/gcode_check.py --stock -41,-26,-11,41,26,0 --tools 1,2,3,4 file1.nc file2.nc. The sample tools carry generic feeds and speeds; set tool_spindleSpeed/tool_feedCutting before machining anything real.

Known limits

  • Fusion Personal Use: no tool changes in one NC program (so cam_post splits per tool), and rapids are posted at the cutting feed. An Education licence removes both.

  • gcode_check is 3-axis and models the cutter profile only (no holder or fixture). If CAMotics 1.2 is installed it also runs camsim and compares removed volumes (plate: built-in 9524 against CAMotics 9767 mm³). camsim reports no collisions and skips G83, so the checker gives it G81.

  • Geometry selection is wrapped for holes and the outline contour. Pocket and face selections for other strategies go through execute_python.

  • The official Autodesk Fusion MCP (port 27182) is not set up or verified here; see the usage skill, section 9.

Tests

.venv\Scripts\python.exe -m pytest                 # unit tests (no Fusion)
.venv\Scripts\python.exe -m pytest -m fusion -v    # live: needs Fusion + add-in and test_output\MCP_Test_Plate.step

Available Tools

16 tools
cam_add_operationA

Add an operation to a setup with a tool from cam_list_tools (made with Tool.createFromJson).

strategy: a name from cam_list_strategies (face, contour2d, pocket2d, adaptive2d, drill, ...). geometry, the selections a strategy needs: {"holes": {"diameter_mm": 16, "tol_mm": 0.01}} or {"holes": "all"}: hole faces for drill/bore; {"contour": "outline", "side": "outside"}: contour2d on the part's base silhouette (climb cut). params / params_json: Fusion parameter name -> value. Strings are expressions and LENGTHS NEED UNITS ('1 mm', '-0.5 mm'); bools become true/false; numbers are unitless. Verified names: contour2d bottomHeight_offset, doMultipleDepths, maximumStepdown; drill drillTipThroughBottom, breakThroughDepth, cycleType ("'drilling'", "'deep-drilling'"), incrementalDepth; any op tool_spindleSpeed, tool_feedCutting. tool_number: default reuses the number of the same tool, else the next free one (H/D offsets follow). Returns parameter_errors for any names that did not apply.

Inputs: tool_id (required), strategy (required), name, setup, +6 more. Returns: result

cam_create_setupA

Create a milling setup on the scratch document (opens the Manufacture workspace). Units mm.

stock_offset_mm: relative-box stock, a number (sides and top; bottom 0) or {"sides", "top", "bottom"}. wcs: stock box point: 'top-centre' (default), 'top-corner-1'..'top-corner-4' (1=-X-Y, 2=+X-Y, 3=-X+Y, 4=+X+Y), 'centre', 'bottom-centre', 'bottom-corner-N'; prefix 'model-' for the model box instead; or 'model-origin'. body: body name or index (default: all solid bodies). Returns the stock box in world mm and in WCS mm and the WCS origin in world mm. Refuses on documents not created by import_step unless allow_user_document=true, and while Fusion is mid-command.

Inputs: wcs, body, name, timeout_s, +2 more. Returns: result

cam_generateA

Generate toolpaths and wait for them (seconds). Returns each operation's toolpath validity and checkToolpath result, plus all_valid.

targets: setup or operation names (default: all operations of the last setup). Fusion generates in the background and this tool polls with short calls, so Fusion stays responsive. If timeout_s passes, generation continues in Fusion: call cam_generate(job=) to keep waiting rather than starting again. A bad adsk.cam call can crash Fusion: if status reports last_crash, do not repeat that call unchanged.

Inputs: job, setup, targets, timeout_s, +1 more. Returns: result

cam_list_strategiesB

List the operation strategies Fusion offers for a setup (live; 55 milling strategies on 2706.1.17, e.g. face, adaptive2d, pocket2d, contour2d, drill, bore, chamfer2d, adaptive, parallel, scallop). Pass the 'name' to cam_add_operation.

Inputs: setup, timeout_s. Returns: result

cam_list_toolsA

Find cutting tools; diameters in mm. Returns tool ids for cam_add_operation.

source: 'samples' (Fusion's bundled libraries, e.g. 'Milling Tools (Metric)', 'Hole Making Tools (Metric)', 'Tutorial Tools (Metric)'; call with no filters to list them), a path to a tool library .json exported from Fusion, or 'cloud' (Fusion's online library: slow, about 8 s, and implicated in a Fusion crash in Phase 0, so only when the user asks). type: e.g. 'flat end mill', 'face mill', 'drill', 'spot drill', 'tap right hand', 'chamfer mill'. text filters the description. The sample tools carry generic feeds/speeds presets (e.g. S5000 F1000): review them before real machining.

Inputs: text, type, limit, source, +4 more. Returns: result

cam_machining_timeB

Estimated cycle time in seconds for a setup or operation (default: the last setup), with feed and rapid distances in mm, tool changes and a per-operation breakdown. rapid_mm_min (mm/min) and tool_change_s are machine assumptions. Needs generated toolpaths.

Inputs: target, timeout_s, rapid_mm_min, tool_change_s, +1 more. Returns: result

cam_postA

Post-process to G-code; returns the .nc paths, line counts and the first head_lines lines.

post: a post from Fusion's library by name ('fanuc.cps') or a system:// URL. targets: setup/operation names (default: all operations of the last setup), which need valid toolpaths. output_dir default: /test_output/nc. split: 'auto' posts one program, but Fusion for Personal Use refuses tool changes in one program, so it then writes one program per tool (_01_T1.nc, ...; run them in order); 'tool' always splits; 'none' fails instead. Files Fusion writes to its default NC folder are moved to output_dir. A bad adsk.cam call can crash Fusion: if status reports last_crash, do not repeat that call unchanged.

Inputs: post, setup, split, targets, +6 more. Returns: result

cam_statusA

CAM state of the active document. Read-only; lengths in mm.

Setups (WCS, stock offsets, stock box in WCS mm, model size), operations with strategy, tool (number, type, diameter mm), toolpath present/valid, errors/warnings and checkToolpath (check=true), NC programs, running generation jobs, and last_crash (op and step) if Fusion crashed in a call.

Inputs: check, timeout_s. Returns: result

close_scratchA

Close, WITHOUT saving, documents that import_step created and that were never saved.

name=None closes all of them; with a name, only that document, and it refuses (with the reason) if the document was not created by import_step or has been saved. scratch_id (returned by import_step) selects exactly one document; prefer it, because imported documents are often named "Untitled" like the user's own. Never closes the user's documents. A timed-out call may still finish: call status before retrying.

Inputs: name, timeout_s, scratch_id. Returns: result

execute_pythonA

Run Python inside Fusion on its main thread.

Pre-bound (refreshed each call): app, ui, adsk, math, doc (active document), design, root (design.rootComponent), cam (CAM product or None), mm(v) mm->cm, deg(v) deg->rad. Variables persist between calls. Raw API lengths are CENTIMETERS. print() output is returned; a trailing bare expression is echoed like a REPL. Never close or save documents you did not create. Avoid long loops: the main thread is blocked while this runs.

Inputs: code (required), timeout_s. Returns: result

gcode_checkA

Check posted G-code OUTSIDE Fusion before it goes near a machine (Fusion has no stock simulation; checkToolpath is not one). Runs in the MCP server, so Fusion is only needed to read the stock.

paths: .nc files in machining order (pass all files cam_post wrote, e.g. one per tool on Personal Use). Coordinates are WCS mm. stock_wcs_mm: [xmin, ymin, zmin, xmax, ymax, zmax]; if omitted, the stock box and the expected tool numbers are read from the Fusion setup (cam_status stock_in_wcs_mm; setup name, default the last setup). limits_wcs_mm: optional axis envelope, same format. clearance_mm: rapids below stock top + clearance inside the footprint are warned about. Simulates material removal on a height map (resolution_mm cells; tool shapes from the post's tool comments) and reports problems by file and line: RAPID_INTO_STOCK, FEED_MISSING, SPINDLE_OFF, NO_TOOL, TOOL_UNEXPECTED, H_MISMATCH, ENVELOPE, ARC_RADIUS, NO_END (errors/warnings) and BELOW_STOCK (info: normal for through holes and profiles). ok=false means do not run the program. If CAMotics is installed (camotics=true), the same programs are also simulated in CAMotics (about 10 s); camotics and simulation_comparison give both removed volumes side by side, and a SIM_DISAGREE warning is added if they differ by more than 5 %. CAMotics reports no collisions.

Inputs: paths (required), setup, camotics, clearance_mm, +4 more. Returns: result

import_stepA

Import a STEP file (e.g. exported from Inventor) into a NEW Fusion design marked as scratch.

Units are millimetres. path: absolute path to a .step/.stp file. Returns the document name, body count, per-body and overall bounding box (mm) and volume (mm^3). Optional check: expected_size_mm=[L, W, H] and/or expected_volume_mm3, compared within tolerance_pct (default 0.1 %). Sizes are compared sorted (axis-agnostic) and a warning says if the axes differ (e.g. a Y-up vs Z-up export). Refuses while Fusion is mid-command. Only documents created here can be closed later with close_scratch. If the call times out it may still finish inside Fusion: call status and inspect before retrying, or you get a second document.

Inputs: path (required), timeout_s, tolerance_pct, expected_size_mm, +1 more. Returns: result

inspectA

Describe the active design for CAM planning. Read-only. All values in mm (areas mm^2, volumes mm^3), world coordinates.

Returns bodies (including occurrence proxies) with bounding boxes and volumes, the overall bbox/volume, top_face_z_mm (highest upward-facing planar face), horizontal planar faces grouped by Z with area and facing, and cylindrical holes (concave cylinders, split faces merged) grouped by diameter/depth/axis with a count, centres, entry points and through/blind. Hole depth is the cylindrical wall only (no drill point). If a call times out it may still be running in Fusion: call status, then inspect again, before retrying anything.

Inputs: timeout_s. Returns: result

reload_apiA

Re-import the add-in's ops modules from disk (after editing addin/FusionMCP/ops/.py) and clear the execute_python namespace. Changes to FusionMCP.py or bridge/ need the add-in stopped and run again in Fusion (Shift+S > Add-Ins).

Inputs: no named parameters. Returns: result

screenshotA

Save the active viewport as a PNG and return its path (sizes in px).

view: iso | top | front | right | current ('current' keeps the user's camera; the others reorient and fit the view). Default path: /test_output/screenshot__.png. Read the PNG to look at it. A timed-out call may still finish: call status before retrying.

Inputs: path, view, width, height, +1 more. Returns: result

statusA

Check the Fusion connection: add-in reachable, Fusion's main thread responsive, open documents, active workspace/command, and whether Fusion crashed during a call last time (last_crash).

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 16 tools

    Disambiguation4/5

    Most tools target clearly distinct phases of the CAM workflow: connection status, design inspection, setup creation, strategy/tool discovery, operation creation, generation, posting, and G-code checking. The main ambiguity is between `status` and `cam_status`, and to a lesser degree between `inspect` and `cam_status`, but the descriptions make the boundary reasonably clear.

    Naming Consistency4/5

    All names use snake_case and the `cam_` prefix sensibly groups CAM-specific operations. However, the set mixes noun-style names (`status`, `inspect`, `screenshot`) with verb_noun names (`cam_create_setup`, `import_step`), and `status` versus `cam_status` is an awkward near-collision.

    Tool Count4/5

    At 16 tools it is slightly above the typical 3-15 range, but each tool maps to a meaningful step in a complex Fusion CAM workflow. No obvious redundant tool bloats the set, though a couple of read-only status/inspection tools could potentially be consolidated.

    Completeness3/5

    The core pipeline is well covered: import, inspect, create setup, discover strategies/tools, add operations, generate, post, and check G-code. However, there are notable lifecycle gaps: no tools to update or delete setups/operations, no way to modify an operation's parameters after creation, and no direct save/export of the design.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Connects AI coding agents to Autodesk Fusion 360 for CAD automation, enabling natural language control over sketching, 3D modeling, and CAM operations. It uses a Python-based bridge and a custom add-in to execute over 80 tools ranging from simple geometry creation to complex assembly and parameter management.
      4
      80
      512 PyPI
      152
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to inspect and automate Autodesk Fusion 360 through MCP, providing tools for CAD modeling, CAM manufacturing, and document management.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Connects AI coding agents to Autodesk Fusion 360 for CAD/CAM automation, exposing 84 tools for sketching, modeling, assembly, inspection, export, and G-code post-processing through any MCP-compatible client.
      85
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables MCP-compatible assistants to control Autodesk Fusion for mechanical modeling, assembly editing, CAM workflows, inspection, and model export through Fusion's native MCP endpoint.
      39
      1
      MIT