Content
# SSH Tools MCP
This is an SSH tool based on MCP (Model Context Protocol) that allows you to connect to remote servers and execute commands with simple commands.
## Features
- Connect to SSH servers
- Execute remote commands (e.g., nvidia-smi)
- Disconnect from SSH connections
## Installation
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Run the server:
```bash
python ssh_server.py
```
## Usage
The MCP server provides the following tools:
1. `connect_ssh` - Connect to an SSH server
- Parameters:
- hostname: Server IP address or hostname
- password: SSH password
- username: SSH username (default: root)
- port: SSH port (default: 22)
2. `run_command` - Execute a command on the connected server
- Parameters:
- command: The command to execute (e.g., nvidia-smi)
3. `disconnect_ssh` - Disconnect the current SSH connection
## Examples
1. Connect to the server:
```python
connect_ssh(hostname="192.168.1.100", password="your_password")
```
2. Execute the nvidia-smi command:
```python
run_command(command="nvidia-smi")
```
3. Disconnect:
```python
disconnect_ssh()
```
## Notes
- Ensure the target server allows SSH password authentication
- It is recommended to call `disconnect_ssh` to disconnect after use
- All command executions will return the output or error messages of the command
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.
git
A Model Context Protocol server for Git automation and interaction.