SSH MCP
Enables AI assistants to securely execute remote SSH commands, perform file transfers, and monitor system status through a standardized interface. It features robust security controls including command whitelisting, blacklisting, and credential isola
What is SSH MCP?
SSH MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai assistants to securely execute remote ssh commands, perform file transfers, and monitor system status through a standardized interface. it features robust security controls including comman...
Enables AI assistants to securely execute remote SSH commands, perform file transfers, and monitor system status through a standardized interface. It features robust security controls including command whitelisting, blacklisting, and credential isola
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables AI assistants to securely execute remote SSH command
Use Cases
Maintainer
Works with
Installation
NPM
npx -y sshManual Installation
npx -y sshConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use SSH MCP
ssh-mcp-server is a TypeScript MCP server that lets AI assistants securely execute commands, upload files, and download files on remote servers via SSH. It supports password authentication, private key authentication with passphrases, 2FA keyboard-interactive auth, SOCKS proxy tunnelling, and fine-grained security controls including regex-based command whitelists and blacklists. SSH credentials are handled entirely locally and are never sent to the AI model, making it safe for use with cloud AI assistants.
Prerequisites
- Node.js 18 or higher installed
- SSH access to the remote server (IP address, username, and either a password or a private key)
- An MCP client such as Claude Desktop or Cursor
Test the server with npx
Run the server directly with npx to verify it can connect to your SSH target before writing a config file.
npx -y @fangjunjie/ssh-mcp-server --host 192.168.1.1 --username admin --password yourpasswordConfigure your MCP client with password authentication
Add ssh-mcp-server to your claude_desktop_config.json using password authentication. Replace the host, username, and password with your actual values.
Or configure with private key authentication
For key-based auth, pass the path to your private key file instead of a password. Optionally restrict which commands are allowed using the whitelist flag.
Add command restrictions for security
Use --whitelist to allow only specific commands (regex patterns), or --blacklist to block dangerous ones. This limits what the AI assistant can execute on your server.
Set up multiple servers via a config file
For managing multiple SSH targets, create a JSON config file listing each server and pass it with --config-file instead of inline arguments.
SSH MCP Examples
Client configuration
Three common configurations for claude_desktop_config.json: password auth, private key auth with whitelisting, and multiple servers via a config file.
{
"mcpServers": {
"ssh-mcp-server": {
"command": "npx",
"args": [
"-y",
"@fangjunjie/ssh-mcp-server",
"--host", "192.168.1.1",
"--username", "admin",
"--password", "yourpassword"
]
}
}
}Prompts to try
Use these prompts once the SSH MCP server is connected to your AI assistant.
- "Run 'df -h' on the server and show me disk usage for all mounted filesystems."
- "List all running Docker containers on the remote server."
- "Upload the file /local/path/config.yaml to /etc/myapp/config.yaml on the server."
- "Download /var/log/nginx/error.log from the server and summarise the last 50 errors."
- "Show me the list of configured SSH servers available."Troubleshooting SSH MCP
Connection refused or SSH authentication fails
Verify the host IP, port (default is 22), username, and credentials are correct. For private key auth, ensure the key file path is absolute and the file is readable. For 2FA, set the SSH_MCP_2FA_CODE environment variable with your one-time code.
Commands are blocked or return permission denied errors
If you configured a --whitelist, check that the command pattern you are trying to run matches one of the allowed regex patterns. Whitelist patterns are matched against the full command string.
The server crashes or times out when running long-running commands
Switch from the default 'exec' transport mode to 'shell' mode by adding '--transport-mode shell' to your args. Shell mode maintains a persistent session better suited to interactive or long-running commands.
Frequently Asked Questions about SSH MCP
What is SSH MCP?
SSH MCP is a Model Context Protocol (MCP) server that enables ai assistants to securely execute remote ssh commands, perform file transfers, and monitor system status through a standardized interface. it features robust security controls including command whitelisting, blacklisting, and credential isola It connects AI assistants to external tools and data sources through a standardized interface.
How do I install SSH MCP?
Install via npm with the command: npx -y ssh. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with SSH MCP?
SSH MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is SSH MCP free to use?
Yes, SSH MCP is open source and available under the ISC License license. You can use it freely in both personal and commercial projects.
SSH MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to SSH MCP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up SSH MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use SSH MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.