loading…
Search for a command to run...
loading…
Terminal-first SSH access for MCP clients and AI agents, enabling interactive remote sessions, file uploads, and stateful workflows.
Terminal-first SSH access for MCP clients and AI agents, enabling interactive remote sessions, file uploads, and stateful workflows.
Terminal-first SSH access for MCP clients, AI agents, and remote automation.
Turn remote machines into agent-friendly, interactive terminal workflows — not just one-shot command execution.
Most SSH tooling for AI workflows is built around run command → get output → done.
That falls apart when the real task is interactive:
TermSSH MCP is built for that gap.
Instead of pretending everything is a single command, it gives MCP clients a real operator-style workflow:
open a shell → write input → read output → keep context → upload files → continue working
Terminal-firstInteractive terminal sessions are the core model, not an afterthought. |
Agent-readyDesigned for MCP clients, coding agents, and automation loops. |
Stateful workflowsReuse active sessions so multi-step tasks feel natural and reliable. |
Upload includedMove scripts, configs, payloads, and generated artifacts over SFTP. |
Cross-platformWorks against Linux and Windows SSH targets. |
Clean tool surfaceFocused MCP tools for terminal control and remote file delivery. |
Upload a local file from the MCP host machine to the remote SSH server using SFTP.
Parameters
localPath — local source file pathremotePath — destination path on the remote hostcreateDirectories — create missing parent directories if neededoverwrite — replace an existing remote file if presentmode — optional POSIX mode such as 0644Upload direct text or base64 content to the remote server.
Parameters
content — raw text or base64 payloadencoding — utf8 or base64remotePath — destination path on the remote hostcreateDirectories — create missing parent directories if neededoverwrite — replace an existing remote file if presentmode — optional POSIX mode such as 0644Start an interactive remote terminal session.
Parameters
cwd — optional working directory after shell startupshell — optional shell binaryplatformHint — auto, linux, or windowselevated — attempt su elevation when configuredcols — terminal widthrows — terminal heightenv — optional environment variablesmultiSession — set true to force a new managed session instead of reusing an existing oneWrite input into an active terminal session.
Parameters
sessionId — target session idinput — text to sendappendNewline — append a newline automatically if neededRead buffered output from a terminal session.
Parameters
sessionId — target session idsinceSequence — only return output newer than a given sequence numbermaxChars — limit the size of returned outputwaitForMs — optional short polling delayResize an active terminal session.
Parameters
sessionId — target session idcols — new widthrows — new heightClose a terminal session locally.
Parameters
sessionId — target session idflowchart LR
A[terminal-start] --> B[terminal-write]
B --> C[terminal-read]
C --> D{Need file?}
D -- Yes --> E[upload-file / upload-content]
D -- No --> F{Continue session?}
E --> F
F -- Yes --> B
F -- No --> G[terminal-close]
This works especially well for:
git clone https://github.com/rayss868/termssh-mcp.git
cd termssh-mcp
npm install
npm run build
npm install -g termssh-mcp
TermSSH MCP supports two configuration modes:
host — hostname or IP address of the remote machineuser — SSH usernameport — SSH port, default 22password — SSH passwordkey — path to a private SSH key filesudoPassword — optional password for sudo-oriented workflowssuPassword — optional password for su-based elevationtimeout — SSH ready timeout in milliseconds, default 60000maxChars — command-length validation limit, default 1000; use none or 0 for unlimited modeVault mode lets you store multiple SSH accounts in one JSON file and choose the target account per MCP tool call.
vault — path to a vault JSON fileIf --vault is provided, startup resolves accounts from the vault. If no vault is provided, TermSSH MCP falls back to direct CLI config.
account parameter in the built tool schemaaccount should be set to one of the keys under accountsaccount is omitted, runtime now fails with a clear error instead of silently choosing an accountaccount → reject, valid account → connect successfullyFile: termssh-mcp-vault.json
{
"activeAccount": "production",
"accounts": {
"production": {
"host": "1.2.3.4",
"port": 22,
"user": "root",
"key": "C:\\keys\\id_ed25519"
},
"staging": {
"host": "5.6.7.8",
"port": 22,
"user": "ubuntu",
"password": "example-password"
}
}
}
key must point to a private key file path{
"mcpServers": {
"termssh-mcp": {
"command": "node",
"args": [
"build/index.js",
"--vault=./termssh-mcp-vault.json",
"--timeout=30000",
"--maxChars=none"
]
}
}
}
{
"account": "production",
"cwd": "/var/www/app",
"platformHint": "linux",
"multiSession": true
}
If you call a vault-backed tool without account, runtime rejects the call and tells you to choose one of the configured account names.
{
"mcpServers": {
"termssh-mcp": {
"command": "npx",
"args": [
"-y",
"termssh-mcp",
"--",
"--host=1.2.3.4",
"--port=22",
"--user=root",
"--password=pass",
"--timeout=30000",
"--maxChars=none"
]
}
}
}
{
"mcpServers": {
"termssh-mcp": {
"command": "npx",
"args": [
"-y",
"termssh-mcp",
"--",
"--host=example.com",
"--user=root",
"--key=/path/to/private/key",
"--timeout=30000"
]
}
}
}
{
"mcpServers": {
"ssh-mcp": {
"command": "node",
"args": [
"D:/All_project/own/AI_Coder/MCP_Tools/ssh-mcp/build/index.js",
"--vault=D:/All_project/own/AI_Coder/MCP_Tools/ssh-mcp/termssh-mcp-vault.json",
"--timeout=1200000",
"--maxChars=50000"
]
}
}
}
Register the server in Claude Code with direct credentials:
claude mcp add --transport stdio termssh-mcp -- npx -y termssh-mcp -- --host=YOUR_HOST --user=YOUR_USER --password=YOUR_PASSWORD
Register the server in Claude Code with a vault file:
claude mcp add --transport stdio termssh-mcp -- node build/index.js --vault=./termssh-mcp-vault.json --timeout=120000 --maxChars=none
With SSH key authentication:
claude mcp add --transport stdio termssh-mcp -- npx -y termssh-mcp -- --host=example.com --user=root --key=/path/to/private/key
With extended timeout:
claude mcp add --transport stdio termssh-mcp -- npx -y termssh-mcp -- --host=192.168.1.100 --user=admin --password=your_password --timeout=120000 --maxChars=none
The vault flow has been verified against a live SSH connection:
This means the recommended production path is now:
MCP config →
--vault=...→ active account selection → interactive terminal session
Developers
|
DevOps / infra teams
|
Agent builders
|
Build the project:
npm run build
Run tests:
npm test
Use the MCP Inspector:
npm run inspect
TermSSH MCP gives remote access to systems over SSH. Use it only on infrastructure you own or are explicitly authorized to manage.
Released under the MIT License.
Contributions are welcome. See CONTRIBUTING.md for contribution guidance and CODE_OF_CONDUCT.md for expected behavior.
Run in your terminal:
claude mcp add termssh-mcp -- npx Yes, TermSSH MCP is free — one-click install via Unyly at no cost.
No, TermSSH runs without API keys or environment variables.
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
Open TermSSH on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
CSA PROJECT - FZCO © 2026 IFZA Business Park, DDP, Premises Number 31174 - 001
Security
Low riskAutomated heuristic from public metadata — not a security guarantee.