Skip to content
Back to search

ht-mcp

Pure Rust implementation of MCP server for headless terminal

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/memextech--ht-mcp/badge.svg)](/listings/memextech--ht-mcp)

HTML

<a href="/listings/memextech--ht-mcp"><img src="/api/listings/memextech--ht-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

🍺 Homebrew (Recommended)

brew tap memextech/tap
brew install ht-mcp

πŸ“¦ Pre-built Binaries

Download from [releases](https://github.com/memextech/ht-mcp/releases/latest):

# macOS Intel
curl -L https://github.com/memextech/ht-mcp/releases/latest/download/ht-mcp-x86_64-apple-darwin -o ht-mcp

# macOS Apple Silicon
curl -L https://github.com/memextech/ht-mcp/releases/latest/download/ht-mcp-aarch64-apple-darwin -o ht-mcp

# Linux
curl -L https://github.com/memextech/ht-mcp/releases/latest/download/ht-mcp-x86_64-unknown-linux-gnu -o ht-mcp

# Windows (PowerShell)
curl.exe -L https://github.com/memextech/ht-mcp/releases/latest/download/ht-mcp-x86_64-pc-windows-msvc -o ht-mcp.exe

# Make executable and install
chmod +x ht-mcp && sudo mv ht-mcp /usr/local/bin/

πŸ¦€ Cargo

# From crates.io (stable)
cargo install ht-mcp

# From git (latest)
cargo install --git https://github.com/memextech/ht-mcp

πŸ”§ Build from Source

git clone https://github.com/memextech/ht-mcp.git
cd ht-mcp
git submodule update --init --recursive
cargo install --path .

See [docs/INSTALLATION.md](docs/INSTALLATION.md) for detailed installation options.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md Β· README Β· 216 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # ht-mcp
  2. [![Rust](https://img.shields.io/badge/rust-1.75+-orange.svg)](https://www.rust-lang.org)
  3. [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  4. A high-performance Rust implementation of a Model Context Protocol (MCP) server for headless terminal [ht](https://github.com/andyk/ht).
  5. ## Features
  6. - πŸš€ **Pure Rust**: Single binary MCP server, no external dependencies
  7. - πŸ”— **Direct Integration**: Embed excellent [ht](https://github.com/andyk/ht) headless terminal library for optimal performance
  8. - πŸ–₯️ **Multi-Session**: Concurrent terminal session management
  9. - 🌐 **Web Interface**: Optional live terminal preview
  10. ## Demo
  11. ### ht-mcp in [Memex](https://memex.tech)
  12. ![ht-mcp in Memex](https://github.com/user-attachments/assets/6a1b6e76-5d5c-4ba4-87ee-70a31f0bc4ce)
  13. ### ht-mcp in [Claude Code](https://www.anthropic.com/claude-code)
  14. ![ht-mcp in Claude Code](https://github.com/user-attachments/assets/e70a3240-77f5-4ef2-953b-202b310dbf74)
  15. ## Installation
  16. ### 🍺 Homebrew (Recommended)
  17. ```bash
  18. brew tap memextech/tap
  19. brew install ht-mcp
  20. ```
  21. ### πŸ“¦ Pre-built Binaries
  22. Download from [releases](https://github.com/memextech/ht-mcp/releases/latest):
  23. ```bash
  24. # macOS Intel
  25. curl -L https://github.com/memextech/ht-mcp/releases/latest/download/ht-mcp-x86_64-apple-darwin -o ht-mcp
  26. # macOS Apple Silicon
  27. curl -L https://github.com/memextech/ht-mcp/releases/latest/download/ht-mcp-aarch64-apple-darwin -o ht-mcp
  28. # Linux
  29. curl -L https://github.com/memextech/ht-mcp/releases/latest/download/ht-mcp-x86_64-unknown-linux-gnu -o ht-mcp
  30. # Windows (PowerShell)
  31. curl.exe -L https://github.com/memextech/ht-mcp/releases/latest/download/ht-mcp-x86_64-pc-windows-msvc -o ht-mcp.exe
  32. # Make executable and install
  33. chmod +x ht-mcp && sudo mv ht-mcp /usr/local/bin/
  34. ```
  35. ### πŸ¦€ Cargo
  36. ```bash
  37. # From crates.io (stable)
  38. cargo install ht-mcp
  39. # From git (latest)
  40. cargo install --git https://github.com/memextech/ht-mcp
  41. ```
  42. ### πŸ”§ Build from Source
  43. ```bash
  44. git clone https://github.com/memextech/ht-mcp.git
  45. cd ht-mcp
  46. git submodule update --init --recursive
  47. cargo install --path .
  48. ```
  49. See [docs/INSTALLATION.md](docs/INSTALLATION.md) for detailed installation options.
  50. ## MCP Tools
  51. | Tool | Description | Parameters |
  52. |------|-------------|------------|
  53. | `ht_create_session` | Create new terminal session | `command?`, `enableWebServer?` |
  54. | `ht_send_keys` | Send keystrokes to session | `sessionId`, `keys[]` |
  55. | `ht_take_snapshot` | Capture terminal state | `sessionId` |
  56. | `ht_execute_command` | Execute command and get output | `sessionId`, `command` |
  57. | `ht_list_sessions` | List all active sessions | None |
  58. | `ht_close_session` | Close terminal session | `sessionId` |
  59. > **Note**: Parameters use camelCase (e.g., `sessionId`, `enableWebServer`) for MCP compatibility.
  60. ## Configuration
  61. Add to your MCP client configuration:
  62. ```json
  63. {
  64. "mcpServers": {
  65. "ht-mcp": {
  66. "command": "ht-mcp",
  67. "args": ["--debug"]
  68. }
  69. }
  70. }
  71. ```
  72. For custom installation paths:
  73. ```json
  74. {
  75. "mcpServers": {
  76. "ht-mcp": {
  77. "command": "/path/to/ht-mcp",
  78. "args": []
  79. }
  80. }
  81. }
  82. ```
  83. ## Usage Example
  84. ```bash
  85. # Start the MCP server
  86. ht-mcp
  87. # With debug logging
  88. ht-mcp --debug
  89. ```
  90. Once configured in your MCP client:
  91. 1. **Create session**: `ht_create_session` β†’ Returns session ID
  92. 2. **Run commands**: `ht_execute_command` with session ID and command
  93. 3. **Interactive input**: `ht_send_keys` for multi-step interactions
  94. 4. **Check state**: `ht_take_snapshot` to see current terminal
  95. 5. **Clean up**: `ht_close_session` when finished
  96. ## Response Format
  97. This server returns **human-readable text responses** (not JSON), designed for natural language interaction:
  98. ```text
  99. # Create session response
  100. HT session created successfully!
  101. Session ID: abc123-def456-789...
  102. 🌐 Web server enabled! View live terminal at: http://127.0.0.1:3618
  103. ```
  104. ```text
  105. # Terminal snapshot response
  106. Terminal Snapshot (Session: abc123...)
  107. bash-3.2$ ls -la
  108. total 16
  109. drwxr-xr-x 4 user staff 128 Jun 13 10:30 .
  110. -rw-r--r-- 1 user staff 45 Jun 13 10:30 file.txt
  111. bash-3.2$
  112. ```
  113. ## Requirements
  114. - **Rust**: 1.75+ (install via [rustup](https://rustup.rs/))
  115. - **Supported OS**: Linux, macOS, Windows (experimental)
  116. ## Development
  117. ```bash
  118. # Clone with submodules
  119. git clone --recursive https://github.com/memextech/ht-mcp.git
  120. cd ht-mcp
  121. # Build
  122. cargo build
  123. # Run
  124. cargo run
  125. # Test
  126. cargo test
  127. ```
  128. ## Troubleshooting
  129. **Installation Issues:**
  130. - Ensure Rust 1.75+ is installed
  131. - Check internet connection for git submodules
  132. - Verify `~/.cargo/bin` is in PATH
  133. **Runtime Issues:**
  134. - Use `ht-mcp --debug` for verbose logging
  135. - Check MCP client configuration syntax
  136. - Verify binary path: `which ht-mcp`
  137. ## Performance
  138. Compared to the original [TypeScript implementation](https://github.com/memextech/headless-terminal-mcp):
  139. - **40x faster startup** (~50ms vs ~2s)
  140. - **70% less memory** (~15MB vs ~50MB)
  141. - **Single binary** (4.7MB vs ~200MB Node.js)
  142. - **Zero subprocess overhead**
  143. ## License
  144. Apache 2.0 License
  145. Copyright (c) 2025 Atlas Futures Inc.
  146. See [LICENSE](LICENSE) for details.
  147. ## Contributing
  148. Contributions welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
  149. ---
  150. Built with [Memex](https://memex.tech)✨
  151. # Fixed submodule commit reference

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.