frame-testbench-mcp exposes the toolkit through the official Python MCP SDK’s
FastMCP server. It uses stdin/stdout only. It opens no listening port and requires
no separate authentication service. The launching process and, for remote use,
your existing SSH configuration determine access.
testbench/install.sh install builds the native parts on the Frame and makes
testbench/.venv where it runs, on the Frame or on a PC that drives the Frame
over SSH. The venv uses that machine’s python3 and holds the MCP SDK and its
dependencies, as wheels at the versions and sha256s pinned in requirements-mcp.txt (the
ordinary CLI has no Python dependencies). It gets no package install: a .pth
file puts the checkout on its path, so the CLI’s checkout-relative build/ and
resources/ paths keep working. The installer then runs the MCP tests in it.
testbench/install.sh install
testbench/.venv/bin/python testbench/frame-testbench-mcp --help
Remote-only MCP clients do not need a local native build. The target checkout
and its native build must support the same CLI commands, including controller.
Local SteamVR, under the same user/session as the toolkit:
/path/to/frametop/testbench/.venv/bin/python /path/to/frametop/testbench/frame-testbench-mcp \
--artifacts-dir /absolute/path/to/captures
Remote Steam Frame through an already configured SSH alias:
/path/to/frametop/testbench/.venv/bin/python /path/to/frametop/testbench/frame-testbench-mcp \
--host frame \
--artifacts-dir /absolute/path/to/captures
The remote root may be relative to the SSH user’s home or absolute. SSH uses the CLI’s batch mode, host-key checking, and connection timeout. Configure keys and known hosts yourself before starting the server. The server does not install, uninstall, restart SteamVR, or change SSH configuration.
Generic MCP client configuration:
{
"mcpServers": {
"frame-testbench": {
"command": "/absolute/path/to/frametop/testbench/.venv/bin/python",
"args": [
"/absolute/path/to/frametop/testbench/frame-testbench-mcp",
"--host", "frame",
"--artifacts-dir", "/absolute/path/to/captures"
]
}
}
}
--remote-root defaults to dev/frametop/testbench, where scripts/sync.sh puts
it. Omit --host for local use. For clients that provide a tool
call timeout, allow at least 450 seconds for capture and leave additional time
when queueing calls. The server’s CLI subprocess timeout is 420 seconds, covering
the CLI’s separately bounded status, capture, and fetch operations.
You can also launch .venv/bin/python -m frame_testbench.mcp_server. The venv’s
.pth file makes the module available regardless of working directory.
| Tool | Arguments | CLI operation |
|---|---|---|
status |
None | status |
worn |
state: on, off, or physical |
worn STATE |
hmd_button |
button (an /input/... path), state: on, off, or physical |
hmd-button PATH STATE |
hmd_pose_set |
Required position; optional rotation, space |
pose set |
hmd_pose_move |
Optional translation, rotation, space |
pose move |
hmd_pose_reset |
None | pose reset |
controller_pose_set |
Required side, position; optional rotation, space |
controller SIDE set |
controller_pose_move |
Required side; optional translation, rotation, space |
controller SIDE move |
controller_pose_reset |
Required side |
controller SIDE reset, clears inputs and disconnects |
controller_button |
side, button, pressed; optional touched |
controller SIDE button NAME on/off [--touch on/off] |
controller_trigger |
side, value; optional clicked, touched |
controller SIDE trigger VALUE [--click on/off] [--touch on/off] |
controller_grip |
side, value; optional clicked, touched |
controller SIDE grip VALUE [--click on/off] [--touch on/off] |
controller_thumbstick |
side, x, y; optional clicked, touched |
controller SIDE thumbstick X Y [--click on/off] [--touch on/off] |
controller_touch |
side, control, touched |
controller SIDE touch NAME on/off |
controller_inputs_reset |
side |
controller SIDE inputs-reset, retains pose |
controller_input_status |
None | inputs, independent SteamVR action readback |
compositor |
mode: awake or auto |
compositor MODE |
capture |
None | capture with a server-owned output/fetch directory |
gaze_look |
yaw, pitch (-90..90); optional right_eye [yaw, pitch] |
gaze look YAW PITCH [--right YAW PITCH] |
gaze_eyes |
left, right: open, closed, or lost |
gaze eyes LEFT RIGHT |
gaze_release |
None | gaze release |
hand_set |
side, position; optional rotation, shape (open, point, pinch, fist) |
hand SIDE set |
hand_release |
side: left, right, or all |
hand SIDE release |
tracker_record |
name, seconds (up to 300); optional only (gaze, hands) |
record NAME --seconds N |
tracker_replay |
name; optional loop, only |
replay NAME |
keyboard_keys |
keys: 1-100 combinations such as ctrl+l |
keyboard keys COMBO... |
keyboard_type |
text: 1-2000 printable characters |
keyboard type -- TEXT |
mouse_move |
dx, dy (counts, ±20000); optional drag button |
mouse move DX DY [--drag BUTTON] |
mouse_click |
Optional button (left, right, middle, back, forward), count (1-3) |
mouse click BUTTON --count N |
mouse_scroll |
notches (±50, not 0); optional horizontal |
mouse scroll N [--horizontal] |
pointer_state |
None | pointer state |
pointer_control |
action: show, hide, or recenter |
pointer ACTION |
overlay_list |
None | pointer overlays |
overlay_measure |
overlay: an overlay key |
pointer measure -- KEY |
display_power |
state: status, on, or off |
power STATE |
release_all |
None | release, which also stops the fake trackers |
side is left or right. Position and translation are three-element XYZ
arrays in meters. Rotation is [yaw, pitch, roll] in degrees. All numbers must
be finite JSON numbers, not strings or booleans. Default translation and rotation
are [0, 0, 0]. Space is standing by default, or raw. Moves require a prior
pose set for that device and follow the existing CLI’s coordinate conventions.
Hand positions are in the head frame, not standing space; see
fake eye and hand trackers.
Set the selected controller’s pose before sending buttons, analog values or touches. The native proxy enforces this prerequisite. Each input tool sends a single batch; invalid fields reject the whole batch before it changes controller state. CLI and MCP also reject wrong-sided names and invalid values before any backend I/O, including SSH or a CLI subprocess.
Button names match the Frame profile:
system, bumper, trigger, grip, thumbstick.menu, a, b, x, y.view, dpad_up, dpad_right, dpad_down, dpad_left.controller_touch accepts those names plus thumbrest on either side. Thumbrest
has touch only, no click. Wrong-sided names are errors, not aliases. Skeletons and
haptics are not supported.
Trigger and grip value must be in [0, 1]. Thumbstick x and y must each be
in [-1, 1]. MCP pressed, clicked and touched are JSON booleans. Numeric
strings, boolean analog values, nonfinite numbers and out-of-range values are errors.
Values, clicks and touches are independent. No value threshold infers a click or
touch. Omitted optional fields remain unchanged; optional JSON null also leaves
them unchanged. Setting trigger value to zero does not release a previously set
trigger click. Use controller_inputs_reset to neutralize all buttons, analog axes
and touches on that side without disconnecting or moving its controller.
controller_pose_reset clears that side’s inputs and disconnects it. release_all
clears both controllers’ inputs and disconnects them as well as releasing HMD overrides.
status includes the proxy’s per-side inputs_ready and commanded inputs map.
That acknowledgement is not downstream verification. Use controller_input_status
for the observer’s independent SteamVR action readback. The CLI equivalent is
frame-testbench inputs; it uses the checkout’s resources/input-actions.json
manifest and does not query the control socket. The native observer and action
resources must be installed in the target checkout. Readback establishes the
observer’s action values, not another application’s bindings or behavior.
Example calls to controller_trigger, controller_button, then controller_touch:
{"side": "right", "value": 0.75, "clicked": true, "touched": true}
{"side": "right", "button": "a", "pressed": true}
{"side": "left", "control": "thumbrest", "touched": false}
Examples of tool arguments:
{"position": [0, 1.6, 0], "rotation": [30, 0, 0], "space": "standing"}
{"side": "left", "translation": [0.1, 0, 0], "rotation": [0, 15, 0]}
Input overrides persist until explicitly reset or released. Disconnecting the
MCP client does not release them. release_all restores physical HMD tracking,
proximity and buttons, clears controller inputs and disconnects the synthetic controllers.
It leaves the compositor policy unchanged. Physical controller tracking is never overridden. Use
compositor with {"mode":"auto"} separately to restore automatic standby.
Do not apply virtual tracking overrides while someone relies on normal tracking.
Successful tools return the actual CLI JSON as both a text content block and
structuredContent. Normal CLI failures and input validation errors return MCP
isError: true; they are not successful responses containing an error string.
capture also returns two image/png image blocks, in preview then stereo order,
with base64-encoded PNG bytes for vision-capable clients. The text and structured
metadata retain the CLI’s runtime snapshots, image paths, and capture metadata.
The server does not substitute a path for image content or generate placeholder
screenshots.
Each capture gets a new private directory under --artifacts-dir, defaulting to
artifacts relative to the server working directory. Its images/ child is left
absent for the CLI to create. Local captures use --output; SSH captures use
--fetch and read the downloaded local_files, never remote filesystem paths.
The server checks expected filenames, rejects symlinks and outside paths, checks
PNG signatures, and limits each returned image to 32 MiB. The native observer is
responsible for validating complete capture files. Oversized images fail instead
of being silently resized or omitted.
Captures, including partial failed captures, remain on disk for diagnosis. There is no automatic retention policy. Delete old captures when no call is using them, and treat screenshots as potentially sensitive.
FRAME_TESTBENCH_SOCKET and
FRAME_TESTBENCH_OBSERVER remain trusted launch-time configuration, not tool
parameters. Give the server only the environment and SSH access it needs.testbench/install.sh install # runs them once the venv is ready
cd testbench && .venv/bin/python -m unittest discover -s tests -p 'test_mcp*.py' -v
just test-testbench runs the whole suite in the image, which has no MCP SDK, so
the MCP-dependent tests skip there.
Do not count a skipped MCP suite as MCP verification. No hardware or SSH connection
is needed. Tests use an explicitly identified CPU-only observer fixture and a
real SDK client/server subprocess to exercise initialize, list-tools, tool calls,
backend errors, validation, PNG byte content, metadata, and stderr separation.
Unit tests also check CLI argv, fixed remote configuration, concurrency, and
cancellation. Existing native tests build and exercise their own CPU-only OpenVR
boundary. Live headset verification is a separate step.
License: MIT, matching testbench/LICENSE.