Skip to main content
Glama
xtylerai2026-oss

autodesk-inventor-mcp

README.md
# autodesk-inventor-mcp

An [MCP](https://modelcontextprotocol.io) server for **Autodesk Inventor**. It lets
an AI client — Claude, Cursor, or anything else that speaks MCP — model parts,
build assemblies, and inspect what it just made.

Autodesk ships official MCP servers for Fusion, Revit and Product Help. Inventor
has none, and none is announced. This fills that gap.

> **Status:** alpha. Developed and tested against Inventor 2027 on Windows 11.

## Why it works differently from the Fusion server

Fusion's MCP server runs *inside* Fusion, because Fusion has no out-of-process
API — an add-in is the only way in. Inventor exposes a full COM automation
interface, so this server is an ordinary external Python process:

- nothing to install into Inventor, and no add-in to rebuild per version
- a crash in the server does not take Inventor with it
- normal Python tooling and debugging

## Things that turned out not to be true

Several widely repeated claims about Inventor automation did not survive
measurement, and each one changed the design. All of them have a test that would
fail if they stopped holding — details in [`docs/design.md §2`](docs/design.md).

1. **Out-of-process COM does produce real solids** (`IsSolid == True`, and a
   cylinder with 3 faces). The folklore that only in-process execution — an
   add-in or an iLogic rule — yields solids does not hold on 2027. If you got
   surfaces, look at how the profile was created, not at the process boundary.
2. **`iLogicAutomation.AddRule` executes the rule as it adds it.** Code that
   calls `AddRule` and then `RunRule` builds everything twice, and a trailing
   boolean usually hides the evidence.
3. **A `gen_py` cache does not break `.ComponentDefinition`** — the usual
   telling of the late-binding rule. What it actually does is hand back typed
   wrappers for child objects that expose only their declared interface, so a
   STEP translator arrives with no `HasSaveCopyAsOptions`, a feature with no
   `.Operation`, and an occurrence definition with no `.WorkPlanes`.
4. **Inventor's object names are localised.** On a zh-CN install the origin
   planes are `'XY 平面'` and the structured BOM view is `'结构化'`. Any code
   that looks up `"XY Plane"` or `"Structured"` is en-US only. This server
   addresses them by index behind a language-independent shorthand.
5. **Patterned instances are not new bodies.** A circular pattern adds lumps to
   the seed's body; the body count does not move.

## Install

Requires Windows and a licensed Inventor installation.

```bash
git clone https://github.com/xtylerai2026-oss/autodesk-inventor-mcp
cd autodesk-inventor-mcp
uv venv
uv pip install -e .
```

### Claude Desktop / Claude Code

```json
{
  "mcpServers": {
    "inventor": {
      "command": "path/to/autodesk-inventor-mcp/.venv/Scripts/inventor-mcp.exe"
    }
  }
}
```

### HTTP transport

```bash
inventor-mcp --http --port 27183
```

Then point the client at `http://127.0.0.1:27183/mcp`. Running over HTTP keeps
the Inventor connection warm across client restarts and can be poked with
`curl`.

## Usage

Start Inventor (or let the server start it), then just ask:

> Make a 60 mm diameter, 20 mm tall boss with a 12 mm bore through it, and tell
> me the mass in aluminium.

The interesting part is not that it builds — it is that it **checks**.
`describe_model` returns `is_solid`, face counts, volumes, and per-feature
health, so a client can notice it accidentally produced a surface, or that a
fillet failed, and fix it without being told.

## Tools

24 tools in six groups. Full signatures in [`docs/design.md §5`](docs/design.md).

| group | tools |
| --- | --- |
| **Session** | `inventor_status` `new_document` `open_document` `save_document` `close_document` |
| **Perception** | `describe_model` `measure` `screenshot` `get_parameters` `set_parameters` |
| **Part modelling** | `sketch_and_extrude` `loft_sections` `revolve_profile` `pattern_bodies` `boolean_combine` |
| **Assembly** | `place_occurrence` `pattern_occurrences` `add_constraint` `check_interference` `get_bom` |
| **Import / export** | `import_geometry` `export_document` |
| **Escape hatches** | `run_python_com` `manage_ilogic_rule` |

Read-only tools carry `readOnlyHint`, so clients can auto-approve inspection
calls. That matters more than it sounds: the build-inspect-adjust loop only
works if inspecting is free.

### Units

**Every length is millimetres and every angle is degrees**, at every boundary.
Inventor's own API works in centimetres and radians; this server converts at the
edge so you never meet a silent 10× error.

## Scope

**Supported:** part documents (`.ipt`) and assembly documents (`.iam`).

Assembly constraints work against *named* entities — work planes, axes, points,
iMates. Constraints that require picking a particular face or edge are out of
scope on purpose: Inventor has no stable name for a face and topological ids
move on rebuild. Use `run_python_com` when you genuinely need one.

**Not supported:** drawings (`.idw`), sheet metal, CAM.

## Development

```bash
uv pip install -e ".[dev]"
pytest                # 24 unit tests, no Inventor needed
pytest -m inventor    # 32 integration tests, drives a real Inventor
```

Current state on Inventor 2027 (build 310192060): 24 unit + 32 integration
tests passing, 0 Inventor processes left behind.

Integration tests attach to a running Inventor if there is one and launch one
otherwise — and call `Quit()` on teardown **only** if they launched it. Please
keep it that way. Automation that forgets is how you end up with a pile of
headless Inventor processes holding gigabytes; this project started by cleaning
up nine of them.

## Licence

MIT