Agentcadのロゴ

Agentcad

コミュニティ
jdilla1277

CAD CLI and MCP server for AI agents

公開者jdilla1277
リポジトリagentcad
言語Python
フォーク
16
スター
144
利用可能なツール
0
通信方式stdio
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    Agentcadは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには144件のスターと16件のフォークがあります。

agentcad

CAD tool for AI agents. Give your coding agent the ability to design 3D models.

Your agent writes build123d Python scripts by default. agentcad handles execution, STEP export, PNG rendering, mesh export (STL/GLB/OBJ), geometric metrics, validation, diffing, and browser preview. CadQuery remains available as an explicit compatibility mode. Each command's final response is structured JSON on stdout.

Reading the output: the JSON response is written to stdout; human-readable progress and diagnostics go to stderr. Parse stdout as JSON and treat stderr as plain text — don't merge the streams with 2>&1 before a JSON parser, or the progress lines will break parsing. If you need both, capture them separately.

agentcad is open source under the Apache License 2.0. It runs locally and requires no signup.

Featured on Product Hunt

Demo

Watch a coding agent design in agentcad

A coding agent designing in agentcad, live. See more at agentcad.dev.

On CADGenBench: 48% higher CAD Score and 21.8% lower model cost

Watch measuring agentcad's effectiveness

In a GPT-5 Nano comparison, the agent using agentcad also produced 2.5 times as many valid outputs. Watch the video, read the benchmark results, or view the change log for more recent updates.

Quick start

Install agentcad, then paste this into Claude Code, Cursor, or any coding agent:

Create a Python 3.12 virtual environment, then:

pip install agentcad
agentcad init --name phone-stand

Design me a phone stand: a simple angled cradle that holds a phone
at 60 degrees. About 80mm wide, 50mm deep, with a 5mm lip at the bottom
to keep the phone from sliding. Show me a preview when you're done.

Keep generated files in a build directory

Create agentcad.toml in your source project before initialization:

toml
build_dir = "./build"

Then run agentcad init. Version directories, the generated manifest, viewers, exports, and logs go under build/; authored scripts and installed guidance stay in the source project. Add the build directory to your own .gitignore.

For CI, initialize and select an independent root with agentcad init --build-dir /tmp/cad-build and agentcad run model.py --label first --build-dir /tmp/cad-build. Overrides do not edit project configuration. Relative build paths resolve from the project root, not the caller's working directory. Existing projects keep their current layout unless configured. --output remains a deprecated version label, never a destination. See agentcad docs artifacts for the full contract.

What it does

  • agentcad run script.py --label label — execute a build123d script, producing a versioned STEP file + geometric metrics (volume, dimensions, validity, face/edge counts)
  • Live project viewer — successful runs open one stable local project URL and refresh it after subsequent completed builds. Leave the tab open while iterating; camera and compatible review settings survive updates. Failed builds leave the last successful model visible. Versioned viewer.html snapshots remain available; from v2, A=previous and B=current are preloaded for A/B, side-by-side, overlay, and Parts-tab change review (--no-view opts out)
  • agentcad run ... --preview — four-view PNG for visual verification; the browser viewer can export an on-demand turntable GIF
  • agentcad run ... --render iso,front — high-quality PNG views
  • agentcad run ... --export stl,glb — mesh export for 3D printing or web viewers
  • agentcad measure output.step — dimensional report (overall metrics, edge lengths, face areas, circular/cylindrical diameters)
  • agentcad check-spec output.step spec.json — compare measured cylindrical features against an explicit checklist
  • agentcad inspect output.step — bounded topology deep-dive with observable loading, validity, and extraction phases
  • agentcad parts list REF — list named/captured parts for a version
  • agentcad parts show REF ID — show one versioned part by stable id
  • agentcad parts view REF — hand off an isolated, focused, or grouped part review viewer
  • agentcad diff 1 2 — compare versions, including actual shared/reference-only/candidate-only source-frame volume for valid closed solids
  • agentcad view old.step new.step — open a synchronized A/B comparison with separate centered projection and source-frame 3D volume artifacts
  • agentcad viewer [open|status|stop] — open the live project or manage its lightweight local service; open is the default
  • agentcad docs [section] — runtime-aware built-in documentation and worked examples

--label names the version; the JSON response returns the actual file under outputs.step. The older --output LABEL spelling remains a deprecated compatibility alias and never denotes a destination path.

Keep one preview open

After a normal run or import, give the human project_viewer.url from the JSON response. That URL tracks the latest completed viewer; viewer still points to this version's snapshot. An active page prevents another browser tab opening. Updates are checked about once a second (less often in background tabs). A new model replaces the previous one only after it loads successfully.

--no-view never launches a browser or starts the viewer service. If it still generates viewer artifacts, an already-open project page can receive them. The core-only --no-preview --no-diff --no-view combination generates no viewer; the page retains the older model and reports that the new preview is unavailable.

The service binds to 127.0.0.1 and serves only registered viewer snapshots at private project URLs. These are local bookmarks, not public share links. URLs survive service restarts and builds, but moving the project folder changes its identity. Viewer state lives in ~/.cache/agentcad/viewer (override with AGENTCAD_VIEWER_HOME for isolated automation). Keep that directory to preserve the saved port and private URLs. If the port is occupied, AgentCAD reports the problem without silently changing the URL. Use agentcad viewer status and agentcad viewer stop for diagnostics; agentcad viewer open restarts it. An incompatible service protocol requires stopping the service with the installation that started it before reopening with the new installation.

No boilerplate

Scripts need zero imports. By default, build123d primitives, show_object, and agentcad edit helpers are pre-injected:

python
box = Box(10, 20, 5)
show_object(box)

For editor completion or explicit dependencies, the same AgentCAD-owned callables are available from the stable authoring module:

python
from agentcad.api import load_step, safe_cut, translate, show_object

Import build123d primitives such as Box or Vector from build123d itself. Do not import STEP writers: show_object hands the result back to AgentCAD, which writes and tracks the canonical STEP file.

In build123d scripts, capture each shape object once, including across show_object(), show_assembly(), and show_compound() calls and within assembly iterables. Capturing an assembly also captures all its descendants; do not capture a child separately or reuse it in another captured assembly. Repeated references fail with error_kind: "duplicate_capture"; changing the name or ID does not create another instance. For intentional instances, use from copy import deepcopy, then copy the shape before positioning and capturing it. See agentcad docs parts for an example.

agentcad init records build123d as the project runtime. That keeps the script API, built-in docs, and subsequent runs on one clear default.

CadQuery compatibility

CadQuery remains supported for existing scripts and projects, but it is not the default authoring path and it is not installed by default. pip install agentcad ships build123d and the OpenCascade binding only. Enable the compatibility runtime with the optional extra:

bash
pip install "agentcad[cadquery]"
agentcad daemon restart   # if a daemon was already running

The extra pulls in CadQuery and its own dependency chain (CasADi and the COIN-OR solver libraries it bundles), which carries a larger third-party license surface than the default install. Selecting the CadQuery runtime without the extra returns a structured error naming this command. Adopting agentcad inside a product or hosted service? See Incorporating agentcad into your project.

For a CadQuery project:

bash
agentcad init --name legacy-model --runtime cadquery
agentcad docs quickstart --runtime cadquery
agentcad run script.py --label first

For a one-off CadQuery script inside a build123d project:

bash
agentcad docs preamble --runtime cadquery
agentcad run legacy.py --label legacy --runtime cadquery

Keep each script on one CAD API. Conflicting imports, including mixed imports, are rejected against the project runtime before daemon startup or version creation, with guidance for fixing the script or intentionally overriding the runtime. Unpinned projects still detect the runtime and reject ambiguous scripts. Run responses identify the selection in runtime_source (command, project, or detection, which includes the default fallback). Run agentcad docs runtimes for the complete dispatch contract.

MCP integration

For native tool integration with Claude Code, Cursor, or Windsurf:

bash
pip install agentcad[mcp]

Extras combine: pip install "agentcad[mcp,cadquery]" installs both.

Add to .mcp.json:

json
{"agentcad": {"command": "python", "args": ["-m", "agentcad.mcp"]}}

Requirements

  • Python 3.10–3.12 (OpenCascade bindings do not support 3.13+)

License

Apache License 2.0. See LICENSE.

Feedback

If your agent struggles, run agentcad feedback "what happened" to capture a friction log.

AgentcadのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Agentcadに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Agentcadをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. AgentcadのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "agentcad": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてAgentcadのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. AgentcadのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Agentcadを使ってこのタスクを手伝ってもらえますか?
Agentcad
はい、読みました。
Agentcadで調べた結果をお伝えします。

よくある質問

Agentcad MCPサーバーは何に使いますか?

Agentcadは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでAgentcad MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでAgentcadを利用できます。

TypingMindでAgentcad MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Agentcadを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Agentcad MCPをTypingMindに接続するにはどうすればよいですか?

AgentcadはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでAgentcad MCPのどのようなツールを利用できますか?

AgentcadはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Agentcad MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Agentcadで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇