Blog · Inventor · 1 Oct 2026 · 5 min read

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. The method that works, the three that do not, the error codes you will see, and the rules that keep a batch 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.

Everything below was tested on Inventor 2025 on Windows 11, during months of batch work on hundreds of steel parts.

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 three 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:

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? Python can call COM, but we do not use it for that. We use VBScript and compiled C# for Inventor, and Python for reading the DXF and PDF files Inventor produces.

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

Can it run iLogic rules from outside? Not directly. That needs 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.