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-mcpparse 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.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that the operation is irreversible and that it also removes the uploaded file and preview image, which is beyond the obvious 'delete job' action. It does not mention error behavior or idempotency, but the destructive scope is clear.
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 a single concise sentence that front-loads the primary action and immediately states consequences. Every word adds value, with no waste.
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 simple delete tool with one parameter, the description covers key behavioral aspects like irreversibility and associated file deletion. However, it lacks usage context, parameter semantics, and any mention of return behavior or error conditions, leaving gaps given absent annotations.
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 schema contains only job_id with no parameter description, and schema coverage is 0%. The tool description does not mention job_id or explain its meaning, format, or how to obtain it, failing to compensate for the schema gap.
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 deletes a job and its associated files/preview image, with a specific verb and resource. It distinguishes itself from sibling tools like get_job and parse_file by indicating a destructive removal action.
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 guidance is provided on when to use this tool versus alternatives, such as whether deletion should occur after job completion or if there are prerequisites. The description offers no exclusions or cautions beyond irreversibility.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cadlens_get_jobA
Check the status of a CAD parse job. Returns PENDING, PROCESSING, COMPLETED, or FAILED.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job_id returned by parse_file/parse_url. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose the return values (PENDING, PROCESSING, COMPLETED, FAILED). The read-only nature is clear from 'Check', and the tool's behavior is predictable. It lacks explicit mention of error handling or polling implications, but this is minor for such a simple status endpoint.
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, directly states the action and the possible return values, with no wasted words. It is well-structured and front-loaded.
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 one well-documented parameter and no output schema, the description is complete. It explains what statuses can be returned, which is sufficient for an agent to understand the tool's role in the parse workflow.
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 schema provides complete coverage for job_id, including its source ('returned by parse_file/parse_url'), so the description adds no additional parameter semantics. The baseline of 3 applies since the schema already documents the parameter fully.
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 identifies the tool's purpose with a specific verb ('Check') and resource ('status of a CAD parse job'), and it distinguishes from siblings by listing the exact status values returned. It is immediately obvious this tool is for status polling, not for results or management.
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 implies the usage context by referencing job_id from parse_file/parse_url, reinforcing the expected flow. However, it does not explicitly name alternatives like list_jobs or get_result, so the agent must infer when to choose 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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | summary | |
| job_id | Yes | ||
| layer_name | No | Required when mode='entities_on_layer'. | |
| entity_type | No | Required when mode='entities_by_type'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses that the 'full' mode can be very large, which is useful. However, it doesn't mention failure modes (e.g., job not found, still running) or explicitly state read-only behavior beyond the verb 'Fetch'. The prerequisite 'completed' is mentioned but not elaborated.
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?
Two sentences, front-loaded with purpose, followed by concise mode usage. Every phrase earns its place with no filler or 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 result-retrieval tool with 4 params and no output schema, the description covers the essential modes, the size warning, and the completion prerequisite. It could be slightly more explicit about the nature of the 'summary' output, but the sibling tools provide enough context for an agent to select and invoke this tool successfully.
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 50%, with descriptions only for layer_name and entity_type. The description adds value by explaining the meaning of each mode and clarifying that 'full' returns large JSON. It doesn't describe job_id, but that's self-explanatory. The conditional requirements are already in the schema, so the description adequately compensates for the coverage gap.
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 starts with 'Fetch the parsed result of a completed CAD job', using a specific verb and resource. It clearly differentiates from sibling tools like cadlens_get_job (status) and cadlens_parse_file (creation) by focusing on parsed results of completed jobs.
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 gives clear context on when to use this tool (after completion) and provides mode-specific guidance (summary, entities_by_type, entities_on_layer, full). It doesn't explicitly mention alternatives or exclusions, but the sibling context and 'completed' prerequisite make the usage clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cadlens_list_jobsA
List the 100 most recent CAD parse jobs for the configured API key, newest first.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses the 100-job limit, newness ordering, and API key scoping, which is useful behavioral context. However, with no annotations provided, it does not explicitly state read-only nature or what each job entry includes, leaving some transparency gaps.
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?
A single, well-structured sentence that front-loads the action ('List') and packs all key details (scope, order) without any filler. Excellent conciseness.
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 simple list tool with no parameters and no output schema, the description covers the essential scope and ordering constraints. It could mention the structure of returned job items, but given sibling tools and simplicity, it is sufficiently complete.
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 tool has zero parameters and an empty schema, so there is nothing to document. The baseline for 0-param tools is 4, and the description appropriately adds no unnecessary param details.
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 uses a specific verb ('List') and clearly identifies the resource ('CAD parse jobs') with precise scoping ('100 most recent', 'newest first'). It distinguishes from sibling tools like get_job (single job) and delete_job (deletion).
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 implies usage for retrieving recent jobs but does not explicitly state when to use this over alternatives like get_job or how it differs from listing via other means. Sibling names make the distinction inferable, but the description lacks direct guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file on the local filesystem. | |
| webhook_url | No | Optional external webhook URL for state-change notifications. Independent of the auto-registered local receiver. | |
| notify_email | No | Optional email address CADLens notifies with a job link when the parse finishes unattended. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. It discloses that the tool polls until completion or 5 minutes elapse, and that it returns a summary including a preview image URL. This gives a clear operational model, though it doesn't detail failure modes or timeout behavior outcomes.
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?
Three straightforward sentences cover formats, size limit, execution behavior, return value, and next-step tool. Every sentence earns its place with no redundancy or filler.
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 no output schema, the description explains the return summary and preview URL, and points to cadlens_get_result for detailed data. The overall workflow is sufficiently sketched, though it omits explicit mention of job status fields or error handling.
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 schema already covers all three parameters at 100% coverage, so the description adds no new parameter syntax or format details. It does contextualize the returned job_id as the input for cadlens_get_result, but that is not parameter-specific.
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 parses local CAD files, lists supported formats (DWG/DXF/DWF/DWFx/DGN-V7/PDF), and specifies a 100 MB limit. The word 'local' distinguishes it from the sibling cadlens_parse_url, making the resource and 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?
The description implies use for local files vs. URLs (via 'local') and explicitly directs users to call cadlens_get_result with the returned job_id for detailed entity data. It provides a clear next step but does not explicitly contrast with cadlens_parse_url or list disallowed scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cadlens_parse_urlA
Download a CAD file from a URL (max 100 MB) and parse it. Same output as cadlens_parse_file.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS URL pointing to a CAD file. | |
| webhook_url | No | ||
| notify_email | No | Optional email address CADLens notifies with a job link when the parse finishes unattended. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of disclosing behavior, but it only mentions a size limit (max 100 MB) and the action of parsing. It fails to disclose whether parsing is asynchronous (despite webhook_url and notify_email parameters suggesting a job-based flow), what the response format is, what happens after parsing, or any side effects. The reference to 'Same output as cadlens_parse_file' is vague without sibling details.
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 extremely concise, containing two short sentences that front-load the key action and size limit. No unnecessary words or repetition—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?
Given the lack of output schema and annotations, and the presence of webhook/notify parameters that hint at job-based asynchronous behavior, the description is incomplete. It does not explain the return structure or job mechanics, and the webhook_url parameter is left undocumented. The brief reference to a sibling tool does not fill this gap.
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 67% (url and notify_email have descriptions, webhook_url does not). The description adds the 100 MB size constraint for the url parameter, which is not in the schema. However, it does not clarify webhook_url, leaving a parameter unaddressed. Overall, the description adds marginal value but relies mostly on the schema.
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: 'Download a CAD file from a URL (max 100 MB) and parse it.' It uses specific verbs (download, parse) and a resource (CAD file from URL), and distinguishes itself from the sibling tool cadlens_parse_file by explicitly noting 'Same output as cadlens_parse_file' while differing in input source.
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 implies when to use this tool (when you have a URL to a CAD file) and explicitly references an alternative (cadlens_parse_file) by stating the output is the same. However, it does not explicitly state when not to use it or provide a direct comparison beyond the sibling mention.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of disclosing behavior. It discloses that the URL is valid for 3600 seconds (expiration) and that it is cheaper than re-fetching the full result, which are meaningful behavioral traits. It does not mention potential errors or prerequisites beyond 'completed job', but the key behaviors are covered.
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, front-loaded with the primary action, and directly followed by a cost-saving note and validity duration. Every word contributes to understanding the tool, with no redundancy or filler.
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 simple, single-parameter tool with no output schema, the description covers the essential context: what it does, when to use it, cost implications, and URL expiration. It does not explicitly state the return value (the URL), but this is strongly implied. Minor gaps remain regarding error behavior for non-completed jobs, but overall it is sufficiently complete.
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%, so the description must compensate. It does not explicitly explain the job_id parameter, but the name and context ('for a completed job') imply its role. Given the single, self-explanatory parameter, the description adds minimal semantic value beyond what is already evident from the schema.
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: 'Re-fetch the presigned preview-image URL for a completed job.' This specific verb+resource distinguishes it from sibling tools like cadlens_get_result, and the cost comparison 'Cheaper than re-fetching the full result' further differentiates its use case.
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 clear context for when to use this tool: when you need the preview image URL for a completed job and want to avoid the cost of fetching the full result. It implies a usage scenario but does not explicitly state alternatives or exclusions, though the comparison to 'full result' serves as guidance.
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.
7 tool updates
v0.6.0- First observed
cadlens_delete_job - First observed
cadlens_get_job - First observed
cadlens_get_result - First observed
cadlens_list_jobs - First observed
cadlens_parse_file - First observed
cadlens_parse_url - First observed
cadlens_refresh_image_url
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 gradedqualityAmaintenanceAn 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.9GPL 3.0
- AlicenseAqualityCmaintenanceMCP 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
- AlicenseAqualityCmaintenanceAn MCP server that enables natural-language control of AutoCAD via file IPC or headless DXF generation, with tools for drawing, entities, layers, blocks, annotations, P&ID, views, and system operations.8MIT