TA

thepiruthvirajan/autocad-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

70 stars 35 forks 质量 67 趋势 0Apache-2.0

thepiruthvirajan/autocad-mcp-server 是从 https://github.com/thepiruthvirajan/autocad-mcp-server. 导入的 MCP 服务器候选

概览

thepiruthvirajan/autocad-mcp-server 是从 https://github.com/thepiruthvirajan/autocad-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

🏗️ ** 一个强大的基于 Python 的模型上下文协议(MCP)服务器,通过 COM 自动化对 AutoCAD 进行程序控制。**

工作演示的YouTube视频 https://www.youtube.com/watch?v=KQpxiXvF4cc

通过Claude及其他MCP客户端,通过智能建筑结构创建、自动图层管理和全面的实体操作,彻底改变您的AutoCAD工作流程。

🚀 快速启动(30秒)

📋 目录

  • 先决条件
  • 安装
  • 使用 Claude Desktop 配置
  • 运行服务器
  • 基本用法示例
  • 高级功能
  • API 参考
  • 故障排除
  • 发展

先修条件

系统需求

  • 操作系统:Windows(COM自动化需求)
  • AutoCAD:任何支持 COM 的 2000+ 版本
  • Python:3.8及以上
  • Claude Desktop:最新版本(用于 MCP 集成)

必需软件

  1. AutoCAD安装
  • 任何 AutoCAD 版本(AutoCAD、AutoCAD LT、Civil 3D 等)
  • 必须持有有效执照并能够运行
  • 必须启用COM自动化(大多数安装默认)
  1. Python 环境
  • 已安装 Python 3.8+

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

AutoCAD MCP Server - Complete Documentation

🏗️ A powerful Python-based Model Context Protocol (MCP) server that provides programmatic control over AutoCAD through COM automation.

Youtube video of the working demo https://www.youtube.com/watch?v=KQpxiXvF4cc

Transform your AutoCAD workflow with intelligent building structure creation, automatic layer management, and comprehensive entity manipulation - all through Claude and other MCP clients.

🚀 Quick Start (30 seconds)

# 1. Clone and setup
git clone https://github.com/yourusername/autocad-mcp-server
cd autocad-mcp-server
pip install -e .

# 2. Start AutoCAD (must be running)
# Open AutoCAD application

# 3. Test the server
python test_script.py

📋 Table of Contents

Prerequisites

System Requirements

  • Operating System: Windows (COM automation requirement)
  • AutoCAD: Any version 2000+ with COM support
  • Python: 3.8 or higher
  • Claude Desktop: Latest version (for MCP integration)

Required Software

  1. AutoCAD Installation

    • Any AutoCAD version (AutoCAD, AutoCAD LT, Civil 3D, etc.)
    • Must have valid license and be able to run
    • COM automation must be enabled (default in most installations)
  2. Python Environment

    • Python 3.8+ installed
    • Administrative privileges may be required for COM registration

Installation

# Clone the repository
git clone https://github.com/yourusername/autocad-mcp-server
cd autocad-mcp-server

# Create virtual environment
python -m venv venv

# Activate environment (Windows)
venv\Scripts\activate

# Install the package
pip install -e .

Method 2: Using uv (Faster)

# Install uv if not already installed
pip install uv

# Clone and setup
git clone https://github.com/yourusername/autocad-mcp-server
cd autocad-mcp-server

# Create environment and install
uv venv
uv pip install -e .

Dependencies Installed

  • mcp>=1.0.0 - Model Context Protocol framework
  • pywin32>=306 - Windows COM automation

Configuration with Claude Desktop

Step 1: Locate Claude Desktop Config

Find your Claude Desktop configuration file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Step 2: Add MCP Server Configuration

Edit the config file to include your AutoCAD MCP server:

{
  "mcpServers": {
    "autocad-mcp": {
      "command": "python",
      "args": [
        "C:\\path\\to\\your\\autocad-mcp-server\\test_script.py"
      ],
      "env": {
在 GitHub 查看完整 README

安装

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

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "autocad-mcp": { "command": "python", "args": [ "C:\\path\\to\\your\\autocad-mcp-server\\test_script.py" ], "env": { "PYTHONPATH": "C:\\path\\to\\your\\autocad-mcp-server" } } } }