
How to add SSH MCP Server to Windsurf
Execute shell commands on remote Linux and Windows servers over SSH via MCP. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 504★ · stdio · no auth
Windsurf config for SSH MCP Server
npx -y ssh-mcp{
"mcpServers": {
"ssh-mcp-server": {
"command": "npx",
"args": [
"ssh-mcp",
"-y",
"--",
"--host=1.2.3.4",
"--port=22",
"--user=root",
"--password=pass",
"--key=path/to/key",
"--timeout=30000",
"--maxChars=none"
]
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the SSH MCP Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5SSH MCP Server's tools become available to Cascade.
Before you start
- Node.js (per package engines)
- A reachable SSH server (Linux or Windows) with host, username, and password or SSH private key
- An MCP client such as Claude Desktop, Claude Code, Cursor, or Windsurf
What SSH MCP Server can do in Windsurf
execExecute a shell command on the remote SSH server. Parameters: command (required) — shell command to execute; description (optional) — note appended as a comment. Subject to the configurable --timeout (default 60000ms) and --maxChars limit (default 1000, disable with none or 0).
sudo-execExecute a shell command with sudo elevation as root. Parameters: command (required); description (optional). Requires --sudoPassword for password-protected sudo (or use --suPassword for a persistent root shell). Subject to the same --timeout and --maxChars settings. Not available when the server is started with --disableSudo.
Security
Grants an MCP client the ability to run arbitrary shell commands on a remote server over SSH, including optional sudo/su root elevation. Credentials (password, SSH key path, sudo/su passwords) are passed as command-line arguments in the client config. Use a least-privilege SSH account, prefer key-based auth, and pass `--disableSudo` when root access is not needed. Provided under the MIT License; use at your own risk.
SSH MCP Server + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the SSH MCP Server config there under the "mcpServers" key and restart the client.
Is SSH MCP Server safe to use with Windsurf?
Grants an MCP client the ability to run arbitrary shell commands on a remote server over SSH, including optional sudo/su root elevation. Credentials (password, SSH key path, sudo/su passwords) are passed as command-line arguments in the client config. Use a least-privilege SSH account, prefer key-based auth, and pass `--disableSudo` when root access is not needed. Provided under the MIT License; use at your own risk.
Which authentication methods are supported?
Password authentication via --password, or SSH key-based authentication via --key (path to a private SSH key). Optional --sudoPassword and --suPassword enable privileged operations.
How do I add it to Claude Code?
Use the claude mcp add command, e.g. `claude mcp add --transport stdio ssh-mcp -- npx -y ssh-mcp -- --host=YOUR_HOST --user=YOUR_USER --password=YOUR_PASSWORD`. Scopes can be set with --scope local|project|user.
Can I disable sudo access?
Yes. Pass the --disableSudo flag at startup and the sudo-exec tool will not be registered at all, which is useful when sudo access is not needed or not available.