DC

daobataotie/cad-mcp

API development

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

656 stars 99 forks 品質 86 トレンド 45MIT

CAD MCPサーバー

概要

CAD-MCPは、自然言語の指示を通じて描画操作のためのCADソフトウェアを制御できる革新的なCAD制御サービスです。このプロジェクトは自然言語処理とCAD自動化技術を組み合わせ、ユーザーがCADインターフェースを手動操作せずに簡単なテキストコマンドでCAD図面を作成・修正できるようにします。 - : AutoCAD、GstarCAD(GCAD)、ZWCADなどの主流CADソフトウェアをサポートしています - : 線描画 - 円描画 - 弧描画 - 長方形描画 - ポリライン描画 - テキスト追加 - パターン塗りつぶし - 寸法注釈 - : レイヤーの作成と切り替え - : 現在の図面をDWGファイルとして保存 - : 自然言語の命令をCAD操作パラメータに解析 - : テキストから色情報を抽出し、描画オブジェクトに適用 - : 様々な形状説明語の認識支援 - : 様々な描画および編集アクションを認識 - Windowsオペレーティングシステム - インストールされたCADソフトウェア(AutoCAD、GstarCAD、またはZWCAD) その...

概要(AI 翻訳)

英語 |中文 |ไทย

プロジェクト紹介

CAD-MCPは、自然言語の指示を通じて描画操作のためのCADソフトウェアを制御できる革新的なCAD制御サービスです。このプロジェクトは自然言語処理とCAD自動化技術を組み合わせ、ユーザーがCADインターフェースを手動操作せずに簡単なテキストコマンドでCAD図面を作成・修正できるようにします。

バージョン2.0は最新のMCP仕様(FastMCP、構造化出力、ツール注釈、進捗通知、Streamable HTTP)に基づいて完全にアップグレードされ、クエリ、編集、レイヤー、描画管理、ブロック、コマンドパスルーを含む合計35のツールを追加し、「描画→検査→正しい」フィードバックループを形成しています。

特徴

CAD制御機能

  • 複数のCADソフトウェアサポート:AutoCAD、GstarCAD(GCAD)、ZWCADなどの主流CADソフトウェアをサポートします
  • 基本的な描画機能:
  • 線描き
  • 円描き
  • 弧描き
  • 楕円図
  • 長方形図
  • ポリライン描画
  • テキスト追加
  • パターン充填
  • 次元注釈
  • クエリ機能(AIが実際の描画内容を確認可能):
  • すべての層をリスト

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

README

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

CAD-MCP Server (CAD Model Context Protocol Server)

English | 中文 | ไทย

Project Introduction

CAD-MCP is an innovative CAD control service that allows controlling CAD software for drawing operations through natural language instructions. This project combines natural language processing and CAD automation technology, enabling users to create and modify CAD drawings through simple text commands without manually operating the CAD interface.

Version 2.0 is fully upgraded based on the latest MCP specification (FastMCP, structured output, tool annotations, progress notifications, Streamable HTTP), and adds 35 tools in total covering querying, editing, layers, drawing management, blocks, and command passthrough — forming a complete “draw → inspect → correct” feedback loop.

Features

CAD Control Functions

  • Multiple CAD Software Support: Supports mainstream CAD software including AutoCAD, GstarCAD (GCAD) and ZWCAD
  • Basic Drawing Functions:
    • Line drawing
    • Circle drawing
    • Arc drawing
    • Ellipse drawing
    • Rectangle drawing
    • Polyline drawing
    • Text addition
    • Pattern filling
    • Dimension annotation
  • Query Functions (the AI can see the actual drawing content):
    • List all layers
    • List entities in model space (returns editable entity handles)
    • Query detailed entity properties by handle (coordinates/radius/text content, etc.)
    • Screenshot of the CAD window for preview
  • Editing Functions: erase, move, rotate, scale, copy, mirror, offset, array (linear/polar), undo/redo
  • Layer Management: Create and switch layers, query layer states
  • Drawing Management: New / open / close / save drawings (DWG/DXF)
  • Block Operations: Create, insert, and list blocks
  • Command Passthrough: Execute any CAD command via send_command (an escape hatch for everything else)

MCP Protocol Features

  • Structured Output: All tools return structuredContent with an outputSchema that clients can parse directly
  • Tool Annotations: Query tools are marked readOnlyHint; destructive operations are marked destructiveHint for client confirmation policies
  • Progress Notifications: Long-running operations (CAD startup, saving) send message notifications to the client
  • Dual Transport Modes: stdio (local, single client) and streamable-http (remote / multiple clients sharing one CAD instance)
  • Error Semantics: Input validation errors are returned as tool errors, enabling model self-correction

Natural Language Processing Functions (legacy interface)

  • Command Parsing: Parse natural language instructions into CAD operation parameters
  • Color Recognition: Extract color information from text and apply it to drawing objects
  • Shape Keyword Mapping: Support recognition of various shape description words
  • Action Keyword Mapping: Recognize various drawing and editing actions

Demo

The following is the demo video.

GitHub で README 全文を見る

インストール

npx -y @modelcontextprotocol/inspector python C:\\cad-mcp\\src\\server.py
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "CAD": { "command": "python", "args": [ # Your actual path, such as:"C:\\cad-mcp\\src\\server.py" ] } } }