Solution · AI CAD agents

Give your agent CAD data it can query, not a drawing it has to swallow.

CADLens turns a DWG, DXF or DWF file into a structured representation and serves it over the Model Context Protocol. The agent asks for the sheet, layer, or entity type it needs and gets that slice back — instead of you flattening a whole drawing into a prompt and hoping the model finds the geometry.

Start free · 50 parses/mo →View documentationSee example output
01THE PIPELINE

CAD file → structured representation → MCP → agent.

There is no model in the middle of this pipeline doing interpretation. CADLens is a deterministic parser; the agent is the consumer of what it produces.

CAD drawing        DWG · DXF · DWF
     ↓
CADLens            parse → sheets, layers, entities, geometry, metrics
     ↓
MCP                7 tools · summary first · filtered retrieval
     ↓
Agent              Claude · Claude Code · Cursor · any MCP client

The representation the agent reads is the same schema 2.0.0 result your backend would get over REST. You can inspect a real one before writing a line of agent code.

02WHY RETRIEVAL BEATS INJECTION

A drawing is bigger than a context window.

The bundled sample is a modest single-sheet drawing — 2,096 entities — and its full JSON result is about 1150 KB. Production drawings are routinely an order of magnitude larger. Three things follow:

  • Summary first. get_job_result defaults to mode="summary": sheet names, layer names, and per-layer entity counts, with no geometry. That is usually enough for the agent to decide what it actually needs.
  • Then a filtered slice. mode="entities_on_layer" or mode="entities_by_type" returns a subset, capped at 500 entities per call, and can be restricted to one sheet.
  • Measurements are precomputed. Each entity ships with bbox and metrics (length, area, perimeter, vertex count), so the agent reads a number rather than doing coordinate arithmetic in the middle of a reasoning chain — where mistakes are quiet.

The effect is that the agent's context holds a description of the drawing plus the handful of entities under discussion, rather than the drawing itself.

03THE TOOLS

Seven tools, and a published server card.

These are the actual tools the server advertises. Names are a contract — they appear in /.well-known/mcp/server-card.json and do not change without a version bump.

parse_cad_file
Upload a DWG, DXF or DWF by base64 or URL and wait for the summary.
get_job_status
PENDING, PROCESSING, COMPLETED or FAILED, with timing and any error.
get_job_result
summary · entities_on_layer · entities_by_type · full.
get_job_image
Pre-signed PNG preview URLs, one per sheet.
list_jobs
Recent jobs on the account, newest first.
delete_job
Remove a job and its stored artifacts.
get_usage
Plan, quota, used and remaining.
04CONNECTING A CLIENT

One command for hosted, one line for local.

The hosted transport is Streamable HTTP with bearer auth, so any MCP client that supports remote servers can use it. Clients that launch a process — Claude Desktop, Cursor — use the stdio server, which can also read CAD files straight off the local filesystem.

# Claude Code — hosted server, nothing to install
claude mcp add --transport http cadlens \
  https://api.cadlens.co/mcp \
  --header "Authorization: Bearer cadl_•••••"

# Claude Code — local stdio server instead
claude mcp add cadlens \
  --env CADLENS_API_KEY=cadl_••••• \
  -- npx -y cadlens-mcp

# Claude Desktop, Cursor, and other config-file clients:
# register the same stdio command in the client's MCP config
{
  "mcpServers": {
    "cadlens": {
      "command": "npx",
      "args": ["-y", "cadlens-mcp"],
      "env": { "CADLENS_API_KEY": "cadl_•••••" }
    }
  }
}

Once connected the agent can be asked things like "parse this drawing and tell me how many circles sit on the ELECTRICAL layer" — it will call parse_cad_file, read the summary, then pull just that layer. Full setup, tool schemas, and result modes are in the MCP documentation.

05WHAT THIS IS NOT

An inspection layer, not a drafting agent.

CADLens reads drawings. It does not write them, and it does not infer meaning that is not in the file. Concretely:

  • It returns what the drawing contains — entity types, layers, coordinates, measurements, text strings — not semantic labels like "this is a load-bearing wall". If a layer is called WALL, that is the draughtsman's naming, and it is up to your agent or your prompt to decide what it means.
  • It produces no edits. There is no write path back into the DWG.
  • Results are deterministic. The same file parses to the same JSON, which is what makes it safe to put under an agent that you also want to be able to audit.
06 — FAQ

Questions, answered.

A DXF is a tag-value text format that is mostly bookkeeping: a drawing with a few thousand entities routinely runs to megabytes, and the geometry is spread across sections that only make sense together. Even where it fits in a context window, the model has to reconstruct structure that has already been computed. CADLens returns the structure directly — sheets, layers, typed entities, bounding boxes and metrics — so retrieval replaces reconstruction.

Seven: parse_cad_file, get_job_status, get_job_result, get_job_image, list_jobs, delete_job, and get_usage. The tool names are part of the published server card at /.well-known/mcp/server-card.json, so they are stable for clients.

get_job_result defaults to mode="summary", which returns sheet, layer and entity counts without geometry. The agent then narrows with mode="entities_on_layer" or mode="entities_by_type", each capped at 500 entities per call, and can restrict to a single sheet. mode="full" returns the complete payload when that is genuinely what you want.

Any MCP client. The hosted server speaks Streamable HTTP at https://api.cadlens.co/mcp with bearer authentication, which Claude Code connects to with a single claude mcp add command. A local stdio server (cadlens-mcp on npm) is available for clients that launch a process, including Claude Desktop and Cursor, and for agents that need to read CAD files off the local filesystem.

No. It uses the same API key, the same monthly quota, and the same billing as the REST API. A parse issued by an agent is counted exactly like a parse issued by your backend.

Both. parse_cad_file takes fileBase64 with a fileName (up to 20 MB decoded, the practical ceiling for inline JSON-RPC content) or fileUrl, a public https URL the server downloads — use that for larger drawings. By default the call waits up to 90 seconds for the parse to finish and returns the summary.

START FREE

Connect an agent to your drawings.

The free plan includes 50 parse requests per month. No credit card, and keys are issued as soon as you sign in.

Start free · 50 parses/mo View documentationSee example output
— RELATED

Keep reading.