techdrawai-mcp
v0.2.0
Published
TechDraw AI: turn a product photo into a dimensioned 2D technical drawing, a CAD-ready DXF or DWG, a 3D printable STL, a 3D mesh or a photoreal render, from your terminal or your AI agent. MCP server and CLI.
Maintainers
Readme
techdrawai
Turn a photo of a physical object into a dimensioned 2D technical drawing, CAD-ready DXF/DWG geometry, a 3D mesh, or a photorealistic render — from your terminal or from an AI agent.
This package is both:
- an MCP server, so Claude (or any MCP client) can draft, vectorise, reconstruct and render as tools; and
- a CLI, so the same things work from a shell script or a build pipeline.
Both are thin clients over the TechDraw AI public API. Nothing is computed locally, so there is no CAD kernel to install.
Install
npm install -g techdrawai-mcpOr run it without installing: npx techdrawai-mcp.
Sign in
You need a TechDraw AI account on the Studio plan — programmatic access is a Studio feature. Then:
techdrawai auth loginThat opens your browser, creates an API key from your session, and hands it back to the terminal over loopback — you never copy or paste a key. It is stored at ~/.techdrawai/config.json with owner-only permissions.
If you would rather manage the key yourself, create one in Settings → API keys at https://techdrawai.com/app?view=settings and either run techdrawai auth tda_sk_… or set TECHDRAWAI_API_KEY.
techdrawai whoami # who the stored key belongs to, verified against the server
techdrawai credits # balance, plan and per-operation costs
techdrawai auth logoutUse it from an AI agent (MCP)
Add the server to your MCP client. For Claude Code:
claude mcp add techdrawai -- npx -y techdrawai-mcpOr, in a client that reads a JSON config:
{
"mcpServers": {
"techdrawai": {
"command": "npx",
"args": ["-y", "techdrawai-mcp"],
"env": { "TECHDRAWAI_API_KEY": "tda_sk_…" }
}
}
}The env block is optional — with no key in the environment the server uses the one techdrawai auth login stored.
Tools
| Tool | What it does | Cost |
| --- | --- | --- |
| generate_technical_drawing | Photo → dimensioned 2D technical drawing | 3 credits |
| render_product | Technical drawing → photorealistic product render | 3 credits |
| image_to_dxf | Any image → DXF (and DWG) CAD geometry | free |
| image_to_stl | Any image → extruded, 3D printable STL | free |
| photo_to_3d | Photo → textured 3D mesh, GLB/FBX/OBJ/USDZ/STL | 3 credits |
| identify_product | Name the object in a photo | free |
| check_credits | Balance, plan, and what each operation costs | free |
Every tool writes its result to disk (./techdrawai-output/ unless you pass output_path) and returns the path. That keeps megabyte-scale images out of the agent's context, and makes chaining natural: the drawing a tool just wrote is the input to the next one.
A typical agent run:
Take
bracket.jpg, work out what it is, draw it to ISO A3 with the overall width at 120 mm, then give me a DXF at that real size.
which becomes identify_product → generate_technical_drawing → image_to_dxf.
Use it from a shell
# What is this thing?
techdrawai identify -i bracket.jpg
# Photo -> technical drawing, anchored to two real measurements
techdrawai draw -i bracket.jpg \
--name "steel wall bracket" \
--measure 120:"overall width" \
--measure 45:"height" \
--units mm --standard ISO --paper A3 --type working \
--views front,top,side \
--out drawings/bracket.png
# Drawing -> CAD geometry at real size, plus AutoCAD's DWG
techdrawai dxf -i drawings/bracket.png --width-mm 120 --dwg --out cad/bracket.dxf
# Logo -> a solid STL to print, 120 mm across and 4 mm tall
techdrawai stl -i logos/mark.png --size-mm 120 --thickness-mm 4 --out print/mark.stl
# Drawing -> photoreal product shot
techdrawai render -i drawings/bracket.png --style studio --material "brushed aluminium"
# Photo -> 3D mesh
techdrawai model3d -i bracket.jpg --detail high --out models/bracket.glbtechdrawai help prints every flag.
Measurements are what make it accurate
Without --measure, dimensions are the model's best estimate and are marked as nominal. With even one real measurement, every other feature is scaled proportionally from it, so the whole drawing becomes internally consistent and manufacturable. The syntax is value:where it was taken — the wording of the second half also tells the drafter whether it is a width, a height or a diagonal.
Credits and plans
| Operation | Credits | | --- | --- | | Technical drawing | 3 | | Product render | 3 | | Photo to 3D | 3 | | Image to DXF / DWG | free | | Identify product | free |
Failed generations are refunded automatically. API, CLI and MCP access requires an active Studio plan — the free tier's introductory credits and the Starter plan are for the web app.
Configuration
| Variable | Purpose |
| --- | --- |
| TECHDRAWAI_API_KEY | Your key. Overrides the stored config, so CI and containers need no interactive login. |
| TECHDRAWAI_BASE_URL | Point the client at a different deployment. Defaults to https://techdrawai.com. |
Config file: ~/.techdrawai/config.json.
Exit codes
0 success · 2 out of credits or a plan is required · 1 everything else.
Licence
MIT
