
mcp-remote-ssh
MCP server giving AI agents SSH access with secret-redacted env variables and SFTP
The repository was last updated 109 days ago and is published under MIT.
mcp-remote-ssh is an open-source MCP server for ai models and llm tooling. It is available on CLI, Self-hosted, Linux, macOS and Windows.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, Linux
- What it can do
- Can change data (3 tools)
- GitHub stars
- 12
- Last commit
- Language
- Python
Similar MCP servers
About mcp-remote-ssh
Connects AI agents to remote machines over SSH, with persistent shell sessions, structured command results with exit codes, file transfer over SFTP and local port tunnels. Tools cover connecting with password, key or agent auth, running one-off commands, sudo, and driving an interactive shell.
The distinctive part is secret handling. Variables are read from a local .env file on the user's machine, injected into the remote session, and any matching value is replaced with *** in every tool response before it reaches the model. Commands are fed secrets over stdin so they do not appear in the process list on the remote host.
Optional session transcripts record executed commands and their output, with secrets redacted, and can be saved to a local file for audit or bug reproduction. Built on Paramiko and FastMCP, it is aimed at developers and QA or lab engineers who want agents working on servers without exposing credentials. The host key policy accepts unknown keys automatically, which suits ephemeral lab machines but should be considered on untrusted networks.
Tools this server provides (7)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 3 of 7 tools change data; 3 names don't say.
From the server's own tool labels and tool names; not verified by us.
- ssh_connect
- Connect with password, key, or agent auth; optional recording
- ssh_executeName suggests: changes
- Run a command and return stdout, stderr and exit code
- ssh_sudo_executeName suggests: changes
- Run a command with sudo elevation
- ssh_load_env_file
- Load secrets from a local env file for redaction
- ssh_upload_fileName suggests: changes
- Upload a local file to the remote host
- ssh_download_fileName suggests: reads
- Download a remote file to the local machine
- ssh_forward_port
- Create an SSH tunnel from local to remote
What it does
- Persistent SSH sessions
- Connections stay open across calls, with an interactive shell that keeps working directory, environment and running processes.
- Secret-redacted environment loading
- Values from a local env file are injected remotely and masked as *** in all tool output sent back to the model.
- Structured command output
- Commands return stdout, stderr and the real exit code in a consistent format.
- SFTP file transfer
- Upload, download, read, write and list remote files and directories.
- Port forwarding
- Create, list and close SSH tunnels from local ports to remote ports.
- Session transcript recording
- Optionally log executed commands and shell I/O in memory and save them to a local file.
Good for
- Letting an AI agent run diagnostics or deploy steps on a lab or cloud server without seeing credentials
- Reproducing bugs by recording exactly what an agent executed on a test machine
- Uploading configuration files and reading logs from remote hosts during development
- Opening a database tunnel to a remote server for local tools
Pricing
Open source
mcp-remote-ssh FAQ
How are secrets kept out of the AI model's context?
Values loaded from the local env file are replaced with *** in every tool response, including command output, shell reads and remote file reads, before the model sees them.
Is session recording on by default?
No. Recording is off by default and can be enabled per session at connect time or later.
Which authentication methods are supported?
Connections can use a password, a key, or SSH agent authentication.
Are base64 or otherwise transformed secrets redacted?
No. Only literal matches of the loaded values are redacted.
Is mcp-remote-ssh free?
Yes. mcp-remote-ssh is open source, so you can use and self-host it for free.
What are the best alternatives to mcp-remote-ssh?
The closest alternatives to mcp-remote-ssh are Fast MCP Ssh, SSH MCP Server, Remote Ssh MCP, Ssh Client MCP Server and mcp-tmux.
Where this comes from
- Description: written from the project's README.