# ssh MCP server

> Provides AI agents with persistent SSH sessions, virtual terminal emulation, and SFTP file transfers via the Model Context Protocol.

- Repository: https://github.com/taigrr/ssh-mcp
- Page: https://hostedmcp.org/servers/taigrr/ssh-mcp
- Transport: —
- Stars: 13
- License: 0BSD

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `SSH_AUTH_SOCK` | no | no |  |

## Tools (15)

- `ssh_connect`
- `ssh_exec`
- `ssh_send_command`
- `ssh_send_keys`
- `ssh_get_screen`
- `ssh_clear_screen`
- `ssh_resize`
- `ssh_read_file`
- `ssh_write_file`
- `ssh_edit_file`
- `ssh_upload`
- `ssh_download`
- `ssh_list_sessions`
- `ssh_list_hosts`
- `ssh_close_session`

## FAQ

### How does the server authenticate with remote hosts?

It authenticates via ssh-agent, gpg-agent, or by using an SSH private key located at ~/.ssh/id_ed25519 or ~/.ssh/id_rsa.

### Can I transfer files using this server?

Yes, the server supports bidirectional file and directory transfers using SFTP, including recursive transfers.

### What is the difference between ssh_exec and ssh_send_command?

ssh_exec is a blocking tool used for commands that should finish (like builds or git), while ssh_send_command is non-blocking and intended for interactive TUIs like vim or htop.
