This document provides quick examples of how to use the SSH MCP server with Cline.
The SSH MCP server provides the following tools:
- connect: Connect to an SSH server
- disconnect: Disconnect from the SSH server
- execute: Execute a command on the SSH server
- upload: Upload a file to the SSH server
- download: Download a file from the SSH server
- list_files: List files in a directory on the SSH server
use_mcp_tool(server_name="ssh-connect", tool_name="connect", arguments={})
use_mcp_tool(server_name="ssh-connect", tool_name="execute", arguments={"command": "ls -la"})
use_mcp_tool(server_name="ssh-connect", tool_name="list_files", arguments={"path": "/home/user"})
use_mcp_tool(server_name="ssh-connect", tool_name="upload", arguments={"local_path": "/path/to/local/file", "remote_path": "/path/to/remote/file"})
use_mcp_tool(server_name="ssh-connect", tool_name="download", arguments={"remote_path": "/path/to/remote/file", "local_path": "/path/to/local/file"})
use_mcp_tool(server_name="ssh-connect", tool_name="disconnect", arguments={})
Here's a complete example workflow:
-
Connect to the SSH server:
use_mcp_tool(server_name="ssh-connect", tool_name="connect", arguments={}) -
Execute a command:
use_mcp_tool(server_name="ssh-connect", tool_name="execute", arguments={"command": "ls -la"}) -
Upload a file:
use_mcp_tool(server_name="ssh-connect", tool_name="upload", arguments={"local_path": "example.txt", "remote_path": "/home/user/example.txt"}) -
List files to verify upload:
use_mcp_tool(server_name="ssh-connect", tool_name="list_files", arguments={"path": "/home/user"}) -
Download a file:
use_mcp_tool(server_name="ssh-connect", tool_name="download", arguments={"remote_path": "/home/user/example.txt", "local_path": "downloaded_example.txt"}) -
Disconnect from the SSH server:
use_mcp_tool(server_name="ssh-connect", tool_name="disconnect", arguments={})