Skip to main content

inventor-mcp-server logo

inventor-mcp-server

PyPI CI License: MIT Contributions welcome

Maintained continuation of NeonGlay/inventor-mcp. The original repository has had no activity since its initial release (June 2026), and fresh installs there fail on MCP SDK 2.x. This repo carries the full original history plus the fixes and features that were submitted upstream as PRs and never reviewed. If the original author returns, everything here is available to be merged back. See CHANGELOG.md.

MCP server for parametric 3D modeling in Autodesk Inventor — drive Inventor with Claude (or any MCP client) in natural language.

Build real parametric parts — flanges, shafts, nuts, brackets, sheet-metal enclosures — by talking to an AI assistant. The server wraps Inventor's COM API with high-level, millimeter-based tools and ships with battle-tested knowledge of Inventor 2026 API quirks that aren't documented anywhere else.

You:    "Build a DIN 934 M16 hex nut with proper conical chamfers"
Claude: creates sketch → hexagon → extrude → tapped M16×2 hole →
        revolve-cut chamfers → done. Fully parametric, dimensioned sketches.

Features

  • 59 MCP tools: sketching, extrude/revolve, native hole features (drilled / tapped / counterbore), fillets, chamfers, circular patterns, sheet metal (named rules / Face / auto-mitered Flanges / Cut at world coordinates / Corner Round, with Flat Pattern support), parameters
  • Assemblies with vendor parts: import_step (keeps the files in your project folder), placement with full orientation, check_interference / measure_distance, and sweep_rotation to check a door or lock moves freely through its whole range
  • Assemblies (IAM): place components, ground them, constrain by origin geometry (mate / flush / angle) or drop a bolt into a hole with a single Insert constraint
  • execute_python power tool — run arbitrary Python against the live COM connection with a persistent namespace (escape hatch for anything not covered by dedicated tools)
  • Auto-reporting — every feature operation returns a volume/topology delta (Hole1 | V 23497 (-503 mm³) | F7 E14), so the AI can self-verify each step
  • Never hangs on a dialog — calls run with SilentOperation on a dedicated Inventor thread. A call stuck behind a modal dialog, or a long job, returns within 50 s with the dialog's title and text (read from the window list, no COM call); call_status follows it and returns the result when it finishes
  • Several Inventors at once — e.g. two agents on two projects (Claude Desktop runs one server for all its chats). connect(new_instance=True, project=..., instance="name") starts a separate Inventor with its own project; every tool takes instance= to pick one, and each has its own call thread and execute_python namespace, so one agent's long call doesn't hold up the other. list_instances shows them. An Inventor opened by hand can't be targeted — Windows always hands out the first one — so let the server start the second
  • Transactions — wrap multi-step builds, roll back everything with one call
  • Hot reload — edit the API wrapper and reload without restarting the MCP client
  • Topology helpers — find edges/faces by coordinates instead of guessing indices
  • Parametric discipline — projected origin points, symmetry constraints, dimensioned sketches that survive parameter changes

Requirements

  • Windows with Autodesk Inventor (developed on Inventor 2026, also verified on Inventor 2027; older versions may need enum adjustments — see docs/inventor-api-notes.md)
  • Python 3.12+
  • pip install "mcp[cli]" pywin32 — MCP Python SDK 1.x and 2.x are both supported (2.x renamed FastMCP to MCPServer; the server detects which is installed)

Installation

  1. Clone this repository:

    git clone https://github.com/cenitu/inventor-mcp-server.git
    
  2. Install dependencies:

    pip install "mcp[cli]" pywin32
    
  3. Register the server with your MCP client. For Claude Code, add to .mcp.json in your project root (see .mcp.json.example). Use the absolute path to inventor_mcp_server/server.py:

    {
      "mcpServers": {
        "inventor": {
          "command": "python",
          "args": ["C:/path/to/inventor-mcp-server/inventor_mcp_server/server.py"]
        }
      }
    }
    

    Don't use "cwd" with -m inventor_mcp_server. Claude Code ignores cwd and starts the server from your project root, where the package can't be found — the process exits immediately and the client only reports Connection closed. Pointing at the script by absolute path works from any directory.

    Configs written for 0.2.x that point at src/server.py still work — that file now forwards to the inventor_mcp_server package — but please update them; the shim will be removed in a later release.

    Alternatively, install it as a package — no clone needed, and the config gets a plain command:

    pip install git+https://github.com/cenitu/inventor-mcp-server.git
    
    { "mcpServers": { "inventor": { "command": "inventor-mcp-server" } } }
    

    (If your MCP client can't find the command, use the full path printed by where inventor-mcp-server.)

  4. Restart the MCP client (MCP servers load at session start), start Inventor, then ask your AI assistant to build something.

Avoid win32com.client.gencache.EnsureDispatch and CastTo in your own scripts against the same Python install — they generate a gen_py cache that breaks plain GetActiveObject (KeyError: '_dispobj_'). The server itself is immune since 0.4.1 (it never uses gen_py classes), but your scripts aren't: delete %LOCALAPPDATA%\Temp\gen_py if it happens. See the API notes for the full story.

Smoke test

tests/smoke_test.py exercises every geometry-creating code path once against a live Inventor and reports PASS/FAIL per step — the quickest way to qualify a new Inventor release or verify your install:

python tests/smoke_test.py            # starts Inventor if needed; closes only the docs it created
python tests/smoke_test.py --keep     # leave the test documents open for inspection

It also checks every hard-coded enum constant against the live COM type library, so a renumbered enum in a future release shows up as a named failure instead of a cryptic COM error. Exit code = number of failed steps.

Current results: 61/61 pass on Inventor 2027 and 2027.1 (Python 3.12, mcp 2.0).

tests/assembly_smoke_test.py does the same for the assembly tools — it builds a plate and a pin on disk, places them, and exercises mate / flush / angle / insert constraints (29/29 pass on Inventor 2027).

The skills/ directory contains two Agent Skills that teach Claude the workflow and the Inventor 2026 API quirks:

  • inventor-modeling — core patterns: units, sketch discipline, hole placement, sheet metal, diagnostic verification, common failure modes
  • inventor-din-parts — parametric recipes for DIN/ISO standard parts (hex nuts DIN 934 / 439, bolts DIN 933, socket head cap screws DIN 912, countersunk screws DIN 7991, washers DIN 125, flanges DIN 2573) with dimension tables

Install by copying into your skills directory:

cp -r skills/inventor-modeling ~/.claude/skills/
cp -r skills/inventor-din-parts ~/.claude/skills/

Why this exists

Inventor's COM API documentation is wrong or silent about many things in recent versions. This project encodes empirically verified knowledge:

  • Correct Inventor 2026 enum values (kPartDocumentObject = 12290, dimension orientation 19201/19202/19203, …)
  • ChamferFeatures.AddUsingDistance(EdgeCollection, d) — the 2026 replacement for the removed CreateChamferDefinition
  • Sheet-metal FlangeDefinition: the Distance argument is silently ignored; the real height is set via feature.Definition.HeightExtent.Distance.Expression (and the angle is in radians — pass 90 and you get 5156°)
  • CreateLinearPlacementDefinition requires a BiasPoint argument that dynamic dispatch won't tell you about
  • Edge indices renumber after every feature; fillets shift adjacent edges
  • …and more in docs/inventor-api-notes.md

Architecture

inventor_mcp_server/server.py        MCP server (FastMCP / MCPServer) — tool definitions (stdio transport)
inventor_mcp_server/inventor_api.py  InventorConnection — COM wrapper, all geometry logic (mm units)
skills/              Agent Skills for Claude
docs/                Hard-won API knowledge

Contributing

Contributions welcome — see CONTRIBUTING.md for setup, the fast edit → reload_api loop, and how to add a tool. Especially valuable:

  • Testing on Inventor 2024/2025 — run tests/smoke_test.py and file an Inventor version test report (no code needed)
  • Drawing (IDW) support, and more modeling tools (shell, loft, sweep)
  • More DIN/ISO part recipes
  • Bug reports with the exact COM error and Inventor version

Start with a good first issue, or ask and share what you built in Discussions.

License

MIT — see LICENSE.

Metadata

Release files for inventor-mcp-server 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inventor-mcp-server 0.5.0
File Size Uploaded Provenance Actions
inventor_mcp_server-0.5.0.tar.gz 48.3 kB With provenance Details for inventor_mcp_server-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inventor-mcp-server 0.5.0
File Interpreter ABI Platform Actions
inventor_mcp_server-0.5.0-py3-none-any.whl Python 3 none any Details for inventor_mcp_server-0.5.0-py3-none-any.whl

Total release size: 93.3 kB

Release files / inventor_mcp_server-0.5.0.tar.gz

Download URL inventor_mcp_server-0.5.0.tar.gz
Size 48.3 kB
Tags Source
SHA-256 checksum
How to use checksums
45ce75a85b4fcb178a0b575b833c417ca8b342f18dcc3687994259d213cbb8a0
BLAKE2b-256 checksum
How to use checksums
85614883a0b621bc015aa19f36e4a0aee731213860e8016fc32c01ea4bb4909b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / inventor_mcp_server-0.5.0-py3-none-any.whl

Download URL inventor_mcp_server-0.5.0-py3-none-any.whl
Size 44.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d736a4d66ddf9136ba9d2932cd33e804a8eb1cdc11a4b1c026908606a8e04115
BLAKE2b-256 checksum
How to use checksums
a1ec4830930d701c5ac891bc5f762ffc05a91ce5c4a7a1a06a7ff5e3bac7d5fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for inventor-mcp-server 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for inventor_mcp_server-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page