PW

puran-water/autocad-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

618 stars 119 forks 品質 67 トレンド 25MIT

Puran-water/AutoCAD-MCPは、https://github.com/puran-water/autocad-mcp.からインポートされたMCPサーバー候補です。

概要

Puran-water/AutoCAD-MCPは、https://github.com/puran-water/autocad-mcp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

AutoCAD LT自動化およびヘッドレスDXF生成のためのMCPサーバー。

バックエンドが2つ、APIが1つ:

バックエンド 実行時間 AutoCADが必要ですか? スクリーンショット
ファイルIPC Windows Python はい — AutoCAD LT 2024+(Windows) Win32 PrintWindow
ezdxf 任意のプラットフォーム いいえ(ヘッドレス) matplotlibレンダリング

サーバーは、MCPの標準トランスポート上で8つの統合ツール(drawing、entity、layer、block、annotation、pid、view、[[T7])を公開します。MCPクライアント(Claude Desktop、Claude Codeなど)が接続し、自然言語リクエストを通じてAutoCADを駆動します。

前提条件(ファイルIPCバックエンド)

  • Windows 10/11(File IPCバックエンドはフォーカスフリーウィンドウメッセージングのためにWin32 APIを使用しています)
  • AutoCAD LT 2024以降 — Windows版LT 2024でAutoLISPサポートが追加されました。Mac版AutoCAD LTは存在しますが、サポートしていません。
  • Python 3.10+(Windowsネイティブ — WSL Pythonではありません)
  • UV パッケージマネージャー(インストールガイド)

ezdxfヘッドレスバックエンドは、AutoCADをインストールしずにオフラインDXF生成のためにLinux、macOS、WSLなどどのプラットフォームでも動作します。

クイックスタート

1.クローンとインストール

2.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

AutoCAD MCP Server

MCP server for AutoCAD LT automation and headless DXF generation.

Two backends, one API:

Backend Runtime Requires AutoCAD? Screenshot
File IPC Windows Python Yes — AutoCAD LT 2024+ (Windows) Win32 PrintWindow
ezdxf Any platform No (headless) matplotlib render

The server exposes 8 consolidated tools (drawing, entity, layer, block, annotation, pid, view, system) over the MCP stdio transport. An MCP client (Claude Desktop, Claude Code, etc.) connects and drives AutoCAD through natural-language requests.

Prerequisites (File IPC backend)

  • Windows 10/11 (the File IPC backend uses Win32 APIs for focus-free window messaging)
  • AutoCAD LT 2024 or newer — AutoLISP support was added in LT 2024 for Windows. AutoCAD LT for Mac exists but does not support AutoLISP.
  • Python 3.10+ (Windows native — not WSL Python)
  • uv package manager (install guide)

The ezdxf headless backend works on any platform (Linux, macOS, WSL) for offline DXF generation without AutoCAD installed.

Quick Start

1. Clone and install

git clone https://github.com/puran-water/autocad-mcp.git
cd autocad-mcp
uv sync

2. Load the LISP dispatcher in AutoCAD LT

Open AutoCAD LT and load mcp_dispatch.lsp using APPLOAD:

  1. Type APPLOAD in the AutoCAD command line
  2. Browse to /lisp-code/mcp_dispatch.lsp
  3. Click Load
  4. You should see: === MCP Dispatch v3.1 loaded === and Ready for commands via (c:mcp-dispatch)

Tip: Add the file to your AutoCAD Startup Suite (in the APPLOAD dialog) so it loads automatically with every drawing.

3. Configure your MCP client

Add to your MCP client configuration (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "autocad-mcp": {
      "command": "C:\\path\\to\\autocad-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-m", "autocad_mcp"],
      "env": { "AUTOCAD_MCP_BACKEND": "auto" }
    }
  }
}

Key points:

  • The command must point to the Windows Python inside the project venv (not WSL python).
  • AUTOCAD_MCP_BACKEND can be auto (default — tries File IPC, falls back to ezdxf), file_ipc (requires AutoCAD), or ezdxf (headless only).

Running from WSL

If your MCP client runs in WSL (e.g. Claude Code), launch the server through cmd.exe so it runs as a native Windows process:

{
  "mcpServers": {
    "autocad-mcp": {
      "type": "stdio",
      "command": "cmd.exe",
      "args": ["/d", "/s", "/c", "cd /d C:\\path\\to\\autocad-mcp && .venv\\Scripts\\python.exe -m autocad_mcp"],
      "env": { "AUTOCAD_MCP_BACKEND": "auto" }
    }
  }
}

4. Verify

From your MCP client, call:

system(operation="status")
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "autocad-mcp": { "command": "C:\\path\\to\\autocad-mcp\\.venv\\Scripts\\python.exe", "args": ["-m", "autocad_mcp"], "env": { "AUTOCAD_MCP_BACKEND": "auto" } } } }