fusion-cam
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
CAM in Autodesk Fusion through the FusionMCP add-in. Models come from Inventor as STEP files; Fusion is only used for machining (setups, toolpaths, posting). Call status first. Workflow: import_step (STEP exported from Inventor) -> inspect -> screenshot -> cam_create_setup -> cam_list_tools -> cam_add_operation (face, contour2d, drill, ...) -> cam_generate -> cam_machining_time -> cam_post -> gcode_check (always, before any machine) -> close_scratch. CAM tools only modify scratch documents from import_step. All tool inputs and outputs are in mm (mm^2, mm^3), seconds and mm/min. A call that times out may still finish inside Fusion: call status and inspect before retrying it. execute_python runs on Fusion's main thread in a persistent namespace with app, ui, adsk, doc, design, root, cam, mm(), deg() bound; the raw API uses cm and radians. A bad adsk.cam call can crash Fusion outright: if status reports last_crash, do not repeat that call.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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). |
| 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. |
| 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). |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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;
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 16 tools
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.
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.
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.
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.