MicroStation V8i MCP Server
Provides tools for interacting with Bentley MicroStation V8i CAD software, enabling AI agents to create and edit 2D/3D geometry, measure and dimension elements, manage views, files, models, and references, configure drawing settings, batch-process elements, and execute CAD commands.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MicroStation V8i MCP ServerDraw a rectangle from (0,0) to (100,80) on the active level"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MicroStation V8i MCP Server
Cầu nối chuyên nghiệp theo chuẩn Model Context Protocol (MCP) giữa các Trợ lý AI (Google Antigravity, Anthropic Claude, Cursor, v.v.) và phần mềm thiết kế kỹ thuật Bentley MicroStation V8i (SELECTseries).
🌟 Tính Năng Chính
Hệ thống 133 công cụ CAD chuyên sâu: Bao phủ từ dựng hình 2D/3D, đo đạc kích thước, chỉnh sửa đối tượng, điều khiển khung nhìn, quản lý file/model/reference đến xử lý dữ liệu hàng loạt.
Kiến trúc Dual-Mode hiệu năng cao (High Performance & Zero Overhead):
Mode 1 (Native IPC - Khuyến nghị): Giao tiếp trực tiếp với MicroStation V8i qua ứng dụng MDL C++ Native (
MsNativePipe.ma) bằng Windows Named Pipe (\\.\pipe\MsNativeMCP). Tốc độ thực thi tiệm cận native (~0.05-0.2ms/call, nhanh hơn COM 10-50x), hỗ trợ Batch Draw (tạo hàng trăm đối tượng trong 1 transaction/round-trip), và Undo Groups.Mode 2 (COM Fallback): Tự động chuyển đổi hoặc dùng song song khi chưa load MDL application, bảo đảm tính sẵn sàng 100%.
Công cụ bảo toàn ngữ cảnh & phòng ngừa sai lệch: Cung cấp
get_model_snapshotvànative_get_active_settingsgiúp AI nắm bắt trạng thái thực tế của bản vẽ (bounding box, element count, active symbology) trước khi vẽ.Hỗ trợ đầy đủ bộ ba MCP:
Tools (133 công cụ): Toàn bộ primitive CAD 2D/3D, batch native, transaction control, và COM tools.
Resources: Cung cấp thông tin trực tiếp về bản vẽ (
ms://drawing/info), danh sách level (ms://drawing/levels), trạng thái active (ms://drawing/settings).Prompts: Khuôn mẫu hướng dẫn quy trình vẽ kỹ thuật (
cad_drawing_workflow) và kiểm toán bản vẽ (element_inspection).
Đa kênh truyền tải (Transports): Hỗ trợ cả
stdio(cho Antigravity / Claude Desktop) vàsse(Server-Sent Events qua HTTP).An toàn luồng: Quản lý an toàn luồng Overlapped I/O cho Named Pipe và COM Apartment riêng biệt trên từng worker thread.
Logging an toàn: Toàn bộ log được định tuyến ra
sys.stderr, bảo toàn 100% định dạng JSON-RPC trên kênhstdout.
Related MCP server: multiCAD-mcp
⚡ So Sánh Hiệu Năng (COM vs MDL Named Pipe)
Thao tác | COM Out-of-Process | MDL Native Named Pipe | Cải thiện |
Vẽ 1 đoạn thẳng ( | ~3.0 ms | ~0.15 ms | 20x nhanh hơn |
Tạo 100 đoạn thẳng tuần tự | ~300 ms | ~15 ms | 20x nhanh hơn |
Batch tạo 100 đối tượng hỗn hợp | ~300 ms (100 calls) | ~3 ms (1 round-trip) | 100x nhanh hơn |
Quét 500 phần tử ( | ~2,000 ms | ~50 ms | 40x nhanh hơn |
Lấy snapshot model ( | ~10,000 ms | ~200 ms | 50x nhanh hơn |
Giao dịch Undo/Redo | Không hỗ trợ native |
| Native Undo Group |
📁 Cấu Trúc Thư Mục
microstation-mcp/
├── README.md # Tài liệu tổng quan & hướng dẫn cài đặt
├── AGENTS.md # Cẩm nang chỉ dẫn cho AI Agent
├── pyproject.toml # Metadata dự án chuẩn PEP 621
├── requirements.txt # Thư viện phụ thuộc
│
├── mdl/ # Ứng dụng C++ Native chạy trong ustation.exe
│ ├── build_instructions.md # Hướng dẫn biên dịch chi tiết (VS2005/2008 + V8i SDK)
│ └── MsNativePipe/
│ ├── MsNativePipe.mke # Makefile bmake cho MDL
│ ├── MsNativePipe.cpp # Entry point MdlMain, Timer loop
│ ├── pipe_server.h/.cpp # Named Pipe Server (Overlapped I/O, Thread-safe)
│ ├── handlers.h/.cpp # Dispatcher & 25 CAD Command Handlers
│ ├── geometry.h/.cpp # MDL Geometry APIs (Native primitives & transforms)
│ ├── batch.h/.cpp # Batch creation & Undo grouping
│ └── json_lite.h # Header-only JSON parser/builder (zero dependency)
│
├── docs/ # Tài liệu thiết kế nội bộ
│ ├── architecture_native.md # Kiến trúc chi tiết luồng IPC và Wire Protocol
│ ├── architecture.md # Kiến trúc phân tầng
│ └── features.md # Danh mục công cụ
│
└── src/
├── main.py # Entry point chính (hỗ trợ --transport stdio|sse)
├── core/ # Cầu nối IPC (Named Pipe client & COM bridge)
│ ├── pipe_client.py # Win32 Named Pipe client với auto-reconnect
│ ├── _pipe_singleton.py # Singleton quản lý kết nối pipe
│ └── ms_bridge.py # COM bridge fallback
├── server/ # McpServer factory, logging, context
├── tools/ # 18 module công cụ CAD (133 tools)
│ ├── native_batch.py # Batch, transaction & snapshot tools (Native)
│ ├── drawing_native.py # Primitive drawing tools (Native)
│ └── ... # Các công cụ COM hiện hữu
├── resources/ # Dynamic Resources
├── prompts/ # CAD Prompt templates
└── transports/ # Kênh truyền tải stdio và sse🚀 Cài Đặt & Cấu Hình
1. Cài đặt thư viện phụ thuộc
pip install -r requirements.txt2. Cấu hình MCP Client (Antigravity / Claude Desktop)
{
"mcpServers": {
"microstation-v8i": {
"command": "python",
"args": [
"-X",
"utf8",
"{path}\\microstation-mcp\\src\\main.py"
]
}
}
}3. Chạy độc lập qua giao thức SSE (Tùy chọn)
python src/main.py --transport sse --host 127.0.0.1 --port 8000🛠️ Danh Mục 8 Công Cụ Hợp Nhất (Consolidated Tools v3.0)
Lấy cảm hứng từ kiến trúc của AutoCAD MCP v3.1, hệ thống hợp nhất 147 công cụ vi mô thành 8 công cụ cốt lõi, giúp giảm 95% token schema, tăng tốc độ phản hồi và ngăn ngừa hoàn toàn tình trạng AI bị loop:
Tool | Chức năng chính | Operations tiêu biểu |
| Quản lý tệp DGN & Khung vẽ |
|
| CRUD đối tượng 2D / 3D |
|
| Quản lý lớp bản vẽ (Level) |
|
| Quản lý Cell & Khối thư viện |
|
| Ghi chú & Đo kích thước |
|
| Khung nhìn & Chụp ảnh đối soát |
|
| Chuyên gia Địa chính VN (TT 26/2024 & TT 23/2025) |
|
| Quản trị & Thực thi mã nội bộ |
|
This server cannot be deployed
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Headless CAD engine & MCP server for 2D/3D drafting, solids, DXF/SVG export, and automation.
MCP CAD services; bundles with SmartScale (measure to CAD).
Read and edit the Revit 2024–2027 model on your PC. Needs the free Revit MCP add-in.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to control CAD applications like AutoCAD, ZWCAD, GstarCAD, and BricsCAD through natural language or direct tool calls. Supports drawing, layer and entity management, block operations, data export, and file handling via 7 unified MCP tools covering 56 CAD commands.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants like Claude Desktop or Cursor to control supported CAD applications through MCP tools for drawing, layer, block, entity, data export, and file/session operations using natural language or direct tool calls.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants like Claude for Desktop or Cursor to control AutoCAD, ZWCAD, GstarCAD, and BricsCAD through MCP, supporting drawing, layer, entity, block, file operations, data export, and complex multi-step CAD tasks via natural-language or direct tool calls.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants like Claude for Desktop or Cursor to control supported CAD applications through MCP, supporting drawing, layer and entity management, block operations, data export, and file/session control via natural language or unified tool calls.-