Show HN: ht-mcp – a Rust MCP server of headless terminal for agents
Most agentic coding tools struggle with blocking, interactive terminal tools (all the boilerplate generator, infra CLI tools etc). This is because many existing CLI dev tools are built for humans and require interactive input. We built this so agentic coding tools (Claude Code, Cursor, Memex, etc) can “see” and “interact” with terminals exactly like humans do.
In our demo video [2], you'll see it operating vim/emacs just as a human would - selecting options, navigating menus, and modifying text in real-time. This is crucial for AI coding assistants that need to work with tools designed for human interaction. We originally built an MCP server in TypeScript wrapping the HT (Rust) binary as a proof of concept. It worked so well that we decided to streamline it and make it more compact and easy to install.
In the process, we found that using Rust and the MCP Rust SDK makes it really compelling to build MCP servers, with significant performance improvements: - 40x faster startup time (~50ms vs ~2s) - 70% less memory usage (~15MB vs ~50MB) - Single 3MB binary vs ~200MB Node.js dependencies - No subprocess overhead or external dependencies
As Andy put it [4]: "Terminals are one of the oldest and most prolific UI frameworks in all of computing. And they are stateful." Without HT, an agent struggles to manage this state directly; with HT-MCP, an agent can observe and interact with the terminal just like a human does.
This is an early first release and we'd love to hear if you find it useful.
Here is a demo using it from Claude Code[2] and Memex[3] (our own desktop agent coding tool).
Install it via Homebrew: `brew tap memextech/tap && brew install ht-mcp`
1. https://github.com/andyk/ht by Andy Konwinski 2. https://github.com/user-attachments/assets/e70a3240-77f5-4ef... 3. https://github.com/user-attachments/assets/6a1b6e76-5d5c-4ba... 4. https://news.ycombinator.com/item?id=40552257