CAD over MCP
The AiChat MCP server lets an external agent create and edit parametric build123d models, inspect saved revisions, measure clearance, and search parts and materials. Projects and revisions stay in your AiChat account. Builds run in isolated CAD sandboxes; the external agent supplies the model reasoning.
The Streamable HTTP endpoint is:
https://aichat.cinderworks.ai/mcp
Connect
You need an AiChat account. Local agent access must be enabled by the operator; the endpoint returns 404 while it is off. OAuth sign-in requires a client that supports Client ID Metadata Documents (CIMD).
Claude and Claude Desktop
In Settings ▸ Connectors ▸ Add custom connector, enter the endpoint above. Sign in to AiChat in the browser, then approve the requested access on the consent page. Enable the connector in your conversation.
Claude Code
claude mcp add --transport http aichat https://aichat.cinderworks.ai/mcp
Run /mcp in Claude Code and select AiChat to sign in through the browser.
Codex
codex mcp add aichat --url https://aichat.cinderworks.ai/mcp
codex mcp login aichat
Sign in through the browser. The equivalent entry in ~/.codex/config.toml is:
[mcp_servers.aichat]
url = "https://aichat.cinderworks.ai/mcp"
tool_timeout_sec = 240
The timeout allows a CAD build to finish within its three-minute deadline. See the Codex MCP documentation for configuration and client support.
Access tokens
In AiChat Settings ▸ Local agents, create an access token with read access and, if needed, write access. Copy it once and configure your client's HTTP authorization header:
Authorization: Bearer cwk_…
For Codex, set bearer_token_env_var = "AICHAT_ACCESS_TOKEN" in the server's
config table and supply that environment variable to Codex.
Scopes
| Scope | Allows |
|---|---|
cad:read | Inspect your projects, revisions, geometry evidence, views, parts and materials; open a workspace for those reads. |
cad:write | Create projects, propose checks, create alternatives, build or restore revisions, and add library parts or materials. Requires cad:read as well. |
offline_access | Keep the connection signed in using rotating OAuth refresh tokens. Adds no CAD permissions. |
Tools
Tools use a workspace handle from Open CAD workspace. Read tools do not edit the design. Design and library writes require write access and are annotated for client confirmation. Opening a workspace is also marked as a write because it creates audit state, but requires only read access.
| Tool title | Tool | Access | Purpose |
|---|---|---|---|
| Open CAD workspace | cad_open_workspace | Write (audit; read scope) | Open a credential-bound workspace, optionally for an existing project. |
| Find CAD projects | cad_list_projects | Read | Page your saved projects and current revisions. |
| Find CAD revisions | cad_list_revisions | Read | Page a project's revision history and build status. |
| Browse CAD groups | cad_list_groups | Read | Find named groups or browse an assembly hierarchy. |
| Find CAD parts | cad_list_parts | Read | Page part facts by exact IDs, labels or group. |
| Find CAD uploads | cad_list_imports | Read | Page saved STEP uploads for a project. |
| Read CAD project | cad_open_project | Read | Get a compact overview of a project or historical revision. |
| Read CAD starter | cad_read_starter | Read | Read the public starter source or build contract. |
| Read CAD revision evidence | cad_read_revision | Read | Read source, parameters, checks, part facts, provenance or downloads. |
| Look at the CAD model | cad_view | Read | Render orthographic views, or explicit capture frames as overlays, guides or masks. |
| Check the fit against photos | cad_fit_check | Read | Compare selected parts against explicit capture frames using oriented photo edges and depth; return scores and overlays. |
| Measure clearance | cad_measure | Read | Read recorded kernel clearance between parts or groups. |
| Find matching CAD parts | cad_resolve_parts | Read | Rank lexical matches for a part reference without a model call. |
| Search standard parts | cad_library_search | Read | Search standard hardware and saved STEP parts. |
| Search materials | cad_material_search | Read | Find material IDs, properties, units and sources. |
| Create CAD project | cad_create_project | Write | Create a project with a build123d starter. |
| Propose a measured CAD check | cad_propose_check | Write | Freeze expected dimensions for one separate rectangular addition. |
| Create CAD alternatives | cad_create_alternatives | Write | Make lettered alternatives from a revision to build several designs. |
| Build CAD revision | cad_build | Write | Build source or parameter edits as a saved revision. |
| Restore CAD revision | cad_restore_revision | Write | Restore an earlier ready design as a new revision. |
| Delete CAD alternative | cad_delete_alternative | Write | Delete an agent-made alternative that has no builds of its own. |
| Delete CAD workspace | cad_delete_project | Write | Permanently delete a workspace and its files, after the user confirms its exact name. |
| Add a library part | cad_part_add | Write | Save and measure a STEP file as a reusable part. |
| Create materials | cad_material_create | Write | Add sourced material properties to your library. |
| Refresh CAD scene | cad_viewer_scene | Read; viewer only | Renew the scene URL for the same saved revision. |
Alternatives
For several designs of one request, Create CAD alternatives makes up to six
named alternatives at once, lettered in order (B, C, D…), each starting from
the current model or another ready revision. Build CAD revision with
option set to a letter builds into that alternative; the main model doesn't
change. Each alternative appears in the workspace's model menu as it's made,
and keeping one is your choice in AiChat. A project holds up to 50
alternatives; an alternative an agent made that has no builds of its own can be
deleted, and its letter is never given to another. Pass the same
idempotency_key to make a retried call return the same alternatives: any
deleted since are marked deleted rather than made again, and the key can't be
reused with different names or base.
Part phases
A home or renovation project models the house as it stands with parts of
phase existing, and each design change as phase new parts plus phase
removal volumes: boxes marking material to demolish or cut, such as an
opening widened through a wall. Part facts include phase when the source
declares one; an unphased part counts as new.
Existing parts are never edited to show a design. A build into an alternative,
or in a project with a protected revision, fails when an existing part is
missing, changes phase or changes shape (existing_part_changed and related
codes), or when it adds survey parts. On the main model of an unprotected
project the build succeeds and records the change as a survey correction, with
a warning. Removal volumes have no material, stay out of the BOM, mass and STL,
and show as red ghosts; the preview cuts existing parts open where they reach.
STEP keeps every part uncut, with removal volumes labelled "(removal)".
Part provenance
A build can record how each part it adds or changes was known, keyed by part
ID: observed (fitted to capture evidence or a tape measurement),
estimated (standard sizes, priors or partial views), inferred (a small
unseen gap filled by symmetry or continuation) or unknown (a placeholder),
with optional capture IDs, a scale source (arkit, tape or prior) and a
short note. Pass it as provenance on Build CAD revision: up to 200
entries within 32 KB, and every capture must belong to the project.
Later builds keep a part's record while its geometry stays the same, measured
by its geometry fingerprint; a part that changes loses its record unless the
build records it again, and an attempt that fails records nothing. Restoring
or keeping a revision keeps its records. The build result summarises how many
parts are recorded, carried over or unrecorded, and cad_read_revision with
section provenance lists every part. Notes are the agent's own text and are
treated as data, not instructions.
Architecture kit
Build source can model a building with from arch import ...: walls whose
joins and openings are data, door and window fills, removal boxes, slabs and
rooms. cad_library_search with category architectural returns its
reference, and it is part of aichat://cad/guidance. Walls mitre where they
meet, and the kit derives every solid from those records, so the same source
gives the same parts. A new opening in an existing wall becomes a removal box
plus a new door or window, and the wall itself is never cut, so alternatives
keep the surveyed house unchanged. The kit refuses impossible requests with a
code and a fix (opening_outside_wall: … Fix: offset must be 0–3100). A
RoomPlan scan becomes a survey model whose source holds the scan as data
(ws = load_plan(PLAN)): existing walls, openings, door and window
placeholders and floors, ready to protect before designing on it.
Builds with kit parts run an advisory house check: the receipt's
summary.arch counts its errors, warnings and notes and lists the first, and
cad_read_revision with section arch lists every issue and the rooms the
walls enclose. It never fails a build, and issues on existing parts alone are
notes, since it judges the design rather than the survey.
Revisions of a house project carry the house plan as data. cad_read_revision
with section plan lists the plan's elements (walls, openings, floors, roofs
and more) with their sources, and filters by ids. A revision without a plan
reports available: false.
Resources and prompts
aichat://cad/guidance: CAD modelling guidance and evidence limits.aichat://cad/library: the standard parts catalog.aichat://cad/projects/{project}/revisions/{revision}: a compact owned revision overview, available without opening a workspace.ui://aichat-cad/viewer: the inline 3D viewer.
The optional prompts are design_part (description and constraints),
fix_interference (project ID) and review_revision (project ID and optional
revision ID). They provide starting workflows for those requests.
Inline 3D viewer
Clients with MCP Apps support show the model in the conversation after a build, revision read or rendered view. The message holds a preview card: the rendered view, or a still frame of the model, with the part count and any overlaps. Expand opens the interactive viewer full screen, with the parts and interference lists. Pop out keeps it in a floating window while you keep chatting. Each appears when the client supports that mode. In the viewer, orbit, zoom, fit the model, select parts and inspect interference highlights. Clients without either mode offer Interactive 3D in the message instead; click the model before scrolling to zoom it. Open in AiChat opens the saved revision in the full workspace.
Where the client accepts it, the viewer tells the agent which revision you are looking at and which parts you have selected. Scene links expire after ten minutes and the viewer can refresh them. Clients without MCP Apps support receive text results and model links.
Manage access
AiChat Settings ▸ Local agents lists access tokens and OAuth grants with their permissions. Revoke a grant or token there to stop its next request. Revocation preserves your projects and revisions. Reconnect and sign in again to grant new access.
Limits
- A workspace admits at most 20 builds per hour. Account quotas and the 50 builds per day CAD limit also apply.
- A build waits at most three minutes and sends progress about every five seconds. Interruption or cancellation cancels the build; its saved status distinguishes ready, failed and cancelled attempts.
- Workspace handles expire seven days after their last use and belong to the credential that opened them.
- Inspection and build text results use a 12 kB serialized budget. Larger inventories and source return cursors or explicit fragments; rendered images and catalog results have separate bounds. Lists default to 20 rows, with at most 50; source searches default to five matches.
- MCP requests are limited to 4 MiB. STEP files added to the parts library are limited to 25 MiB.
Geometry checks establish the facts reported in a revision. They do not certify structural strength, printability or manufacturing readiness.
Privacy and support
AiChat stores your projects, source, revision artifacts, and tool audit records in conversations named External agent · …. A measured-check proposal also stores the short owner request supplied by the external agent. The server does not retrieve your external client's chat history. OAuth stores client metadata, consent grants and token records; access tokens are stored as hashes.
See the privacy policy for storage, service providers and retention. For support, email [email protected].