BC

barbosaihan/civil3d-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

45 stars 20 forks 품질 82 트렌드 22MIT

AI-Powered 시민 3D 모델링

개요

MCP 서버는 Autodesk Civil 3D 내부에 AI 조수를 직접 가능하게 합니다. 고정 도구 대신 AI는 전체 API 액세스를 실행하는 코드를 생성합니다. 1. → 문서화 된 C # 코드 템플릿 2. → 매개 변수에 채우기, 패턴을 결합 3. → Civil3d execute 또는 Civil3d query 4. → 전체 API 액세스 5. → AI로 Civil 3D 내부 Skills are documented C# code Templates in skills/: civil3d execute 또는 civil3d query를 통해 실행된 코드는 다음과 같습니다. 모든 Civil 3D 네임스페이스는 자동 전달됩니다. Roslyn sandbox 블록: - 프로세스 실행 (Process.Start) - 파일 삭제 (File.Delete) - 네트워크 요청 (HttpClient, Sockets) - 레지스트리 액세스 - 동적 조립로드 모든 Civil 3D API 작업이 허용됩니다.

개요(AI 번역)

MCP 서버는 AI Assistants를 ** 쓰기 및 실행 C# 코드** 바로 내부 Autodesk Civil 3D. 고정 도구 대신 AI는 전체 API 액세스를 실행하는 코드를 생성합니다.

건축

3 메타 도구

도구 용도 안전
civil3d_execute C# 코드를 쓰기 액세스(전송) ⚠️ 그림 수정
civil3d_query C# 코드 실행 **(노트 없음) ✅ 부작용 없음
civil3d_skills 검색/search/read code 스킬 템플릿 ✅ 메타데이터만

어떻게 작동합니까?

  1. **AI는 기술을 읽습니다 ** → 문서화된 C# 부호 템플렛을 얻으십시오
  2. AI는 코드를 적용하고 매개변수에 있는 채우고, 본을 결합합니다
  3. AI는 코드 → civil3d_execute 또는 [[T4]를 통해 전송합니다.
  4. **Roslyn 컴파일 + 실행 ** → 전체 API 액세스를 가진 내부 문 3D 5.Results 반환으로 JSON → 다시 AI

예제 상호 작용

스킬 라이브러리

Skills are documented C# code Templates in skills/:

Script 글로벌

civil3d_execute 또는 civil3d_query]를 통해 실행된 코드는 다음과 같습니다.

글로벌 유형 기술
[T8] Document Active AutoCAD 문서

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Civil 3D MCP Server — Code Execution Architecture

An MCP server that enables AI assistants to write and execute C# code directly inside Autodesk Civil 3D. Instead of fixed tools, the AI generates code that runs with full API access.

Architecture

┌─────────────────┐     stdio      ┌──────────────────┐     TCP/JSON-RPC    ┌──────────────────┐
│   AI Assistant   │ ◄────────────► │  MCP Server (TS) │ ◄──────────────────► │  Civil 3D Plugin │
│ (Claude, Cline)  │               │   3 meta-tools    │     port 8080       │  Roslyn Engine   │
└─────────────────┘               └──────────────────┘                      └──────────────────┘
                                         │                                         │
                                    Skills Library                           C# Code Execution
                                   (.skill.md files)                      (full Civil 3D API)

3 Meta-Tools

Tool Purpose Safety
civil3d_execute Execute C# code with write access (transaction committed) ⚠️ Modifies drawing
civil3d_query Execute C# code read-only (no commit) ✅ No side effects
civil3d_skills Browse/search/read code skill templates ✅ Metadata only

How It Works

  1. AI reads a skill → Gets a documented C# code template
  2. AI adapts the code → Fills in parameters, combines patterns
  3. AI sends code → Via civil3d_execute or civil3d_query
  4. Roslyn compiles + runs → Inside Civil 3D with full API access
  5. Results return as JSON → Back to the AI

Example Interaction

User: "What surfaces are in my drawing?"

AI: Uses civil3d_query with:
  var surfaces = new List();
  foreach (ObjectId id in CivilDoc.GetSurfaceIds()) {
    var s = Transaction.GetObject(id, OpenMode.ForRead) as TinSurface;
    surfaces.Add(new { s.Name, s.Layer });
  }
  return surfaces;

Result: [{ "Name": "EG", "Layer": "C-TOPO-EG" }, ...]

Skills Library

Skills are documented C# code templates in skills/:

skills/
├── surfaces/           # Surface operations
├── alignments/         # Alignment + station/offset
├── points/             # COGO points
├── geometry/           # Lines, polylines, text
├── drawing/            # Drawing info
└── workflows/          # Complex multi-object operations

Script Globals

Code executed via civil3d_execute or civil3d_query has access to:

Global Type Description
Document Document Active AutoCAD document
CivilDoc CivilDocument Active Civil 3D document
Database Database Document database
Transaction Transaction Active transaction
Editor Editor Document editor

All Civil 3D namespaces are auto-imported.

Setup

1. Build MCP Server

npm install && npm run build

2. Build Plugin

GitHub에서 전체 README 보기

설치

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

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "civil3d": { "command": "node", "args": ["/path/to/civil3d-mcp/build/index.js"] } } }