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 8000This server cannot be deployed
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Let AI agents query data and act across all your business apps via MCP.
- ZapierOAuthcom.zapier
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
Related MCP Servers
- AlicenseAqualityFmaintenanceAllows AI to interact with Autodesk Revit via the MCP protocol, enabling retrieval of project data and automation of tasks like creating, modifying, and deleting elements.13151 npm466MIT
- AlicenseNot gradedqualityDmaintenanceControls CAD applications (AutoCAD, ZWCAD, etc.) via AI assistants through the Model Context Protocol, enabling drawing, layer management, and automation through natural language or direct tool calls.121Apache 2.0
- AlicenseAqualityFmaintenanceEnables AI to interact with Revit via MCP, allowing data retrieval and element creation, modification, and deletion.13151 npmMIT
- AlicenseAqualityCmaintenanceMCP server for AutoCAD LT automation and headless DXF generation, exposing tools for drawing, entities, layers, blocks, annotations, P&ID, and view operations via natural language.8MIT