io.github.cadlens-co/cadlens-mcp

Official registry AI and agents

Model Context Protocol server that wraps the CADLens REST API.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package @cadlens/mcp-server
Claude Code
claude mcp add cadlens-mcp -e 'CADLENS_API_KEY=<your cadlens_api_key>' -e 'CADLENS_API_BASE=https://api.cadlens.co/v1' -e 'WEBHOOK_PUBLIC_URL=<WEBHOOK_PUBLIC_URL>' -- npx -y @cadlens/mcp-server@0.6.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "cadlens-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@cadlens/mcp-server@0.6.0"
            ],
            "env": {
                "CADLENS_API_KEY": "<your cadlens_api_key>",
                "CADLENS_API_BASE": "https://api.cadlens.co/v1",
                "WEBHOOK_PUBLIC_URL": "<WEBHOOK_PUBLIC_URL>"
            }
        }
    }
}

Environment variables

  • CADLENS_API_KEY required secret Your CADLens API key
  • CADLENS_API_BASE API base URL (default: https://api.cadlens.co/v1)
  • WEBHOOK_PUBLIC_URL Public URL for webhook auto-registration (optional)

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. cadlens-mcp
  2. Install
  3. Development (build from source)
  4. Tools
  5. Configuration
  6. Webhook short-circuit (optional)
  7. Development
  8. Project-scoped Claude agents
  9. Links
  10. GitHub Topics
  11. License

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-server

Development (build from source)

npm install
npm run build

export CADLENS_API_KEY="cadl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
node dist/index.js

Tools

ToolWhat it does
cadlens_parse_fileUpload a local CAD file, poll until parsed (5 min budget), return summary.
cadlens_parse_urlDownload a CAD file from a URL, then parse it like parse_file.
cadlens_get_jobCheap status check (PENDING / PROCESSING / COMPLETED / FAILED).
cadlens_get_resultFetch parsed content. mode: summary (default), entities_by_type, entities_on_layer, full.
cadlens_refresh_image_urlRe-fetch the 1h presigned PNG URL without re-downloading the full result.
cadlens_list_jobsThe 100 most recent jobs for the configured API key.
cadlens_delete_jobDelete a job and its S3 artifacts. Irreversible.

Configuration

Env varRequiredDefaultNotes
CADLENS_API_KEYyes—Created in the CADLens dashboard.
CADLENS_API_BASEnohttps://api.cadlens.co/v1Set to http://localhost:3001/v1 for local dev.
WEBHOOK_PORTno0 (random)Port for the in-process webhook receiver.
WEBHOOK_PUBLIC_URLnounsetSet 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.
REQUEST_TIMEOUT_MSno30000Per-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 binary

Project-scoped Claude agents

This repo ships five agents under .claude/agents/:

  • cadlens-api-debugger — diagnoses unexplained CADLens 4xx/5xx using mcp-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 existing src/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.

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

Frequently asked questions

What is io.github.cadlens-co/cadlens-mcp?

Model Context Protocol server that wraps the CADLens REST API.

How do I install io.github.cadlens-co/cadlens-mcp?

It runs on your machine. In Claude Code: claude mcp add cadlens-mcp -e 'CADLENS_API_KEY=<your cadlens_api_key>' -e 'CADLENS_API_BASE=https://api.cadlens.co/v1' -e 'WEBHOOK_PUBLIC_URL=<WEBHOOK_PUBLIC_URL>' -- npx -y @cadlens/mcp-server@0.6.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.cadlens-co/cadlens-mcp need an API key?

Yes. It expects CADLENS_API_KEY, which you set in its configuration.

Is io.github.cadlens-co/cadlens-mcp open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains io.github.cadlens-co/cadlens-mcp?

It is published by cadlens-co. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.