ht_create_sessionLABSCO SUMMARY
State survives between calls, which is what interactive programs need.
A stateless run-command tool cannot handle anything that asks a question — an ssh password prompt, a git rebase, an installer, vim. Here the session persists, so the pattern is execute, snapshot, look, send keys, snapshot again. Being able to watch the same session in a browser while the assistant drives it is more useful than it sounds when you are trying to work out what it just did.
What it is
A Rust MCP server that embeds ht, a headless terminal, and hands out sessions. The distinction that matters: this is not run-a-command-and-return-stdout. The session stays alive between calls, so the assistant can start something interactive, look at the screen, and type the next thing.
What you get
- ht_create_session — a new terminal, optionally starting a command, optionally with the web server on
- ht_execute_command — run a command in an existing session and read what came back
- ht_send_keys — send keystrokes rather than a command line, which is how you answer a prompt or drive a full-screen program
- ht_take_snapshot — the current terminal screen as text, so the assistant can see what a program is showing right now
- ht_list_sessions and ht_close_session — several sessions at once, and cleanup when you are done
- With the web server enabled, a session also has a live preview URL you can open in a browser and watch
- Responses come back as readable text rather than JSON — a snapshot looks like a terminal, because that is what the model has to reason about
Requirements
Nothing but the binary — a single Rust executable with no Node.js or Python runtime behind it. Install with brew tap memextech/tap and brew install ht-mcp, download a release build for macOS, Linux or Windows, or cargo install ht-mcp. Building from source needs Rust 1.75 or later and a recursive clone, since ht comes in as a submodule. Windows support is marked experimental. Apache 2.0 licensed. Whatever the assistant runs, runs with your shell's permissions on your machine.
Setup effort
One command — brew install memextech/tap/ht-mcp
USE CASES
Running something that stops to ask a question
Start it, snapshot the screen to see the prompt, then send the keys that answer it.
Working through a build that fails partway
Keep one session open across the whole attempt, so the shell state and working directory carry between commands.
Driving a full-screen terminal program
Send keystrokes and read the rendered screen back, instead of hoping for line-oriented output.
Watching what the assistant is actually doing
Create the session with the web server on and open the live preview in a browser.
Running two things side by side
Keep a server in one session and a client in another, and close both when finished.
6 tools
Listed in project docs. Your client may show a different list.
ht_send_keysht_take_snapshotht_execute_commandht_list_sessionsht_close_sessionBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
ht-mcp on PATH
Where it runs
Both documented setups run the server on your machine.
INSTALLATION
Connect your client
Server setup
brew install memextech/tap/ht-mcpMCP Clients
Any MCP client
{
"mcpServers": {
"ht-mcp": {
"command": "ht-mcp",
"args": [
"--debug"
]
}
}
}Any MCP client — custom path
{
"mcpServers": {
"ht-mcp": {
"command": "<YOUR_PATH_TO_HT_MCP>",
"args": []
}
}
}