# Vn Autocad Claude

> Vietnamese-friendly AutoCAD MCP server for Claude (full AutoCAD + LT 2024+, headless on macOS/Linux)

- **Type:** MCP server
- **Install:** `agentstack add mcp-andyluu98-vn-autocad-claude`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [andyluu98](https://agentstack.voostack.com/s/andyluu98)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [andyluu98](https://github.com/andyluu98)
- **Source:** https://github.com/andyluu98/vn-autocad-claude

## Install

```sh
agentstack add mcp-andyluu98-vn-autocad-claude
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# vn-autocad-claude

> 🇻🇳 **Tiếng Việt:** đọc hướng dẫn đầy đủ tại **[README.vi.md](README.vi.md)**.

An MCP server that lets **Claude** (Claude Code & Claude Desktop) control **AutoCAD** —
draw, edit, query, layers, blocks, annotations, screenshots, plot to PDF — using plain
language. Works with **full AutoCAD** and **AutoCAD LT 2024+** on Windows, and runs
**headless (no AutoCAD needed)** on macOS/Linux via the `ezdxf` backend.

This is a Vietnamese-friendly fork of [puran-water/autocad-mcp](https://github.com/puran-water/autocad-mcp)
(MIT). See [NOTICE](NOTICE) for the list of changes. Maintained by [@andyluu98](https://github.com/andyluu98).

---

## What works where

| Backend | Platform | Needs AutoCAD running? | What it does |
|---------|----------|------------------------|--------------|
| **File IPC** | Windows | Yes — full AutoCAD or LT **2024+** | Drives the live drawing you have open |
| **ezdxf** (headless) | Windows / macOS / Linux | No | Reads & writes `.dxf` files directly |

`AUTOCAD_MCP_BACKEND=auto` (default) picks File IPC when an AutoCAD window is found,
otherwise falls back to headless ezdxf.

> On **macOS** AutoCAD does not expose AutoLISP/COM, so only the **ezdxf** backend is
> available there. That is enough to generate and edit `.dxf` drawings from Claude.

---

## Requirements

- **Python 3.10+**
- **[uv](https://docs.astral.sh/uv/)** package manager
- **Git**
- For the live (File IPC) backend: **Windows 10/11** + **AutoCAD 2024+ or AutoCAD LT 2024+**

---

## Quick install

### Windows (PowerShell)

```powershell
git clone https://github.com/andyluu98/vn-autocad-claude.git
cd vn-autocad-claude
./scripts/install.ps1
```

### macOS / Linux

```bash
git clone https://github.com/andyluu98/vn-autocad-claude.git
cd vn-autocad-claude
./scripts/install.sh
```

The install script runs `uv sync` and prints the exact MCP config line for your machine.

---

## Connect to Claude

### Claude Code (CLI)

```bash
claude mcp add autocad-mcp --scope user \
  --env AUTOCAD_MCP_BACKEND=auto \
  -- "/vn-autocad-claude/.venv//python" -m autocad_mcp
```

- Windows venv python: `...\.venv\Scripts\python.exe`
- macOS/Linux venv python: `.../.venv/bin/python`

The install script prints the full line ready to copy.

### Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "autocad-mcp": {
      "command": "/vn-autocad-claude/.venv/Scripts/python.exe",
      "args": ["-m", "autocad_mcp"],
      "env": { "AUTOCAD_MCP_BACKEND": "auto" }
    }
  }
}
```

Use `.venv/bin/python` (no `.exe`) on macOS/Linux.

---

## Load the dispatcher in AutoCAD (Windows live backend only)

1. Open AutoCAD and open/create a drawing.
2. In the command line, type **`APPLOAD`** → load `lisp-code/mcp_dispatch.lsp`.
   You should see `=== MCP Dispatch v3.1 loaded ===`.
3. To auto-load every time: `OPTIONS` → **Files** → **Trusted Locations** → add the
   `lisp-code` folder, then add `mcp_dispatch.lsp` to the **Startup Suite** (APPLOAD → Contents).

Quick manual load alternative (paste in the AutoCAD command line):

```
(load "/vn-autocad-claude/lisp-code/mcp_dispatch.lsp")
```

---

## Verify

Restart Claude, then ask it to call `system(operation="status")`. You should get
`{"ok": true, "backend": "file_ipc" | "ezdxf"}`.

Then try: *"draw a circle radius 50 at the origin"*.

---

## Troubleshooting

Full playbook (also readable by Claude Code itself): **[CLAUDE.md](CLAUDE.md)**.

| Symptom | Fix |
|---------|-----|
| `AutoCAD detected but mcp_dispatch.lsp not loaded` | Re-`APPLOAD` the LISP; keep AutoCAD open; restart Claude. |
| `AutoCAD window not found` | Open AutoCAD with a drawing, or it will use the ezdxf backend. |
| Commands time out on full AutoCAD | The COM trigger should handle this; ensure the drawing window is active and the LISP is loaded. |
| `uv sync` fails on macOS about pywin32 | `pywin32` is Windows-only and already guarded; update `uv` and retry. |

---

## Privacy

This repository contains **no drawings, no credentials, and no personal data**.
The IPC working directory is `C:\temp` (Windows) — your `.dwg`/`.dxf` files stay on your
machine and are git-ignored. Never commit `claude_desktop_config.json` or `.env`.

## License

MIT — see [LICENSE](LICENSE). Original copyright retained per the upstream project.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [andyluu98](https://github.com/andyluu98)
- **Source:** [andyluu98/vn-autocad-claude](https://github.com/andyluu98/vn-autocad-claude)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-andyluu98-vn-autocad-claude
- Seller: https://agentstack.voostack.com/s/andyluu98
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
