warehouse-cad-agent
Summary: This MCP server drives one declared warehouse CAD project through deterministic validate/audit workflows, a single managed AutoCAD work copy, read-only queries, bounded edits, and exports — without ever writing to the customer's source drawing.
Project lifecycle (
warehouse_project): validate, audit, rebuild, resolve, roundtrip, verify, package, check status, rundoctor, or cancel long-running single-worker jobs that return ajob_id.AutoCAD session control (
warehouse_cad_session): connect to writable full AutoCAD, auto-create and manage exactly one work copy, open/save it, inspect the document, undo, close, or shut down an agent-launched, document-free instance.Read-only inspection (
warehouse_cad_query): list, get, select, highlight, measure, or compare entities in the active work copy — no mutation.Bounded editing (
warehouse_cad_edit): move, rotate, delete only provably agent-owned entities, update source-backed fields with provenance, add review notes, or roll back.Export (
warehouse_cad_export): produce data, DWG, DXF, PDF, or snapshot outputs of the work copy, or build a native 3DSOLID DWG.Safety boundaries: never opens the customer source as a write target; TrueView is rejected; all paths stay under the authorized root; native solids require source-verified footprint, height, and elevation; devices lacking a supplied height stay 2D.
Evidence caveats: audit output isn't an independent acceptance denominator, and geometry measurements are calculations, not verified business facts.
Note: the README describes
warehouse_cad_programas the only MCP tool, but the supplied schema exposes five tools (warehouse_project,warehouse_cad_session,warehouse_cad_query,warehouse_cad_edit,warehouse_cad_export).
Provides tools for auditing, editing, and generating AutoCAD DWG/DXF files, including live editing via COM automation, creating 3D solids from verified source evidence, and managing work copies.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@warehouse-cad-agentAudit the warehouse DXF and create the equipment ledger."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Warehouse CAD for Codex
This repository is one Windows-first distribution for a Codex plugin and its deterministic warehouse CAD engine.
free Chinese <-> Codex (understand, ask, decide)
-> CadProgram
-> warehouse_cad_program (the only MCP tool)
-> deterministic engine
-> managed CAD work copyCodex is the only natural-language Agent. The plugin does not contain another chatbot, language parser, model runtime, or rule-based Chinese command interpreter. Users talk to Codex; Codex preserves the exact turns, asks for missing facts, previews an inspectable CadProgram, and calls the one tool. The engine validates and executes that program. It never guesses missing dimensions, height, equipment identity, or source evidence.
v0.3.0rc1 verification boundary
This release candidate separates two claims that must not be confused:
Verified without AutoCAD: one irregular synthetic Chinese request reaches a real Codex CLI, becomes a provenance-bound program, passes deterministic equipment-fact validation, and enters the registered
equipment.create_2dCAD-facing plan boundary. Incomplete and blank inputs fail closed. The check runs from two independent clean checkouts and installed-wheel runtimes.Deferred until AutoCAD is available: CAD
execute, an actual DWG change, editable 2D, height-driven 3D, source/final overlay, save, fresh reopen, and customer-drawing coverage.
The accepted plan explicitly reports mutates_cad=true and cad_call_made=false. It proves the integration and product calling form only; it is not drawing evidence. See the RC release notes and the no-AutoCAD input template.
Related MCP server: best-cad-mcp
Requirements
Windows and CPython 3.11 x86-64.
Codex CLI or Codex in the ChatGPT desktop app.
Git and a clean checkout at an immutable commit.
ODA File Converter for DWG/DXF conversion.
AutoCAD Core Console for operations that create or verify native DWG entities.
A Chinese font such as Microsoft YaHei or SimSun for Chinese CAD text.
The repository pins public Python dependencies and hashes in requirements.lock. Editable installs are deliberately unsupported for the product runtime.
Install from a clone
From the repository root in PowerShell:
.\scripts\bootstrap.ps1
codex plugin marketplace add .
codex plugin add warehouse-cad-agent@warehouse-cad-agent
codex plugin listThe first command builds both local wheels, creates an isolated runtime, installs hash-locked dependencies, and writes a marker bound to the Git commit, tracked-source fingerprint, Python version, dependency lock, and both wheel hashes. The launcher fails closed if any binding changes; it never falls back to a system package, editable source tree, or an older plugin cache.
For an isolated runtime location:
.\scripts\bootstrap.ps1 -RuntimeRoot C:\path\to\empty-runtime-rootRestart Codex after installing or updating the plugin so a new thread discovers the Skill and MCP server. Local marketplace and plugin commands follow the official Codex plugin packaging guide. Project-scoped or personal MCP configuration is described in the official Codex MCP guide.
Use
Open Codex in the clone and invoke $warehouse-cad-agent. Give the source drawing and speak normally in Chinese. For example:
先把这张图里的物流设备都去掉,建筑和通道这些结构保留。右边空着那块帮我画一台输送机,大概从这个角点往东,长六米宽一米二;高度我等会儿再给你。
Codex must ask when “这个角点”, direction, unit, device identity, or any other required fact is not resolvable. In v0.3.0rc1, the no-AutoCAD release gate stops at an accepted, unexecuted equipment.create_2d plan; it does not produce visible CAD. After an AutoCAD-dependent final-artifact gate is available and passes, the intended next stages are editable 2D in a managed work copy, a same-window comparison, and only then a later height turn such as “就刚才那台,高度两米四,做成立体的”. Devices without a supplied height must remain 2D.
The user is never asked to handwrite JSON. CadProgram is an internal, inspectable boundary generated by Codex. Each adopted value is bound to the exact user turn, SHA-256, and character span.
Read-only diagnosis
After bootstrap, use warehouse-cad-agent doctor inside the runtime reported by the bootstrap receipt. Doctor checks package identity, Codex availability, ODA, AutoCAD Core Console, Chinese fonts, and runtime writability without editing CAD.
Evidence boundary
A successful handshake, a valid program, a JSON receipt, a wheel, or a screenshot alone is not proof that the requested CAD changed. A final capability claim requires the source-bound program chain, actual saved CAD, fresh reopen/readback, zero-pollution failure checks, and—when correspondence to a source view is claimed—a same-camera source/final/overlay using the actual final CAD.
Customer drawings, their coordinates and text, natural-language replay inputs, oracles, screenshots, and generated results must stay outside the public repository.
Development checks
Development tooling is separate from the product runtime:
py -3.11 -m pip install pytest ruff
py -3.11 -m ruff check .
py -3.11 -m pytest packages\cad-to-layout-engine\tests plugins\warehouse-cad-agent\testsSee architecture, product boundary, the Chinese quickstart, and the isolated Codex reproduction guide.
Available Tools
5 toolswarehouse_cad_editADestructive
Apply a bounded, traceable edit to the active managed AutoCAD work copy. Deletion is limited to provably agent-owned entities; source-backed text updates require provenance.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| params | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already set destructiveHint=true, so the description is not required to restate that. It adds value by disclosing limits on destructive actions: deletion is restricted to agent-owned entities and source-backed text updates require provenance. This gives operational constraints beyond the annotation, though it doesn't detail error/rollback behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with zero filler. It front-loads the core purpose and then delivers key constraints, making it both concise and well-ordered. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With six distinct actions and an unstructured params object, the description is far too brief. It only hints at two use-case constraints but says nothing about how to invoke each action, what params to pass, or what the result looks like. The high complexity demands significantly more explanation than given.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the description mentions no parameter details whatsoever. The params object is unstructured (additionalProperties: true) with six possible actions, yet the description provides no guidance on what each action expects or how to construct params, leaving the agent entirely without parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb 'apply edit' and a specific resource 'active managed AutoCAD work copy'. It further distinguishes itself from sibling tools (query, export, session, project) by being the modification tool, and it adds constraints about deletion and source-backed text updates, making its scope unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the tool name and the context of sibling tools—this is obviously the edit tool for the warehouse CAD work copy. However, the description does not explicitly state when to use it versus alternatives, nor does it mention when not to use it, leaving some routing to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
warehouse_cad_exportB
Export the managed work copy or build a native 3DSOLID DWG. All paths remain under the authorized root; native solids require source-verified footprint, height, and elevation.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| params | No | ||
| project_file | No | User-selected absolute or current-workspace project.yaml path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full responsibility for behavioral disclosure. It mentions path restrictions and prerequisites for native solids, but does not disclose whether the operation modifies data, creates files, has side effects, or requires specific permissions. For an export tool, it is likely to create files, but this is not stated. The description adds some transparency about constraints but lacks detail on side effects and safety.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences with no filler. It efficiently states the core function and key constraints, front-loading the action and important prerequisites. Every word adds value, making it appropriately concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has a nested params object, an action enum with five values, and no output schema, the description is insufficient. It does not explain the purpose of each action, what parameters to pass for each, or what the return format will be. While it notes path restrictions and prerequisites, it omits crucial operational details needed for correct invocation, especially for the 'params' object which is entirely opaque.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 33% (only project_file has a description). The tool description does not explain the 'action' enum values or the structure of the 'params' nested object. It vaguely references requirements for native solids (footprint, height, elevation) but does not map these to specific parameters. With low schema coverage, the description fails to compensate, leaving agents uncertain about how to fill the params object and what each action entails.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: exporting the managed work copy or building a native 3DSOLID DWG. It specifies two primary modes and distinguishes this from sibling tools (warehouse_project, warehouse_cad_session, etc.) as an export operation. However, it does not enumerate all action enum values (data, dxf, pdf, snapshot), leaving some ambiguity about the full scope of export types.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides some context for when to use the tool, indicating that native solids require source-verified footprint, height, and elevation, and that all paths are restricted to the authorized root. However, it does not explicitly contrast with alternative tools or provide explicit when-to-use versus when-not-to-use guidance. The conditions given are more about prerequisites than about choosing this tool over siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
warehouse_cad_queryBRead-only
List, inspect, highlight, measure, or compare entities in the active managed AutoCAD work copy. Geometry measurements remain calculations, not verified business facts.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| params | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds a meaningful caveat beyond the readOnlyHint annotation: 'Geometry measurements remain calculations, not verified business facts.' This warns the agent that measurement results are not authoritative, which is valuable. However, it does not elaborate on behaviors for each action (e.g., whether 'highlight' changes the UI selection state) or other side effects beyond the read-only annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no waste. The first sentence front-loads the core operations and target, and the second delivers an important caveat. Both sentences earn their place and the structure is clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with five distinct actions and an open-ended params object, the description is too sparse. It does not define what each action does, what parameters they expect, or what the return looks like (no output schema). It also does not clarify prerequisites like an active session or what 'managed work copy' means. The description is incomplete for an agent to call this tool correctly without further inference.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not compensate. It lists verbs that roughly correspond to the action enum (e.g., 'inspect' vs 'get', 'highlight' vs 'select') but does not explain each action's purpose or the expected structure of the params object. The generic params is left entirely unexplained, and the wording mismatch between the description and enum values adds confusion.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: to list, inspect, highlight, measure, or compare entities in the active managed AutoCAD work copy. The verb set is specific and distinguishes it from sibling tools like warehouse_cad_edit (modification) and warehouse_cad_export (export). The read-only nature is implied by the verbs and consistent with the annotation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus the sibling tools. The description only mentions the active managed AutoCAD work copy, but does not explain when to choose query over edit/export/session/project. The name 'query' suggests a read-only role, but the description lacks any 'use this when...' or 'use X instead' guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
warehouse_cad_sessionC
Connect to writable full AutoCAD and manage exactly one automatically-created work copy. Never opens the customer source as a write target; TrueView is rejected. Shutdown can quit only a document-free AutoCAD instance launched by this Agent.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| params | No | ||
| project_file | No | User-selected absolute or current-workspace project.yaml path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It does disclose key safety behaviors: it never opens the customer source as a write target, rejects TrueView, and shutdown can only quit a document-free instance launched by this Agent. These are valuable but do not cover the full range of actions or their side effects, so partial transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences with no fluff. The core purpose is front-loaded, followed by key constraints. It is efficient and avoids redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 7 actions, a nested params object, and no output schema, the description is insufficient. It does not explain what any of the actions do, what parameters they need, or what the return looks like. The agent is left guessing on crucial execution details, so completeness is low.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is only 33% — only project_file is described in the schema. The description adds no information about the 'action' enum values or the 'params' object (which is untyped with additionalProperties true). The agent has no idea what each action requires or how to structure params, and the description fails to compensate for this low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool connects to writable full AutoCAD and manages 'exactly one automatically-created work copy', giving a specific verb and resource. It also clarifies it rejects TrueView and never writes to the customer source, which helps distinguish it from other CAD tools. However, it does not explicitly name sibling tools to differentiate, so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides constraints (never write to source, TrueView rejected, shutdown limits) but gives no guidance on when to choose this tool over the sibling tools like warehouse_cad_edit or warehouse_cad_query. There is no explicit 'use this when...' or 'use that instead...' guidance, leaving the agent to infer the tool's scope.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
warehouse_projectC
Validate, audit, rebuild, verify, package, or control one declared warehouse CAD project. Long jobs are single-worker and return job_id. Audit output is not an independent acceptance denominator by itself.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| job_id | No | ||
| params | No | ||
| project_file | No | User-selected absolute or current-workspace project.yaml path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does disclose that long jobs are single-worker and that audit output is not an independent acceptance denominator, which are useful caveats. However, it omits other behavioral aspects like side effects, permission requirements, or reversibility, leaving transparency incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (two sentences) and front-loads the key actions. It avoids unnecessary words, but the brevity somewhat undermines clarity. The structure is acceptable for a short description, though it could benefit from a brief explanation of the actions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (10-action enum, nested params object, no output schema), the description is far from complete. It does not describe each action's purpose, the format of params, or expected outcomes. The note about job_id and audit output provides some context, but an agent would still need significant external knowledge to invoke this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers only 25% of parameters (only project_file has a description). The description does not explain the 'action' enum values, the purpose of job_id, or the 'params' object. It mentions job_id in passing but provides no guidance on how to construct or interpret it. This is insufficient for an agent to correctly fill parameters, especially given the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description lists specific verbs (validate, audit, rebuild, verify, package, control) acting on 'one declared warehouse CAD project', giving a clear resource and a set of operations. It distinguishes this tool from siblings that handle sessions, queries, edits, and exports by focusing on project-level actions, though the broad action list makes the primary purpose less crisp than a single-verb description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not indicate when to use this tool versus the sibling tools (warehouse_cad_session, warehouse_cad_query, etc.) or when not to use it. The only usage hint is that long jobs are single-worker and return job_id, but there is no explicit guidance on scenario selection or alternative routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
warehouse_cad_edit - First observed
warehouse_cad_export - First observed
warehouse_cad_query - First observed
warehouse_cad_session - First observed
warehouse_project
TDQS
Scored across 5 tools
Each tool targets a distinct level: project management, session management, querying, editing, and exporting. No two tools overlap in purpose, making selection unambiguous.
All tools share the 'warehouse_' prefix, and four of five follow the 'warehouse_cad_' pattern. The sole exception, 'warehouse_project', still fits the broad naming scheme but lacks the 'cad_' segment, a minor inconsistency.
With only 5 tools, the set is tightly focused and each tool covers a major capability area. This is an ideal scope for a CAD agent, avoiding bloat while remaining useful.
The tools cover the full workflow from project validation/rebuild, session control, query, edit, to export. Minor gaps exist (e.g., no explicit import or undo), but the core lifecycle is well supported.
Maintenance
Related MCP Connectors
MCP CAD services; bundles with SmartScale (measure to CAD).
Agent-first CAD: editable .kcad.ts source, deterministic review, OpenCASCADE kernel.
Workflow diagnostics, capability routing, and x402 settlement for MCP-compatible agents.
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceEnables agents to create and manipulate 3D CAD models using natural language via MCP, with git-based versioning and manufacturing output generation.1Apache 2.0- AlicenseNot gradedqualityAmaintenanceEnables agent-driven CAD automation by inspecting, editing, and validating DWG drawings through a handle-first workflow, with support for visual grounding, CADPlan execution, and local SQLite workspace management.12MIT
- AlicenseNot gradedqualityBmaintenanceEnables engineering agents to perform parametric CAD operations through a controlled MCP gateway built on FreeCAD, with transactions, diagnostics, and reproducible verification.GNU Lesser General Public v2.1 only
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with CAD software through semantic spatial topology and architectural ontology, supporting drawing, block/layer/entity management, and safe preview-apply transaction workflows for AutoCAD, ZWCAD, GstarCAD, and BricsCAD.1Apache 2.0