Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The stdio server

termherd-mcp is a separate, small binary that exposes TermHerd’s configuration — so you can ask “what can I configure here?”, or “switch me to a light theme”, from any Claude session, whether or not TermHerd is running.

It speaks JSON-RPC over stdio and is stateless: it reads and writes ~/.termherd/settings.json, nothing else. A session TermHerd launched does not need it — the live bridge carries the same two tools over the same catalogue. Register this one for a session started elsewhere.

Registering it

cargo build -p termherd-mcp        # lands in target/

Add it to your mcpServers config, pointing command at the built binary:

{
  "mcpServers": {
    "termherd": { "command": "/path/to/termherd-mcp" }
  }
}

Tools

ToolArgsDoes
list_options—lists the configurable options with their current values
set_optionid, valuesets one writable option; the change lands in settings.json and applies at once

Both speak the option id — a stable, dotted name:

idKindWritableValues
themeenumyesdark, light, and the 20 named themes listed under theme
shell.programstringnounset means the platform default login shell
shell.argsarrayno
terminal.colors.schemeenumyesthe 18 theme values marked ✓ under theme
terminal.colors.foregroundstringyes"#rrggbb"
terminal.colors.backgroundstringyes"#rrggbb"
terminal.colors.cursorstringyes"#rrggbb"
terminal.colors.palettearrayyesthe 16 ANSI colours — normal 0–7, bright 8–15

shell.program and shell.args are read-only over MCP: their value is what TermHerd executes for every shell session at the next launch, and an agent must not get to choose that unattended. list_options and the schema carry the writable flag per id, so a model can tell before it tries.

set_option refuses rather than degrades: a read-only id, an unknown id, or a value that does not fit the option’s kind (a non-array palette, a theme outside the listed choices) answers a JSON-RPC error and writes nothing. So does a settings.json that does not parse: writing the one option onto an empty object would discard the rest of the file. null is always accepted on a writable id — it unsets the option.

That is the whole write surface today. The close, sidebar, record, capture, open, mcp, keys, terminal.font_size, terminal.copy_on_select, terminal.paste_on_right_click and terminal.option_as_meta blocks of settings.json are file-only — keys is readable as a resource, below.

mcp is file-only by design rather than by backlog: its keys govern who may reach the live bridge and what it may do there, and a surface able to widen its own reach is not a setting.

Resources

URIHolds
termherd://options/schemathe schema of the configurable options
termherd://keys/schemathe bindable actions, with their default and current chords

termherd://keys/schema is generated from the same in-code action table the keymap itself uses, so it cannot drift from the binary you are running. It is the machine-readable form of Keyboard shortcuts, and the catalogue the live bridge’s run_action speaks — less the activate-tab-N family, which run_action accepts but the resource does not list. Defaults are those of the platform the server runs on.

What it is not

It does not reach the running app: no sessions, no tabs, no terminals, no keyboard. That is the live bridge, which reaches a session TermHerd launched, or a client attached from outside.

It is also not F-mcp-ide-bridge — a deferred, unbuilt feature that would run the other way round, with TermHerd as an MCP client of Claude’s IDE bridge. docs/ARCHITECTURE.md §7 sketches that bridge, and §15 lists it as a row of its own, apart from the mcp crate: the crate holds the server described here and the option catalogue both servers share.