cadlens-mcp
OfficialClick 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., "@cadlens-mcp parse this CAD file from URL: https://example.com/blueprint.dwg"
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.
cadlens-mcp
A Model Context Protocol server that wraps the Cadlens CAD parsing API so MCP-aware LLM clients (Claude Desktop, Claude Code, Cursor, Zed, Windsurf) can parse CAD files (.dwg, .dxf, .dwf, .dwfx, .dgn V7, .pdf, max 100 MB) and reason over the extracted entity, layer, and metadata payloads.
Cadlens converts CAD drawings into structured JSON without requiring AutoCAD or any desktop software — learn more at cadlens.co.
Install
Get an API key from the Cadlens dashboard first — keys start with cadl_ and are created in the dashboard for free.
Claude Desktop / Cursor / Windsurf
Add to your MCP client config (e.g. ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"cadlens": {
"command": "npx",
"args": ["-y", "@cadlens/mcp-server"],
"env": {
"CADLENS_API_KEY": "cadl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}Claude Code CLI
claude mcp add cadlens \
--env CADLENS_API_KEY=cadl_xxx \
-- npx -y @cadlens/mcp-serverRelated MCP server: DWG MCP Server
Development (build from source)
npm install
npm run build
export CADLENS_API_KEY="cadl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
node dist/index.jsTools
Tool | What it does |
| Upload a local CAD file, poll until parsed (5 min budget), return summary. |
| Download a CAD file from a URL, then parse it like |
| Cheap status check ( |
| Fetch parsed content. |
| Re-fetch the 1h presigned PNG URL without re-downloading the full result. |
| The 100 most recent jobs for the configured API key. |
| Delete a job and its S3 artifacts. Irreversible. |
Configuration
Env var | Required | Default | Notes |
| yes | — | Created in the CADLens dashboard. |
| no |
| Set to |
| no |
| Port for the in-process webhook receiver. |
| no | unset | Set to a tunnel URL (ngrok/cloudflared) to let CADLens hit the local receiver. When set, parse calls auto-register the webhook and the poller short-circuits on receipt. |
| no |
| Per-HTTP-request timeout for CADLens calls. |
Webhook short-circuit (optional)
If WEBHOOK_PUBLIC_URL is set, parse_file / parse_url register a per-process webhook URL alongside the upload. The webhook handler updates an in-memory job-state cache; the poller checks that cache before each HTTP GET and returns early when COMPLETED / FAILED arrives. This trims worst-case latency by up to one full poll tick (~1 s) without changing the tool surface.
Example tunnel setup:
cloudflared tunnel --url http://localhost:8787 &
export WEBHOOK_PORT=8787
export WEBHOOK_PUBLIC_URL="https://<your-tunnel>.trycloudflare.com"Development
npm run typecheck
npm run lint
npm test
npm run smoke # tools/list smoke test against built binaryProject-scoped Claude agents
This repo ships five agents under .claude/agents/:
cadlens-api-debugger— diagnoses unexplained CADLens 4xx/5xx usingmcp-server-reference.md.mcp-tool-tester— drives JSON-RPC against the built server to validate tool responses.mcp-tool-implementer— scaffolds new tools following the existingsrc/tools/*pattern.cad-drawing-summarizer— uses the MCP tools to summarize a CAD file in natural language.cad-layer-inspector— drills into a single layer of a parsed drawing.
Links
GitHub Topics
Add these topics to this repo for discovery:
mcp mcp-server model-context-protocol ai-agents claude cad dwg dxf cad-api llm-tools engineering-api
License
MIT
Available Tools
7 toolscadlens_delete_jobA
Delete a job and its uploaded file and preview image from CADLens storage. Irreversible.
Inputs: job_id (required).
cadlens_get_jobA
Check the status of a CAD parse job. Returns PENDING, PROCESSING, COMPLETED, or FAILED.
Inputs: job_id (required).
cadlens_get_resultA
Fetch the parsed result of a completed CAD job. Use mode='summary' (default) for an overview, 'entities_by_type' or 'entities_on_layer' for filtered detail, or 'full' for the complete vector JSON (can be very large — only use when explicitly needed).
Inputs: job_id (required), mode, layer_name, entity_type.
cadlens_list_jobsA
List the 100 most recent CAD parse jobs for the configured API key, newest first.
Inputs: no named parameters.
cadlens_parse_fileA
Parse a local CAD file (DWG/DXF/DWF/DWFx/DGN-V7/PDF, max 100 MB). Polls until the job completes or 5 minutes elapse. Returns a summary including the preview image URL. Use cadlens_get_result with the returned job_id to fetch detailed entity data.
Inputs: path (required), webhook_url, notify_email.
cadlens_parse_urlA
Download a CAD file from a URL (max 100 MB) and parse it. Same output as cadlens_parse_file.
Inputs: url (required), webhook_url, notify_email.
cadlens_refresh_image_urlA
Re-fetch the presigned preview-image URL for a completed job. Cheaper than re-fetching the full result. The URL is valid for 3600 seconds.
Inputs: job_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a distinct purpose: two parse variants clearly separated by input source (local file vs URL), plus status checking, result retrieval, image refresh, listing, and deletion. There is no functional overlap between any tools.
All tools follow the consistent pattern 'cadlens_<verb>_<object>' with snake_case (e.g., parse_file, get_result, delete_job). The naming is uniform, predictable, and clearly indicates both the action and the resource.
Seven tools is an ideal size for a CAD parsing service. Each tool covers a necessary part of the workflow without redundancy or bloat, making the toolset well-scoped and easy to navigate.
The toolset covers the full lifecycle of a parse job: creation (from file or URL), status polling, result retrieval with multiple detail modes, preview image refresh, job listing, and deletion. No critical operations are missing.
Maintenance
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes CAD geometry reasoning over STEP files to LLMs, allowing natural language queries about parts, assemblies, dimensions, holes, and mass properties.-
- AlicenseNot gradedqualityBmaintenanceAn MCP server for read-only inspection of AutoCAD DWG files, enabling AI agents to open drawings, query objects by handle or filter, and explore properties and references.22GPL 3.0
- AlicenseAqualityDmaintenanceMCP server for AutoCAD LT automation and headless DXF generation, exposing tools for drawing, entities, layers, blocks, annotations, P&ID, and view operations via natural language.8MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for AI-driven CAD operations, enabling parametric modeling, build, inspection, measurement, rendering, and diff comparison with STEP, DXF, and GLB export.MIT