DocsMCP
Let outside agents use your Doriterm devices over MCP
An assistant that speaks the Model Context Protocol (MCP) can use your machine's terminals through Doriterm: list them, read a screen, send a message to an agent, run a command.
What you can do with this
Through MCP, a cloud agent such as a Grok bot or Dots works in the environment on the computers you own, the way you would at their keyboards. The shells, tools and checkouts already there become its workspace.
Say you are on the train and ask Dots, from your phone, whether the branch you left on your desktop passes its tests. Dots opens a terminal on the desktop in that project and runs the test command the project already uses.
When the run finishes, Dots reads the screen and answers with the two tests that failed and the line each one stopped on. Nothing was installed or uploaded first.
The tests ran on the computer where your code, your toolchain and your environment variables already were.
Or a Grok bot in your team's chat is asked why last night's import on the home server stopped. It finds the terminal that ran the import, reads its last screen, and posts the error the job ended on.
Until now someone had to open a laptop and SSH in for that.
Set it up
The assistant pairs like a phone and gets what a paired device gets on that machine. Setup has three steps.
1. Turn MCP on
MCP is off on a machine until you turn it on. A machine that already served paired devices before this change keeps its MCP on. On the machine:
doriface-host mcp on
Or in the app: Settings > MCP clients, pick the machine, and switch it on.
2. Pair the assistant's computer
On your machine, open a pairing offer:
doriface-host pair
Or press Connect an MCP client in Settings > MCP clients. You get a QR code, a link and a short code. The offer lasts 10 minutes and works once.
On the computer the assistant runs on, install the Doriterm host and pair with the link:
doriface-host connect '<link>'
The link carries the machine's key, so nothing else is asked. With the typed code, add the fingerprint the offer printed, at least its first four groups:
doriface-host connect <code> --fingerprint '3FA9 4C0E 7B21 D855'
Or copy one prompt into an agent that can run commands, with your <link> and
<hostId> filled in:
Connect yourself to my Doriterm. Run these in a terminal on this computer:
1. If doriface-host is not installed: curl -fsSL https://get.doriterm.com | sh -s -- --no-service --no-pair
2. Pair this computer once: doriface-host connect '<link>' < /dev/null
3. Add an MCP server named doriterm to your own MCP settings that runs: doriface-host connect --mcp <hostId>
Then tell me it is connected.
3. Paste the MCP config
Add this to the assistant's MCP settings. The host id is the one doriface-host pair printed on
your machine.
OmO
Add to ~/.omo/agent/mcp.json:
{
"mcpServers": {
"doriterm": {
"command": "doriface-host",
"args": [
"connect",
"--mcp",
"<hostId>"
]
}
}
}
Claude Code
claude mcp add doriterm -- doriface-host connect --mcp <hostId>
Codex
Add to ~/.codex/config.toml:
[mcp_servers.doriterm]
command = "doriface-host"
args = ["connect", "--mcp", "<hostId>"]
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"doriterm": {
"command": "doriface-host",
"args": [
"connect",
"--mcp",
"<hostId>"
]
}
}
}
Other
Add to its MCP settings:
{
"mcpServers": {
"doriterm": {
"command": "doriface-host",
"args": [
"connect",
"--mcp",
"<hostId>"
]
}
}
}
That is all. The assistant starts the command when it needs it, and the command carries MCP to your machine through the relay, end-to-end encrypted like the rest of Doriterm.
What the assistant can do
One tool, doriterm, gives a paired assistant what a paired phone or browser has on that
machine: it can read and type into your terminals, run commands and write files. Each call runs one Doriterm
command, written as the hc CLI takes it.
{ "args": ["ls"] }
{ "args": ["read", "t3"] }
{ "args": ["send", "t3", "hello"] }
{ "args": ["run", "--bg", "claude"] }
{ "args": ["exec", "uname -a"] }
{ "args": ["file", "read", "/etc/hostname"] }
{ "args": ["machine", "ls"] }
{ "args": ["host", "status"] }
args is the command with its arguments, each a string. The answer carries the command's
exitCode, stdout and stderr.
stdin, when given, is the text the command reads, which is where a file write takes its body.
timeoutSeconds limits how long the call may run: 60 by default, 600 at most.
Files and the host go through the same tool. file takes read, write,
edit, list, stat, glob, grep and
bytes, and ["host","status"] answers the host's version, id and relay with the
phones, browsers and assistants paired with it.
Add --on and a machine's name to run a command or reach a file on another machine.
It can also do what a paired phone does with the mesh: read its members, devices and waiting joins
(["mesh","status"]), open an invite for another machine
(["mesh","invite","machine"]), answer a machine's or a browser's join
(["mesh","join","<join>","approve","<code>"]), rename or revoke a member, unpair a
device (["devices","revoke","<id>"]), and leave.
Approving a join needs its six digits, and you compare them yourself, as on the phone. An AI agent's own join is answered only on your own device.
A revoke or a leave shows a preview first and is written only when the assistant asks again with
--yes and --expect, which lists the host ids the preview named.
Some commands need a person, and the tool refuses them: attach, stopping or restarting the
core, removing a machine and updating hc. It also refuses any path into the host's own state,
where its keys, its paired devices and the mesh are kept.
One tool and its manual
The Doriterm skill is the manual for every command, and the host carries it. When the assistant connects,
Doriterm tells it to read doriterm://skill/SKILL.md before its first call, either as an MCP
resource or by calling the tool with ["skill"].
A client that lists MCP prompts gets the same skill as a prompt named doriterm. A command the
tool does not know is refused with a pointer back to the skill.
Since v0.1.30 doriface-host connect --mcp no longer takes --tools, and the earlier
doriterm_tools and doriterm_call are gone. Remove --tools and its
value from a config written before that.
Following terminals as they change
To wait for a terminal to finish or change, the assistant runs ["wait","<terminal>"];
that works in every client. The tool refuses ["events"], because hc events
streams without an end.
Clients that speak MCP subscriptions can also read each terminal as a resource
(doriterm://terminal/t7) and be told when it changes, and clients that support MCP events can
subscribe to terminal.changed and receive what changed. Subscriptions end when the session
does.
Pair only an assistant you would hand a shell to. What a terminal prints reaches the assistant as text, and a program can print instructions.
See who is connected, and disconnect
doriface-host mcp status
Settings > MCP clients shows the same list. Disconnect revokes the device: its sessions
close at once and it has to pair again. From a terminal that is
doriface-host devices revoke <id>.
Turn it off
doriface-host mcp off
Every MCP session on that machine closes. Paired devices stay paired, so mcp on lets them back
in.
If something is off
| You see | What it means |
|---|---|
| "MCP is off on this host" | Run doriface-host mcp on on the machine |
| "studio needs an update to accept MCP clients" | The host on that machine is older than this feature |
| The assistant lists no tools | Its computer is not paired, or the device was disconnected. Pair again |