Skip to main content
Glama
Ibukhvalov
by Ibukhvalov

CAD Exchanger MCP Server

Python MCP server for CAD Exchanger SDK core operations: loading CAD models once, keeping them in a small path-based cache, inspecting model metadata/tree, computing validation properties, and exporting cached models.

This could be useful in several scenarious:

  • Discover capabilites of CADEx SDK, handy integration with its own tools and apps.

  • Convenient way to explore model, performing common pipeline and create custom ones.

  • Provide an agent CAD brep/bom context in debugging and model analysis purposes.

Quick setup

Set up environment

git clone https://github.com/Ibukhvalov/cadex-mcp.git
cd cadex-mcp
pip install -e .
pip install cadexchanger --extra-index-url="https://download.cadexchanger.com/sdk/python"

Related MCP server: build123d-mcp

Connect to agent

Codex

~/.codex/config.toml

[mcp_servers.cadex]
command = "<path to python with installed dependencies>"
args = [
  "-m",
  "cadex_mcp",
  "--license-file",
  "<path to cadex_license.py>",
  "--cache-size",
  "3",
]
cwd = "<path to cadex-mcp (this repo)>"
startup_timeout_sec = 30
tool_timeout_sec = 300
enabled = true
required = true

After restaring agent, it must be informed of the mcp server and can perform calls.

Options

License Configuration

$env:CADEX_LICENSE_FILE = "A:\path\to\cadex_license.py"
cadex-mcp

or:

cadex-mcp --license-file "A:\path\to\cadex_license.py"

Cache Configuration

The model cache is path-keyed LRU. A model reference, model_ref, is the canonical absolute path to the loaded file.

$env:CADEX_MCP_CACHE_SIZE = "5"
cadex-mcp

or:

cadex-mcp --cache-size 5

Default cache size is 3.

Logging

Diagnostics are written to stderr so stdout stays reserved for the MCP stdio protocol. By default the server logs startup, license activation, cache hits, model loading, validation calls, and export destinations at INFO level.

$env:CADEX_MCP_LOG_LEVEL = "DEBUG"
$env:CADEX_MCP_LOG_FILE = "A:\path\to\cadex-mcp.log"
cadex-mcp

or:

cadex-mcp --log-level DEBUG --log-file "A:\path\to\cadex-mcp.log"

MCP Tools

  • load_model(path, reload=false)

  • unload_model(model_ref)

  • list_models()

  • model_info(model_ref)

  • model_tree(model_ref, max_depth=8)

  • validation_properties(model_ref)

  • export_model(model_ref, output_path, format=null)

  • server_status()

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server that exposes CAD geometry reasoning over STEP files to LLMs, allowing natural language queries about parts, assemblies, dimensions, holes, and mass properties.
    -