Built as a high-performance Rust implementation, providing a Model Context Protocol server for headless terminal interactions
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HT-MCPcreate a new terminal session and run 'git status' to check my repository"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ht-mcp
A high-performance Rust implementation of a Model Context Protocol (MCP) server for headless terminal ht.
Features
π Pure Rust: Single binary MCP server, no external dependencies
π Direct Integration: Embed excellent ht headless terminal library for optimal performance
π₯οΈ Multi-Session: Concurrent terminal session management
π Web Interface: Optional live terminal preview
Related MCP server: MCP Shell Server
Demo
ht-mcp in Memex
ht-mcp in Claude Code
Installation
πΊ Homebrew (Recommended)
brew tap memextech/tap
brew install ht-mcpπ¦ Pre-built Binaries
Download from releases:
# 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 for detailed installation options.
MCP Tools
Tool | Description | Parameters |
| Create new terminal session |
|
| Send keystrokes to session |
|
| Capture terminal state |
|
| Execute command and get output |
|
| List all active sessions | None |
| Close terminal session |
|
Note: Parameters use camelCase (e.g.,
sessionId,enableWebServer) for MCP compatibility.
Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"ht-mcp": {
"command": "ht-mcp",
"args": ["--debug"]
}
}
}For custom installation paths:
{
"mcpServers": {
"ht-mcp": {
"command": "/path/to/ht-mcp",
"args": []
}
}
}Usage Example
# Start the MCP server
ht-mcp
# With debug logging
ht-mcp --debugOnce configured in your MCP client:
Create session:
ht_create_sessionβ Returns session IDRun commands:
ht_execute_commandwith session ID and commandInteractive input:
ht_send_keysfor multi-step interactionsCheck state:
ht_take_snapshotto see current terminalClean up:
ht_close_sessionwhen finished
Response Format
This server returns human-readable text responses (not JSON), designed for natural language interaction:
# Create session response
HT session created successfully!
Session ID: abc123-def456-789...
π Web server enabled! View live terminal at: http://127.0.0.1:3618# Terminal snapshot response
Terminal Snapshot (Session: abc123...)
bash-3.2$ ls -la
total 16
drwxr-xr-x 4 user staff 128 Jun 13 10:30 .
-rw-r--r-- 1 user staff 45 Jun 13 10:30 file.txt
bash-3.2$Requirements
Rust: 1.75+ (install via rustup)
Supported OS: Linux, macOS, Windows (experimental)
Development
# Clone with submodules
git clone --recursive https://github.com/memextech/ht-mcp.git
cd ht-mcp
# Build
cargo build
# Run
cargo run
# Test
cargo testTroubleshooting
Installation Issues:
Ensure Rust 1.75+ is installed
Check internet connection for git submodules
Verify
~/.cargo/binis in PATH
Runtime Issues:
Use
ht-mcp --debugfor verbose loggingCheck MCP client configuration syntax
Verify binary path:
which ht-mcp
Performance
Compared to the original TypeScript implementation:
40x faster startup (~50ms vs ~2s)
70% less memory (~15MB vs ~50MB)
Single binary (4.7MB vs ~200MB Node.js)
Zero subprocess overhead
License
Apache 2.0 License
Copyright (c) 2025 Atlas Futures Inc.
See LICENSE for details.
Contributing
Contributions welcome! Please read CONTRIBUTING.md for guidelines.
Built with Memexβ¨
Fixed submodule commit reference
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.