In-depth architectural comparison of the MCP Remote Ssh and Terminal History MCP MCP servers. Compare execution transports, security boundaries, tool capabilities, quality scores, and ready-to-paste client installation snippets for Claude, Cursor, Windsurf, and VS Code.
At a Glance & Executive Verdict
MCP Remote Ssh
Command Line · Local stdio
Quality: 60/100 (Good) | Auth: other
Terminal History MCP
Command Line · Local stdio
Quality: 60/100 (Good) | Auth: No auth required
Verdict Summary: Choose MCP Remote Ssh if you need specialized Command Line tools running via a local process. Choose Terminal History MCP if your workspace requires Command Line integration with local subprocess execution. Both servers can be configured concurrently in your client's mcpServers manifest.
Which MCP Server Should You Choose?
Choose MCP Remote Ssh when:
You need dedicated capabilities in the Command Line domain.
You prefer local stdio subprocess transport architecture.
Your security boundary fits: other (Free / Open Source).
Full SSH access for AI agents with secret-safe environment injection and automatic output redaction. Persistent sessions, structured execution, SFTP, port forwarding — secrets are fed via stdin (invisible to ps) and scrubbed from all tool responses before reaching the LLM. uvx mcp-remote-ssh
Full-text search over your shell history (zsh / bash / fish) via SQLite FTS5. Local-only. 11-pattern secret redaction runs BEFORE insert. Captures cwd / exit code / duration via opt-in shell hook. Tools: searchhistory, recentindir, failedcommands, commandchains, reindex.
Category & Scope
Tools & Capabilities Breakdown
MCP Remote Ssh Tools (24)
ssh_connect
Connect to a remote host via SSH. Returns a session_id for use with all
other tools. Supports password and key-based authentication.
ssh_list_sessions
List all active SSH sessions with their connection status and details.
Returns:
List of session info dicts.
ssh_close_session
Close an SSH session and release all its resources (shell, SFTP,
port forwards). WARNING: this kills any running processes in the session.
ssh_execute
Execute a command on the remote host and return structured output.
Each call runs in an independent exec channel -- no state is shared
between calls (use ssh_shell_* tools for persistent state).
If secrets have been loaded via ssh_load_env_file, they are automatically
injected as environment variables for this command.
ssh_sudo_execute
Execute a command with sudo on the remote host. If the user already
has passwordless sudo, leave sudo_password empty.
If secrets have been loaded via ssh_load_env_file, they are automatically
injected as environment variables for this command.
Ready-to-Paste Client Configurations
Paste either (or both) of these JSON server blocks into your client config file (e.g. claude_desktop_config.json or ~/.cursor/mcp.json).
MCP Remote Ssh is categorized under Command Line and uses a local stdio subprocess. In contrast, Terminal History MCP belongs to Command Line using local stdio subprocess. Select MCP Remote Ssh when you need capabilities focused on command line and Terminal History MCP when you require tools for command line.
Create an SSH port forward (local -> remote). Connections to
127.0.0.1:local_port will be tunneled through SSH to remote_host:remote_port.
If local_port is 0, a random available port is chosen.
ssh_list_forwards
List all active port forwards for an SSH session.
ssh_close_forward
Close a specific port forward.
ssh_load_env_file
Load environment variables from a LOCAL file (on the machine running
this MCP server) into the remote SSH session.
The file is read from the local filesystem -- it does NOT need to exist
on the remote host. Variable VALUES are never returned to the caller;
only variable names are confirmed.
Loaded values are:
1. Registered for automatic redaction -- any subsequent tool output
(ssh_execute, ssh_shell_send, ssh_shell_read, ssh_read_remote_file)
that contains a secret value will have it replaced with '***'.
2. Exported into the remote shell (if open) via builtins, avoiding
exposure in the process tree on the remote host.
ssh_clear_secrets
Clear all loaded secrets from the redaction registry. Secrets will
no longer be redacted from tool output. Does NOT unset the environment
variables from the remote shell.
ssh_upload_file
Upload a local file to the remote host via SFTP.
ssh_download_file
Download a file from the remote host to the local machine via SFTP.
+12 more tools listed on main page
Terminal History MCP Tools (5)
reindex
Re-parses the local shell history files (`~/.zsh_history`, `~/.bash_history`) and the hook's extended log into the SQLite index. Idempotent — already-indexed commands are skipped by hash, so it is safe to call repeatedly. Run it after a burst of shell activity to make recent commands searchable. Reads only local files; writes only to `~/.terminal-history-mcp/`. Takes no arguments. Returns counts of parsed / inserted / skipped entries.
search_history
Read-only. Full-text search (SQLite FTS5, stemmed, Unicode-aware) over all indexed shell commands. Supports keyword and prefix queries — e.g. `docker build`, `git reb*`. Returns the most recent matches first, each with timestamp, shell, cwd, and exit code when available. Local index only; nothing is sent anywhere. If a query returns nothing you may need `reindex` first.
recent_in_dir
Read-only. Lists the most recent commands that were run with a given working directory — answers "what was I doing in this project?". Requires the shell hook to have been installed (legacy entries have no cwd and won't appear). Returns newest first with timestamps and exit codes. Local index only.
failed_commands
Read-only. Lists recent commands that exited non-zero — a quick "what just broke?" feed. Optionally restrict to commands after a given epoch-millisecond timestamp. Requires the shell hook for exit-code capture (legacy entries have no exit code). Newest first. Local index only.
command_chains
Read-only. For each command matching `query`, returns the commands run within a time window around it (default ±5 min) — surfacing multi-step sequences like `cd → npm run build → deploy`. Useful for reconstructing "how did I do X last time?". Returns up to `limit` chains, each a time-ordered list of command rows. Local index only.