mcp-vroid
mcp-vroid
MCP‑сервер, который управляет графическим интерфейсом VRoid Studio. Он даёт любому MCP‑клиенту (Claude Code или чему угодно, что говорит по этому протоколу) набор инструментов для запуска приложения, просмотра изображения, поиска виджетов на картинке, кликов, ввода текста, установки параметров и экспорта в .vrm — на Arch + Hyprland (Wayland), при этом VRoid Studio запускается через Steam/Proton.
В VRoid Studio нет скриптового API, поэтому это работает единственным доступным способом: снимок окна, поиск объектов через OCR и сопоставление цветов, затем инъекция настоящих событий мыши и клавиатуры.
grim ──► PNG ──► tesseract / cv2 ──► (x, y) ──► virtual pointer / XTEST
▲ │
└──────────────────── screenshot again ◄───────────────┘Движок под сервером — это набросок tools/vroid-driver из проекта arrakis, подключённый сюда как mcp_vroid.driver. Тот же код, переупакованный так, чтобы его было удобно устанавливать и запускать через MCP‑клиент.
Требования
Компонент | Для чего |
Hyprland (>= 0.55, Lua dispatch API) | поиск окон, фокус, рабочие места |
VRoid Studio через Steam/Proton (appid | управляемое приложение |
| скриншоты |
| OCR |
| сборка помощника для указателя |
Xwayland ( | клавиатура и колесо мыши через X11 XTEST |
Python 3.11+, | сам сервер |
Python‑зависимости (устанавливает uv sync): mcp, pillow, numpy,
opencv-python-headless, pytesseract, python-xlib.
Related MCP server: Persona MCP Server
Установка
git clone https://github.com/nhodges/mcp-vroid
cd mcp-vroid
uv sync # virtualenv + dependencies
bash native/build.sh # builds native/vpointer <-- REQUIRED, not optionalnative/build.sh компилирует C‑клиент примерно на 150 строк для протокола
zwlr_virtual_pointer_unstable_v1 (XML протокола подключён в native/protocols/).
Без него каждый инструмент указателя завершится ошибкой
native/vpointer missing. vroid_status сообщает, есть ли он.
Почему C‑помощник: ydotool не установлен на эталонной машине, а
/dev/uinput имеет права 0600 root:root, поэтому evdev‑инъекция потребовала бы
sudo или правила udev. Протокол виртуального указателя Wayland не требует ни
того, ни другого, двигает реальный курсор композитора и работает поверх любого окна.
Регистрация у клиента
Claude Code:
claude mcp add vroid -- uv run --directory /path/to/mcp-vroid mcp-vroidОбычный JSON mcpServers:
{
"mcpServers": {
"vroid": {
"command": "uv",
"args": ["run", "--directory", "/path/to/mcp-vroid", "mcp-vroid"]
}
}
}Клиенты часто запускают серверы в очищенном окружении. Этот сервер
при старте возвращает XDG_RUNTIME_DIR, WAYLAND_DISPLAY,
HYPRLAND_INSTANCE_SIGNATURE и DISPLAY из каталога рантайма
(src/mcp_vroid/session_env.py), поэтому hyprctl/grim/XTEST работают в любом
случае; vroid_status показывает, что ему пришлось дозаполнить. Всё, что уже есть
в окружении, выигрывает.
Опциональные переменные окружения:
Переменная | По умолчанию | Смысл |
|
| каталог, куда пишутся скриншоты |
|
| каталог для экспортов/сохранений по умолчанию |
|
| путь к помощнику для указателя |
|
| длинное ребро картинки, отправляемой клиенту ( |
Инструменты
Жизненный цикл
Инструмент | Что делает |
| Запускает VRoid через Steam при необходимости, ставит её на рабочем месте Hyprland 9, запоминает рабочее место пользователя, фокусирует и разворачивает её в полноэкранный режим. |
| Информация о наличии/фокусе/заголовке/геометрии окна, активном рабочем месте, каталогах снимков, а также о доступной |
| Возвращает на то рабочее место, где был пользователь. VRoid остаётся работать на ws 9. |
Наблюдение
Инструмент | Что делает |
| Снимает окно (или весь вывод, для диалога сохранения Wine), сохраняет в каталог снимков и возвращает как изображение MCP, чтобы модель клиента могла рассмотреть. Сообщает нативный размер картинки и применённый фактор масштабирования для передачи. |
| Выполняет свежий снимок + tesseract; возвращает координаты и рамки слов в пикселях изображения. Укажите |
| Находит сплошные кнопки-«пилюли» VRoid |
| Возвращает |
Действия (низкоуровневый ввод)
Инструмент | Что делает |
| Плавно ведёт указатель за несколько шагов (чтобы сработали ховы), затем кликает. |
| Неважно → 24 шага перемещения → отпустить. Правый кнопка-перетаскивание вращает камеру, средний — панорамирует. |
| Колесо мыши, как кнопки X11 4/5 (6/7 по горизонтали). Удерживайте указатель над панелью, которую хотите прокрутить. |
| Вводит текст в сфокусированном виджете через XTEST. |
|
|
Действия (сценарии)
Инструмент | Что делает |
| Стартовый экран → Create New → базовый тип → редактор. |
| Face / Hairstyle / Body / Outfit / Accessories / Look. |
| Прокручивает панель Parameters до нужного ряда и вводит точное значение в числовое поле. |
| То же самое для поля цвета |
| Весь процесс экспорта «Export as VRM», включая модальное окно метаданных VRM Settings и диалог сохранения Wine. |
| Ctrl+Shift+S в нужный путь |
Каждый инструмент‑действие сначала фокусирует VRoid и отказывается действовать, если активное окно — не VRoid Studio.
Как им пользоваться
В основе: снимок → смотрим → находим → действуем → снова снимок.
vroid_launch()vroid_screenshot()и смотрим на картинкуvroid_find_text("Export")(илиvroid_find_button()) — для координатvroid_click(x, y)— координаты только из свежей картинкиvroid_screenshot(), чтобы проверить, что реально произошло
Эмпирические правила, которые были выработаны сложным путём в оригинале:
Читайте весь кадр, а не обрезок. Модел окно подтверждения «Close Hairstyle Editor» стояло в центре экрана при шести неудачных кликах, потому что проверка искала только верхние 60 px.
Не судите об изменениях по 3D‑вьюпорту. VRoid делает дизеринг буквально каждого кадра, поэтому сравнение полных кадров даёт дельту — а она равна ~0.98 даже когда ничего не происходило. Смотрите на полосу интерфейса.
Числовые поля лучше, чем перетаскивание слайдера.
vroid_set_sliderвводит точное значение; для перетаскивания — только контролы без числового поля.Первичные кнопки ищут по цвету, а не по тексту. Серый цвет лепестки вместо синего — это признак приложения, что обязательная строка как бы пуста.
Книга OCR всего кадра 2560×1440 занимает ~10 с. Передавайте регион.
Пространства координат
Одндутся два пространства:
пространство | размер на эталонной машине | кто использует |
Layout Hyprland (логический) | 2048 × 1152 |
|
Пиксели изображения: снимок экрана | 2560 × 1440 | tesseract, cv2 и всё, что вы видите |
Пиксели X11 (Xwayland) | 2560 × 1440 | XTEST |
Инструменты по умолчанию принимают и возвращают пиксели изображения (space="image") и преобразуют их между системами, так что можно передавать результат vroid_find_text сразу в vroid_click. Если MCP_VROID_MAX_IMAGE_PX уменьшил картинку, которую вы видите, умножьте координаты, которые вы прочитали на ней, на значение, обратное множителю downscale — или просто используйте vroid_find_text, который всегда возвращает натуральные пиксели.
Карта интерфейса (VRoid Studio 2.14.0, English)
Координаты — это пиксели изображения на снимке 2560×1440 полноэкранного окна. Относитесь к ним как к подсказкам: инструменты определяют объекты через OCR чтобы полноценно.
Стартовый экран — карточка Create New + в точке ≈ (118, 218), подпись в (118, 328); New / Open сверху справа в (2439, 99) / (2495, 100); ниже сетка Sample Models. Create New открывает модальное окно «Select a base to start with» с подписями Fem (1199, 862) и Masc (1359, 862) — нажмите на миниатюру примерно в 100 px над подписью.
Редактор — строка вкладок на y ≈ 23: Face 97 · Hairstyle 198 · Body 302 · Outfit 392 · Accessories 509 · Look 622. Бургер-меню ☰ в (29, 23) → Save (Ctrl+S), Save As… (Ctrl+Shift+S), импорт/массовый экспорт, отмена/повтор, возврат к выбору модели — Escape не закрывает это меню, кликните в другом месте. Панель инструментов сверху справа: камера (2415, 23), поделиться/экспорт (2464, 23), кебаб-меню ⋮ (2512, 23). Левая вертикальная полоса иконок (x ≈ 24, первая иконка y ≈ 77, затем каждые ~48 px) — подкатегория текущей вкладки. Левая панель — сетка пресетов с Presets / Custom на y ≈ 120. Правая панель — Customize, затем Parameters.
Элементы правой панели
элемент | как управлять |
ползунок | числовое поле на x ≈ 2505 ( |
цвет | поле |
чекбокс / радио | клик по квадратику/кружку |
аккордеон | клик по заголовку (например, |
выпадающий список | только в нативных диалогах Wine; кликните, затем стрелками |
Параметры Body начинаются с Model's Height : 161.2 cm, далее Fem Height, Masc Height, Body Size, Head Size, Head Width, Head Tip (Y), Neck Length/Thickness/Width, Soften Collarbone, … Параметры Face: Eye Size X/Y, Eyes Position (X/Y), Rotate Eye Socket, Inner/Outer Eye Slant, Iris Size X/Y, Gaze (Y), … (~40 строк; инструменты прокрутят за вас).
Редактор волос — вкладка Hairstyle → на левой полосе значок волос → подраздел Custom → + Create New → правая панель Edit Hairstyle. Внутри: Add Freehand Hair Guides / Add Procedural Hair Guides, список Hair Groups, палитра инструментов на (330 / 365 / 398 / 432, 83), отмена/повтор в (76, 23) / (133, 23). При выходе сначала появится запрос: кнопка ✕ в (23, 23) открывает модальное окно Close Hairstyle Editor с Save as new item / Overwrite / Close without saving.
Export as VRM — значок поделиться (2464, 23) → Export as VRM → полноэкранная страница экспорта с синей кнопкой-пилюлей Export в ≈ (2412, 197) → модальное окно VRM Settings (по центру, примерно x 1000–1560, прокручивается): радиокнопки Export Format VRM1.0 / VRM0.0, Avatar Name — обязательное, Version, Creators — обязательное, поля copyright/contact/references, чекбоксы использования. Кнопка-пилюля Export остаётся серой и неактивной, пока не заполнены оба обязательных поля → диалог сохранения Wine (отдельное окно с заголовком Export): поле File name: при открытии получает фокус и выделенный текст, поэтому ввод полного пути Windows заменяет его, а Return активирует кнопку по умолчанию. Префикс Proton отображает Z:\ на /, поэтому /home/nuri/x соответствует Z:\home\nuri\x. Не нажимайте Save, найденную через OCR — подпись Save in: попадает под тот же шаблон.
Что может ломаться
Вся навигация завязана на OCR. Мелкие, разрежённые или светлые надписи на тёмном фоне расщепляются или теряются (
Export→E+xport). У иконок нет текста вообще — их якоря прописаны как доли окна и будут сдвигаться, если pixiv перекомпонует UI.Фиксированные якоря — это доли, калиброванные под 2560×1440 при масштабе 1.25. На другом мониторе их, возможно, придётся замерять заново.
Модальные окна могут открываться за пределами области поиска и молча поглощать клики.
Тайминги. Трёхмерный вьюпорт появляется через ~5 с после выбора основы; экспорт длится 5–30 с (тяжёлые модели — дольше).
Диалог Wine — отдельное окно со своим классом и геометрией — там используйте
vroid_shunchot(whole_screen=true).Язык. Эти шаблоны ожидают английский интерфейс. Если VRoid поднялся на японском, переключите его в кебаб-меню
⋮→ Settings → Language.Экранная заставка, уходящая в idle, может захватить сессию в середине работы. Защита отказывается печатать в ней и закрывает только это одно окно перед действием.
Примечание о безопасности
Этот сервер передаёт реальные события мыши и клавиатуры в ваш живой рабочий стол и делает снимки экрана. В этом его суть, и в этом же его вис.
Снимки экрана могут захватить всё, что выведено на экран:
whole_screen=trueснимает всё, и они сохраняются на диск без шифрования.Клавиши нажатия уходят приложения, у которого фокус. Драйвер отказывается работать, если VRoid Studio не имеет фокуса, но скомпрометированный или невнимательный промпт может нажать в любую точку внутри VRoid Studio.
vroid_launch(restart=true)завершает VRoid Studio и теряет все несохранённые изменения.Здесь нет изоляции и нет шага подтверждения.
Запускайте его вручную, на наблюдаемых вами сессии, и не оставляйте агента управлять им без присмотра. vroid_release() вернёт рабочий стол по завершении.
Разработка
uv run python scripts/smoke_test.py # start the server, list tools, call vroid_status
uv run python scripts/smoke_test.py --screenshot # + one passive capture if VRoid is open
uv run vroid-driver shot # the original driver CLI, still herevroid-driver (mcp_vroid.driver.cli) — интерфейс оболочки спайка: launch, shot, find, click, tab, slider, export, cam, apply-params, … — удобно для отладки без MCP-клиента в цепочке.
Авторы и лицензия
Драйвер (src/mcp_vroid/driver/, native/) начался как спайк tools/vroid-driver в моём проекте arrakis и включен сюда вместе с обёрткой MCP-сервера.
MIT — см. LICENSE.
Available Tools
18 toolsvroid_clickA
Click a point in the VRoid window with the real compositor cursor.
Refuses unless VRoid Studio is the focused window; it focuses the window itself first (workspace 9, fullscreen) and raises rather than clicking into somebody else's app.
The pointer glides to the target in a few steps so hover states fire, then clicks and settles ~0.35 s. Coordinates must come from a CURRENT capture - take a fresh vroid_screenshot or vroid_find_text right before clicking, because panels reflow and modals move.
Inputs: x (required), y (required), space, button, +1 more. Returns: object
vroid_current_screenA
Identify which VRoid screen is on top: start, editor, export_vrm, hair_editor, or unknown.
Cheap-ish (OCRs only the top strip, ~2 s) and worth calling whenever a flow tool fails - most failures are "you are not on the screen this tool expects". 'unknown' usually means a modal is up; screenshot the whole window and look.
Inputs: no named parameters. Returns: object
vroid_dragA
Press, glide and release - slider handles, the 3D camera, hair guides.
For Parameters sliders prefer vroid_set_slider, which types an exact value into the row's numeric box; dragging is only for controls that have no numeric box. The glide is 24 interpolated steps, which is what the app needs to register a drag rather than a click.
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +2 more. Returns: object
vroid_export_vrmA
Walk the entire Export-as-VRM flow and write a .vrm file.
Editor toolbar share icon -> 'Export as VRM' -> the blue Export pill -> the VRM Settings modal (fills Avatar Name and Creators, picks the export format, scrolls to the bottom and clicks Export) -> Wine's save dialog (types a Z:\ path and presses Return) -> waits for the file size to stop growing.
Must be started from the EDITOR screen with a model loaded. Takes 30 s to a few minutes depending on the model. Returns the written path and its size; raises with the path of a diagnostic screenshot if any step fails - read that screenshot before retrying, since a half-finished flow usually leaves a modal open that the next attempt will trip over.
Inputs: path (required), creator (required), avatar_name (required), timeout, +1 more. Returns: object
vroid_find_buttonA
Find VRoid's primary action buttons by their colour, not their text.
VRoid's confirm buttons ('Export', 'OK', 'Create') are solid #0096FA pills whose white labels tesseract regularly loses, so this matches the button chrome. Blobs come back biggest-first, in image px, ready for vroid_click.
A grey pill (color='disabled') where you expected a blue one means the
action is disabled - on the VRM Settings modal that means Avatar Name or
Creators is still empty.
Inputs: color, label, limit, region. Returns: object
vroid_find_textA
OCR the current VRoid window and return where query appears.
Takes its own fresh screenshot, so coordinates are current. Results are image px, ordered by OCR confidence, ready to pass straight to vroid_click (which defaults to space='image').
Known OCR weaknesses in this UI: small, letter-spaced or light-on-dark labels get split or dropped ('Export' -> 'E' + 'xport'), and white text on VRoid's blue primary buttons often disappears entirely - use vroid_find_button for those. Icons (toolbar, left rail) have no text at all; the README's UI map has their fractional positions.
If nothing is found, that is information: the screen may not be the one you think it is, or a modal is covering it. Take a screenshot and look.
Inputs: query (required), exact, limit, region. Returns: object
vroid_keyA
Press a key combination in the focused VRoid widget.
Useful ones: Return confirms a value box or a Wine dialog's default button; ctrl+s saves the project; ctrl+shift+s is Save As; ctrl+z/ctrl+y undo/redo in the editor.
Note Escape does NOT close VRoid's hamburger menu - click elsewhere to dismiss it.
Inputs: combo (required), times. Returns: object
vroid_launchA
Start VRoid Studio (Steam appid 1486350, Proton) and take control of it.
Idempotent: if the window already exists it is reused, not relaunched. Then the window is parked on Hyprland workspace 9, the workspace the user was on is remembered (vroid_release puts them back), and the window is focused and fullscreened so its geometry - and therefore every coordinate you will read off a screenshot - is stable.
Cold start over Proton takes 30-90 s; the call blocks until the window is up. It does NOT wait for the start screen to finish drawing, so take a vroid_screenshot and look before clicking anything.
Inputs: restart, timeout. Returns: object
vroid_new_characterA
From the start screen: Create New -> pick a base -> land in the editor.
Locates the 'Create New' tile by text (so it survives the Recently Edited grid growing), clicks the card above its caption, picks the base thumbnail, then waits up to a minute for the editor - the 3D viewport takes several seconds to appear after a base is chosen.
Inputs: base. Returns: object
vroid_open_tabA
Switch the editor to a top-level tab, located by OCR of the tab strip.
Only works on the editor screen (not the start screen, the export screen or the hair editor). Waits ~2 s for the panels to redraw and returns the path of a verification screenshot - take a vroid_screenshot if you want to see the result.
Inputs: name (required). Returns: object
vroid_releaseA
Hand the desktop back: switch to the workspace the user was on before.
Leaves VRoid running on workspace 9. Call this when you are done with a session, or before handing control back to the human.
Inputs: no named parameters. Returns: object
vroid_save_projectA
Save the .vroid project - plain Save, or Save As to an explicit path.
With name: presses Ctrl+Shift+S and drives Wine's save dialog the same
way the VRM export does, then waits for the file. Without name: opens
the hamburger menu and clicks Save, which overwrites the project's
existing file and opens the Wine dialog only if the project has never
been saved (in that case call this again WITH a name).
Worth doing before any risky experiment: nothing else in this server persists your work, and vroid_launch(restart=true) discards it.
Inputs: name, timeout. Returns: object
vroid_screenshotA
Screenshot VRoid and return the image, plus the path it was saved to.
LOOK at the returned image before you decide anything - this is the only way to see the app. Every capture is also written to the captures dir so it can be re-read later.
Coordinate space: the reported image_size is the native capture size
(2560x1440 on the reference machine) and that is the space every other
tool means by space="image". The transported image may be downscaled
(downscale in the text block says by how much); if you read a coordinate
off the picture by eye, divide it by that factor before clicking. Better:
get coordinates from vroid_find_text / vroid_find_button, which always
report native image px.
Gotchas carried over from the driver: capture the WHOLE window, not a crop, when checking "did that work" - modals appear in the middle of the screen and a top-strip-only check will miss them. And do not judge change by the 3D viewport, which dithers every frame; watch a UI strip instead.
Inputs: tag, region, whole_screen, full_resolution.
vroid_scrollA
Wheel-scroll a panel or zoom the 3D viewport.
Sent as X11 button 4/5 (6/7 horizontally): VRoid is an XWayland client and ignores Wayland virtual-pointer axis events, so this is the only wheel that works on it.
Long Parameters lists need this - a label that vroid_find_text cannot see is usually just below the fold. vroid_set_slider scrolls to its own row automatically, so you rarely need to do it by hand.
Inputs: x, y, dx, dy, +1 more. Returns: object
vroid_set_colorA
Set a colour swatch by typing a hex code into its #RRGGBB box.
Scrolls the right-hand panel to the labelled row, clicks the hex field just below the label, replaces its contents and presses Return. Same caveat as sliders: the row must belong to the currently open tab and sub-category (left icon rail).
Inputs: hex (required), label (required). Returns: object
vroid_set_sliderA
Set a Parameters slider exactly, by typing into its numeric box.
Scrolls the right-hand panel from the top until the labelled row is visible (so it works for parameters below the fold), clicks the numeric box at the end of that row, clears it, types the value and presses Return.
This is far more reliable than dragging the handle - use vroid_drag only for controls with no numeric box. Open the right tab first (vroid_open_tab): each tab has its own parameter list.
Inputs: label (required), value (required). Returns: object
vroid_statusA
Report whether VRoid Studio is running, focused, and where it sits.
Cheap and side-effect free (no OCR, no input) - use it before anything
else, and after anything that might have lost focus. focused false means
every acting tool will refuse until vroid_launch (or any acting tool's own
focus step) takes the window back.
Also reports whether the external helpers this server needs are present: the vpointer binary (built by native/build.sh), grim, tesseract, hyprctl.
Inputs: no named parameters. Returns: object
vroid_typeA
Type into whatever widget currently has keyboard focus.
Click the field first (vroid_click) - this tool has no idea where the caret is. Keystrokes go through X11 XTEST because the Wayland virtual keyboard is mis-read by this Proton client (a whole string arrives as a single character).
Always screenshot afterwards to confirm the text landed in the field you meant: VRoid's forms have several boxes with near-identical captions, and typing into the wrong one leaves the primary button greyed out with no other symptom.
Inputs: text (required), clear_first. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool addresses a distinct capability: launching, screen identification, OCR, clicking, typing, saving, exporting, etc. Even the 'seeing' tools (screenshot, find_text, find_button) have clearly separated purposes: one captures, one finds text, one finds buttons. The interaction primitives (click, drag, scroll, type, key) are mutually exclusive and well-defined. No two tools could be confused for the same action.
All tools share the 'vroid_' prefix and mostly follow a verb_noun pattern (open_tab, export_vrm, set_slider), but a few are single verbs or nouns (status, release, screenshot, click, type). The naming is predictable and readable, with only minor deviations like 'status' and 'release' being not strictly verb_noun. Overall consistent enough for an agent to infer actions.
18 tools is on the higher side but justified for a GUI automation server that needs primitives for every interaction type plus higher-level workflows like export and save. The count feels well-scoped for the domain—each tool earns its place since there's no redundant functionality. Slightly heavy but still reasonable.
The surface covers the full lifecycle: launch, status, screen detection, navigation (open_tab, scroll), interaction (click, drag, type, key, sliders, colors), inspection (screenshot, OCR), persistence (save_project), export (export_vrm), and creation (new_character). No obvious gaps—even edge cases like disabled buttons and modal detection are addressed. The server appears fully equipped for its stated purpose of automating VRoid Studio.
Related MCP Connectors
Build textured 3D models from studio uploads or written descriptions over an OAuth MCP connection.
1Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
Build editable 3D scenes, direct characters and cameras, and export AI video references with MCP.
- VULKDeprecatedio.github.devjoaocastro
Generate, edit, and deploy immersive 3D/WebGL web projects from any MCP assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to show, animate, and control a VRM character on the desktop, including posing and motion installation via MCP tools.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control a desktop virtual character (VRM) by playing animations, showing/hiding the character, and checking runtime status through the MCP protocol.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables controlling VRoid Studio through desktop GUI automation, letting an MCP client launch the app, capture its window, locate controls via OCR, edit character parameters, and run save/export flows on macOS and Linux/Hyprland.MIT
- AlicenseNot gradedqualityCmaintenanceA local MCP server that drives one disposable copy of VRoid Studio through the application's own managed API, exposing 86 tools for character parameters, textures, bounded makeup editing, hair authoring, Dress-up outfit assembly, and VRM export without mouse automation, OCR, or screen scraping. It also verifies installations into an isolated lab directory and guards the copy against writes outside that lab.11MIT