Blog · Inventor · 1 Oct 2026 · Last updated 10 Oct 2026 · 6 min read · By Stefano B.

How to drive Autodesk Inventor from the terminal without an MCP server

There is no official Inventor MCP server, and you do not need one. An AI agent can drive Inventor 2025 over COM from the command line, from VBScript or Python, even while someone is using Inventor. The method that works, the ones that do not, the error codes you will see, and the rules that keep a run from breaking.

Short answer: attach to the Inventor that is already open with GetObject, from a VBScript run with cscript. That gives an AI agent working in a terminal, such as Claude Code, the whole Inventor API: open files, create drawings, read geometry, export DXF and PDF. No MCP server, no add-in, no plugin. Python works too, with late binding (see below), and the agent can do all of it while you keep working in the same Inventor.

Everything below was tested on Inventor 2025 on Windows 11, during months of batch work on hundreds of steel parts for our CAD drawing automation.

The method that works

  1. Open Inventor yourself and leave it open. The script attaches to it, it does not start it.
  2. Write the script as a .vbs file.
  3. Attach with GetObject, and stop with a clear message if Inventor is not running.
  4. Run it with cscript //nologo script.vbs from the terminal. The agent reads the output and decides the next step.
' attach.vbs - run with: cscript //nologo attach.vbs
Dim oApp
On Error Resume Next
Set oApp = GetObject(, "Inventor.Application")
If Err.Number <> 0 Then
    WScript.Echo "ERROR: Inventor is not running (err " & Err.Number & ": " & Err.Description & ")"
    WScript.Quit 3
End If
On Error Goto 0

oApp.SilentOperation = True          ' no dialogs during Open/Add
WScript.Echo "Attached. Open documents: " & oApp.Documents.Count

SilentOperation = True before Documents.Open or Documents.Add stops the dialogs that would otherwise freeze the script waiting for a click nobody will make.

The four methods that do not work

Method What happens Why
CreateObject("Inventor.Application") with Inventor open 0x80080005 CO_E_SERVER_EXEC_FAILURE It tries to start a second Inventor.
CreateObject with Inventor closed error 429 No running server to attach to.
Inventor.exe /Automation The process stays at about 70 MB, never registers and dies Not a usable way to start a scriptable instance here.
GetActiveObject from PowerShell Type library is not registered (0x80131165) Use cscript instead.

Rule: GetObject first, CreateObject only as a fallback. Never close or hide an instance you attached to: it is the user's.

When VBScript is not enough: compiled C

Some API methods return arrays by reference: SurfaceEvaluator.GetNormal, Evaluator2D.GetParamExtents, Matrix.AsArray. VBScript cannot call them. We tried every route:

Caller Result
VBScript Type mismatch (13)
PowerShell 7, late-bound Cannot convert psobject to ref
PowerShell 7, typed Cannot convert System.__ComObject to Inventor.Application
Compiled C# works

The agent writes a small C# program and compiles it with the csc.exe that ships with .NET Framework:

csc.exe /target:exe /platform:x64 /out:Probe.exe ^
        /reference:"C:\Program Files\Autodesk\Inventor 2025\Bin\Autodesk.Inventor.Interop.dll" Probe.cs

Four traps:

From Python, while you keep working

Since October 2026 we also drive Inventor from Python (pywin32), in the same Inventor the user has open, without asking them to stop. Tested on Inventor 2025.2.

import pythoncom, win32com.client.dynamic as dy
app = dy.Dispatch(pythoncom.GetActiveObject("Inventor.Application")
                  .QueryInterface(pythoncom.IID_IDispatch))
late = lambda o: dy.Dispatch(o._oleobj_.QueryInterface(pythoncom.IID_IDispatch))
doc = late(app.Documents.Open(r"C:\work\part.stp", False))   # False = invisible
# ... work on doc ...
doc.Close(True)                                                # True = skip save

Rules that came out of it:

When a rule breaks, the user sees it

Errors you will meet, and what they mean

Symptom Cause Fix
Unspecified error on export, naming nothing Opening an .idw also opens its .ipt; closing the .idw does not close the model. The orphans break the next export. Close every document the script opened, even when it fails.
Save fails with Unspecified error, and the file on disk is the old version Several Inventor processes running Check for one process before saving. Back up first, and verify the backup's checksum.
Documents.Add hangs, Close returns 0 and closes nothing UserInteractionDisabled = True with a visible drawing Restart Inventor.
The script never starts A modal window is open in Inventor (for example Measure) Close it. A script cannot get past it.
Get-Process breaks with "cannot convert" Two Inventors open: it returns an array Find the right one through Application.MainFrameHWND.
A renamed .ipt stays locked after Close True Renaming broke the link to the .idw; Inventor keeps the file Do not rename parts that drawings point to while Inventor is open.
cscript runs past two minutes Large drawings, normal Wait. Do not launch it again while it runs.
Half the files are new and half are old An interrupted run Look at file times: two separate groups means a mixed folder. Run it all again.

Do and don't

Do

Don't

Questions people ask

Is there an official Inventor MCP server? Not as of October 2026. Autodesk has an official MCP server for Revit and one for its product help pages, which only reads documentation. For Inventor there are community projects, and they wrap the same COM API shown here. You can use that API directly: the terminal is the interface.

Can Python drive Inventor? Yes, with late binding (win32com.client.dynamic), see above. We use it when the agent works in the Inventor someone is using. VBScript and compiled C# still work as described.

Does Inventor have to be open? Yes. The script attaches to the running application.

Can it run iLogic rules from outside? From Python with late binding, yes: AddRule and RunRule on the iLogic add-in's Automation object. From VBScript the calls that take a document fail, and you need a bridge: how to run an iLogic rule from outside Inventor.

How do you know a run worked? By opening what it produced. A script that ends without errors has not proved anything. See Inventor API errors and what they mean.

If you would rather have the drawings than the scripts: CAD drawing automation for steel fabrication.

References