blender-cu-vm-mcp

blender-cu-vm-mcp

Enables AI coding agents to perform automated Blender UI testing, user-story validation, and computer-use workflows inside an isolated GPU-partitioned Windows 11 VM without disrupting the host desktop.

Category
访问服务器

README

Blender Computer-Use Isolated Virtual Machine & MCP Server

An isolated, GPU-partitioned local Windows 11 Virtual Machine environment connected via Model Context Protocol (MCP) specifically engineered for AI coding agents to perform automated Blender UI testing, user-story validation, and Computer-Use workflows without disturbing your host desktop.


1. System Architecture

+---------------------------------------------------------------------------------------------+
|                          Coding Agents (Claude Code / OMP / Codex)                          |
+---------------------------------------------------------------------------------------------+
                                              │
                                              │ (MCP JSON-RPC via stdio)
                                              ▼
+─────────────────────────────────────────────────────────────────────────────────────────────+
|                         Host Layer: `blender-cu-vm-mcp` Server                             |
|  - MCP Tool Handler (Computer Use, Analytical Inspection, Blender Telemetry, File Staging)   |
|  - VM Lifecycle Manager (Hyper-V Socket / PowerShell WMI / Sub-2s Snapshot Reset)           |
+─────────────────────────────────────────────────────────────────────────────────────────────+
                                              │
                      ┌───────────────────────┴───────────────────────┐
                      │ Hyper-V Socket (HV-SOCK) / Internal VMSwitch  │
                      ▼                                               ▼
+───────────────────────────────────────────────+   +─────────────────────────────────────────+
|      Windows 11 Guest VM (Hyper-V)            |   |   Secondary (Fast CI): WSL2 Container   |
|  - NVIDIA GPU-PV (RTX 4080 Super vGPU: 8GB)   |   |   - Mesa / Direct3D 12 GPU Accel        |
|  - Virtual Display Driver (1080p Fixed 60Hz)  |   |   - Virtual X11 Display (Xvfb/Weston)   |
|  - Guest Agent Daemon (FastAPI / gRPC)        |   |   - Guest Agent Daemon (Linux)          |
|  - In-Process Blender Telemetry Bridge (bpy)  |   |   - Blender bpy IPC Bridge              |
+───────────────────────────────────────────────+   +─────────────────────────────────────────+

2. Key Features

  • Zero Host Disturbance: Synthetic mouse movements, drags, clicks, and keystrokes are executed exclusively inside the guest OS. Your real cursor and window focus remain completely untouched.
  • Hardware-Accelerated GPU Rendering: NVIDIA GPU-PV gives the guest VM near-native access to the host RTX 4080 Super (DirectX 12, Vulkan, OpenGL, and CUDA/OptiX).
  • Deterministic 1080p Display: Open-source Virtual Display Driver (IddSampleDriver) locks the virtual screen to 1920x1080 @ 60Hz with 100% (96 DPI) scaling—preventing coordinate drift and sleeping monitors.
  • Hybrid Multimodal Feedback: Agents receive:
    1. Visual: Framebuffer screenshots with optional coordinate grid overlays.
    2. Analytical: Windows UI Automation tree, bounding boxes, and window responsiveness.
    3. Deep Telemetry: Blender bpy state, active modifiers, node tree connections, and real-time stdout/stderr logs.
  • Sub-2-Second State Rollback: Fast Hyper-V snapshot restoration resets the VM to a clean golden base after destructive or experimental runs.

3. Directory Layout

blender-cu-vm/
├── host/                     # Host MCP Server & Hyper-V Controller
│   ├── mcp_server.py         # Stdio JSON-RPC MCP server with 14 tools
│   ├── hv_transport.py       # Hyper-V Socket (AF_HYPERV) & HTTP transport
│   ├── vm_controller.py      # PowerShell WMI lifecycle & snapshot manager
│   └── asset_sync.py         # Bi-directional file and addon staging
├── guest/                    # Guest Agent Daemon (runs inside VM)
│   ├── guest_daemon.py       # FastAPI HTTP/HV-SOCK unified server
│   ├── screen_capture.py     # DXGI Desktop Duplication & visual diffs
│   ├── input_controller.py   # Win32 SendInput (clicks, drags, typing)
│   ├── ui_automation.py      # Windows UI Automation tree inspector
│   └── video_recorder.py     # Hardware-accelerated NVENC MP4 recorder
├── blender/                  # Blender Embedded Runtime Bridge
│   ├── cu_telemetry_bridge.py # Non-blocking TCP telemetry server
│   ├── crash_interceptor.py  # C-level stdout/stderr stream tee
│   └── state_inspector.py    # Declarative scene invariant checker
├── scripts/                  # Automated Setup & Provisioning
│   ├── setup_vm_gpupv.ps1    # Automated Hyper-V Gen2 VM creator
│   ├── stage_gpupv_drivers.ps1 # NVIDIA GPU-PV driver packaging & injection
│   ├── setup_virtual_display.ps1 # Virtual display & autologon configuration
│   └── manage_golden_snapshot.ps1 # Instant snapshot creation & rollback
├── tests/                    # Verification & E2E Test Suite
│   ├── test_blender_user_story.py # 12-stage automated test suite
│   └── verify_isolation.py   # Zero host disturbance verification
├── mcp-config.json           # Registration snippet for Claude Code / OMP
└── README.md

4. Setup & Installation Guide

Step 1: Provision the VM on Host (PowerShell as Administrator)

cd C:\tmp\blender-cu-vm\scripts
.\setup_vm_gpupv.ps1 -VMName "Blender-CU-VM" -MemoryBytes 8GB -ProcessorCount 8

Step 2: Stage NVIDIA GPU-PV Drivers

.\stage_gpupv_drivers.ps1 -VMName "Blender-CU-VM" -Mode "Stage"

Step 3: Install Guest OS & Run Environment Setup

Inside the guest VM (via PowerShell as Administrator):

# 1. Install GPU-PV drivers from staged directory
C:\Temp\NvidiaDrivers\install_gpupv_guest.bat

# 2. Configure Virtual Display & Auto-Logon
.\setup_virtual_display.ps1 -TargetWidth 1920 -TargetHeight 1080

# 3. Start Guest Daemon on boot
python C:\blender-cu-vm\guest\guest_daemon.py

Step 4: Create the Golden Base Snapshot

.\manage_golden_snapshot.ps1 -VMName "Blender-CU-VM" -SnapshotName "golden_base" -Action "Create"

5. Connecting AI Coding Agents via MCP

Add the following to your ~/.claude.json or ~/.omp/agent/config.yml:

{
  "mcpServers": {
    "blender-cu-vm": {
      "command": "python",
      "args": [
        "C:\\tmp\\blender-cu-vm\\host\\mcp_server.py"
      ],
      "env": {
        "BLENDER_VM_NAME": "Blender-CU-VM",
        "BLENDER_GUEST_URL": "http://192.168.122.100:8000"
      }
    }
  }
}

6. Running Verification Tests

To verify all subsystems and run the simulated Blender user story:

python blender-cu-vm/tests/test_blender_user_story.py
python blender-cu-vm/tests/verify_isolation.py

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选