Best for
- Operators and developers who need MCP client access to SSH hosts they manage.
- Trusted environments where command and file-path permissions can be configured.
This project provides SSH command execution, SFTP file operations, and background task tools over stdio or Streamable HTTP. It can access remote hosts and run commands, so restrict command and file-path permissions before deployment and protect SSH credentials.
Strongest · Documentation 15/20 Weakest · Maintenance 7/20
Static review · not runReviewed 2026-11-29
Read the FMRS scoring method →Runtime:Node.js
SSH_MCP_2FA_CODE
Set this to the verification code before starting the server when SSH requires keyboard-interactive 2FA/MFA.
SSH_MCP_HTTP_TOKEN
Bearer token for HTTP transport; set a long random token and send it in the client’s Authorization header.
Add the server entry from the JSON example to your MCP client configuration, replacing the host, port, username, and authentication values. The example uses stdio and npx; you can also start a Streamable HTTP service with --mcp-transport http.
{
"mcpServers": {
"ssh-mcp-server": {
"command": "npx",
"args": [
"-y",
"@fangjunjie/ssh-mcp-server",
"--host",
"192.168.1.1",
"--port",
"22",
"--username",
"root",
"--password",
"pwd123456"
]
}
}
}
Works in clients that read an "mcpServers" key. For clients such as VS Code that use a different key, the configurator below converts it.
{
"servers": {
"ssh-mcp-server": {
"command": "npx",
"args": [
"-y",
"@fangjunjie/ssh-mcp-server",
"--host",
"192.168.1.1",
"--port",
"22",
"--username",
"root",
"--password",
"pwd123456"
]
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
[mcp_servers.ssh-mcp-server] command = "npx" args = ["-y", "@fangjunjie/ssh-mcp-server", "--host", "192.168.1.1", "--port", "22", "--username", "root", "--password", "pwd123456"]
Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).
claude mcp add ssh-mcp-server -- npx -y @fangjunjie/ssh-mcp-server --host 192.168.1.1 --port 22 --username root --password pwd123456
Run it in a terminal; replace any <…> placeholders with your own values first.
After starting the MCP client, confirm that `execute-command` and `list-servers` appear in its tool list. Call `list-servers` to inspect configured SSH servers, then run a read-only command with `execute-command` and confirm it returns remote output.
Once connected, you can ask your AI assistant things like:
No matching tools
SSH MCP Server connects MCP-enabled AI applications to remote SSH hosts for command execution, file operations and transfers, and background task management. It supports password and private-key authentication, along with configurable command and file-path restrictions. It is not an SSH terminal client or a remote command service suited to untrusted users.
Connect code, docs, and infrastructure in a local knowledge graph.
Docker's official MCP gateway CLI plugin for managing and running MCP servers.
Fast, low-cost structured judgments for agents.
Local call graphs and structural analysis for Go repositories.
Source revision ff97574651f6 Data synced 2026-12-05 Read the FMRS scoring method Markdown