Skip to content
Back to search

fusion-cam-mcp

MarketplaceWorks with Claude CodeGitHub

A Python MCP server that allows AI Clients to import STEP files from Inventor, use them with Fusion's native CAM tools and also a G-code toolpath check outside Fusion.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/amritsanjeev2007--fusion-cam-mcp/badge.svg)](/listings/amritsanjeev2007--fusion-cam-mcp)

HTML

<a href="/listings/amritsanjeev2007--fusion-cam-mcp"><img src="/api/listings/amritsanjeev2007--fusion-cam-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 11 lines
  1. {
  2. "name": "fusion-cam-mcp",
  3. "owner": { "name": "Amrit" },
  4. "plugins": [
  5. {
  6. "name": "fusion-cam",
  7. "source": "./",
  8. "description": "fusion-cam-usage and fusion-cam-recipes skills for the fusion-cam MCP server."
  9. }
  10. ]
  11. }
README.md · README · 121 lines
  1. # Fusion-CAM-MCP
  2. 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.
  3. ```
  4. Inventor (inventor MCP) --STEP--> Fusion (FusionMCP add-in) <--TCP 127.0.0.1:27190-- fusion-cam MCP server <--stdio-- Claude
  5. setups, toolpaths, posting gcode_check (outside Fusion)
  6. ```
  7. 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](docs/phase0-findings.md), [phase1](docs/phase1-results.md), [phase2](docs/phase2-results.md), [phase3](docs/phase3-results.md) and [phase4](docs/phase4-results.md). The design is in [FUSION_MCP_PLAN.md](docs/FUSION_MCP_PLAN.md).
  8. ## Layout
  9. - `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`.
  10. - `src/`: the `fusion-cam` MCP server. Its tools are thin wrappers around `BridgeClient.call(op, args)`. Generation polling is in `src/polling.py`.
  11. - `external/gcode_check.py`: the G-code checker (standard library only; usable as a library, a CLI or the `gcode_check` tool).
  12. - `skills/`: `fusion-cam-usage` (operating manual) and `fusion-cam-recipes` (machining choices), packaged as a plugin by `.claude-plugin/`.
  13. - `tests/`: unit tests (`pytest`) and live tests (`pytest -m fusion`). `tests/data/plate` holds the Fanuc programs posted for the test plate.
  14. - `tools/install_addin.ps1`: links the add-in into Fusion.
  15. ## Setup
  16. ### 1. Server environment
  17. ```powershell
  18. cd "C:\Fusion MCP"
  19. py -3.12 -m venv .venv
  20. .venv\Scripts\python.exe -m pip install -e ".[dev]"
  21. ```
  22. This creates `.venv\Scripts\fusion-cam-mcp.exe`. `mcp` is pinned below 2, because mcp 2.x removed `mcp.server.fastmcp`.
  23. ### 2. Fusion add-in
  24. ```powershell
  25. powershell -ExecutionPolicy Bypass -File tools\install_addin.ps1
  26. ```
  27. 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.
  28. ### 3. Register the server in Claude
  29. Per project: copy `.mcp.json.example` to `.mcp.json` (it's gitignored) and approve the server when Claude Code asks. Or for all projects:
  30. ```powershell
  31. claude mcp add --scope user fusion-cam -- "C:\Fusion MCP\.venv\Scripts\fusion-cam-mcp.exe"
  32. ```
  33. For Claude Desktop (chat), put the same block under `mcpServers` in `%APPDATA%\Claude\claude_desktop_config.json`. Start a new session, then call `status`.
  34. ### 4. Skills (plugin)
  35. ```text
  36. /plugin marketplace add "C:\Fusion MCP"
  37. /plugin install fusion-cam@fusion-cam-mcp
  38. ```
  39. For a quick local test, copy `skills\fusion-cam-usage` and `skills\fusion-cam-recipes` into `%USERPROFILE%\.claude\skills\` instead.
  40. ## Tools
  41. 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.
  42. | Tool | What it does |
  43. |---|---|
  44. | `status` | Connection, open documents, active command/idle, last crash |
  45. | `execute_python` | Python on Fusion's main thread (persistent namespace) |
  46. | `reload_api` | Re-import `ops/*.py` after editing them |
  47. | `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 |
  48. | `inspect()` | Bodies, bbox, volume, top-face Z, horizontal planar faces by Z, holes (diameter, depth, through/blind, count) |
  49. | `screenshot(path, width, height, view)` | Viewport PNG (`iso`/`top`/`front`/`right`/`current`), saved to `test_output/` by default |
  50. | `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 |
  51. | `cam_status(check=True)` | Setups (WCS, stock), operations (tool, toolpath valid, `checkToolpath`), NC programs, `last_crash` |
  52. | `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) |
  53. | `cam_list_strategies(setup)` | Live strategy names (55 milling strategies on 2706.1.17) |
  54. | `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) |
  55. | `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"` |
  56. | `cam_generate(targets, timeout_s=600, job)` | Starts generation and polls with short calls. Returns validity and `checkToolpath` per operation |
  57. | `cam_machining_time(target, rapid_mm_min=5000, tool_change_s=15)` | Cycle time (s), feed/rapid distance (mm), tool changes, per operation |
  58. | `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 |
  59. | `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 |
  60. 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.
  61. 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.
  62. ## Inventor → STEP → Fusion hand-off
  63. 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`:
  64. ```python
  65. tr = app.ApplicationAddIns.ItemById("{90AF7F40-0C01-11D5-8E83-0010B541CD80}") # STEP
  66. if not tr.Activated: tr.Activate()
  67. ctx = app.TransientObjects.CreateTranslationContext(); ctx.Type = 13059
  68. dm = app.TransientObjects.CreateDataMedium(); dm.FileName = r"C:\Fusion MCP\test_output\part.step"
  69. tr.SaveCopyAs(app.ActiveDocument, ctx, app.TransientObjects.CreateNameValueMap(), dm)
  70. ```
  71. 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).
  72. 3. Run `inspect()` to choose strategies (top face, floors, holes), then `screenshot()` for a visual check.
  73. 4. Run the CAM job (below), always followed by `gcode_check`, then `close_scratch(scratch_id=...)`.
  74. ## Worked job: the test plate (80×50×10 mm, R5 corners, Ø16 and 2× M6)
  75. ```text
  76. import_step("C:\\Fusion MCP\\test_output\\MCP_Test_Plate.step", expected_size_mm=[80, 50, 10], expected_volume_mm3=37395)
  77. # 80.000×50.000×10.000 mm, 37395.009 mm³, check ok
  78. inspect() # top face Z10; holes 1× Ø16 and 2× Ø4.917, all through
  79. cam_create_setup(stock_offset_mm=1, wcs="top-centre") # stock 82×52×11
  80. cam_add_operation("face", "49d0ef72-1d9e-4d80-aa4c-2fd9384de358") # T1 Ø50 face mill (Tutorial Tools)
  81. cam_add_operation("contour2d", "593e3a17-2722-4974-b6d6-46521c351aa6", # T2 Ø10 flat end mill
  82. geometry={"contour": "outline", "side": "outside"},
  83. params={"bottomHeight_offset": "-0.5 mm", "doMultipleDepths": true, "maximumStepdown": "4 mm"})
  84. cam_add_operation("drill", "4e82fd33-fab1-4910-b0b1-768c41323e30", # T3 Ø16 drill
  85. geometry={"holes": {"diameter_mm": 16}}, params={"drillTipThroughBottom": true, "breakThroughDepth": "1 mm"})
  86. cam_add_operation("drill", "e4b5958e-d3b7-4249-a084-d9cca4830757", # T4 Ø4.9 drill, peck
  87. geometry={"holes": {"diameter_mm": 4.917}},
  88. params={"drillTipThroughBottom": true, "breakThroughDepth": "1 mm", "cycleType": "'deep-drilling'", "incrementalDepth": "3 mm"})
  89. cam_generate() # all valid, checkToolpath true, 2.6 s
  90. cam_machining_time() # 151.2 s, 3 tool changes
  91. cam_post("fanuc.cps") # Personal Use: 4 programs, one per tool, in test_output\nc
  92. gcode_check(paths=[...the 4 files...]) # ok; removed 9524 mm³, remaining 37380 vs CAD 37395 mm³
  93. close_scratch(scratch_id=...)
  94. ```
  95. 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.
  96. ## Known limits
  97. - **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.
  98. - `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.
  99. - Geometry selection is wrapped for holes and the outline contour. Pocket and face selections for other strategies go through `execute_python`.
  100. - The official Autodesk Fusion MCP (port 27182) is not set up or verified here; see the usage skill, section 9.
  101. ## Tests
  102. ```powershell
  103. .venv\Scripts\python.exe -m pytest # unit tests (no Fusion)
  104. .venv\Scripts\python.exe -m pytest -m fusion -v # live: needs Fusion + add-in and test_output\MCP_Test_Plate.step
  105. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.