Security#
The viewer’s MCP server lets a program drive the viewer, so it accepts requests only from agents you have given its token, on your own computer.
What the server accepts#
It is off until you start it, with
lar bv --mcp,--mcp-port, or Serve agents in Settings.It listens at
127.0.0.1only, the local address. Other computers on the network cannot reach it; an agent on another computer reaches it through an SSH forward, as Connecting an agent shows.Every request needs the token, sent as the header
Authorization: Bearer <token>. A request without it, or with an old one, is refused with 401. The token is random, 32 bytes long, and is kept in the filemcp-tokenin your settings folder, readable by you only (on Windows, through the file’s access list), so other users of the same computer cannot drive your viewer.The request must be addressed to the viewer itself: its
Hostmust be127.0.0.1orlocalhostat the viewer’s own port, and a request that names a web page as itsOriginis refused, both with 403. A web page open in your browser therefore cannot drive the viewer, even one that makes a name of its own point at127.0.0.1.
Keeping the token safe#
The token stays the same from one start to the next, so an agent added once keeps working.
New token, under Agents (MCP) in Settings, replaces it at once; agents with the old one are refused until given the new one. Use it if the token may have been seen by someone else.
Never commit the token. A configuration file shared with a project names it through an environment variable, such as
LARMOR_MCP_TOKEN, as Connecting an agent shows.
What a connected agent can do#
An agent with the token acts as you in the viewer. It can read any file you can read, by loading it, and write screenshots, videos and sessions wherever you can write, with paths on the computer the viewer runs on. It can change the defaults and the convention of the running session, but not the saved settings, and it cannot open other windows or run other programs. Connect only agents you trust with your files, and watch what they do in the viewer.