Labsco
mixelpixx logo

MCP SSH Server

โ˜… 50

from mixelpixx

Provides SSH access to remote servers, allowing AI tools to securely connect to your VPS for management.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

MCP SSH Server

A Model Context Protocol (MCP) server that provides comprehensive SSH and serial console access to remote servers and network devices. Enables AI tools like Claude Desktop to securely manage Linux servers, network switches, and infrastructure devices through both network SSH connections and direct USB-to-Serial console access.

Features

Core SSH Capabilities

  • SSH connection management with password or key-based authentication
  • Remote command execution with timeout handling
  • File upload and download via SFTP
  • Directory listing and file operations
  • Secure connection handling

Network Device Management

  • USB-to-Serial Console Access - Direct console connections via FTDI and other USB adapters
  • Network Switch Management - Full support for Cisco IOS/IOS-XE and Aruba switches
  • Device Discovery - Automatic detection of switch types and capabilities
  • Configuration Management - Backup, restore, and automated configuration
  • Network Diagnostics - Built-in ping, traceroute, and connectivity testing
  • Console-to-SSH Transition - Automated SSH setup via console connection
  • Firmware Management - Upload, verify, install, and rollback switch firmware

Server Management

  • Ubuntu server management tools (Nginx, SSL, packages, firewall)
  • Compatible with Claude Desktop, VS Code, and other MCP-compatible clients

Real-World Production Testing

This tool has been extensively tested in production network environments:

  • Network Discovery - Successfully discovered previously unknown fluttering ports on production switches that were causing intermittent connectivity issues
  • Zero Downtime - Managed multiple switches in live production networks without causing any network disruptions or outages
  • Time Savings - Automated SSH configuration reduced switch setup time from 15-20 minutes to under 2 minutes
  • Reliability - Zero incidents during production deployments across multiple network devices
  • USB-to-Serial Compatibility - Tested with FTDI FT232R/FT232H, Prolific PL2303, Silicon Labs CP2102/CP2104, and CH340 adapters
  • Switch Compatibility - Validated on Cisco Catalyst 2960/3560/3750 and Aruba 2530/2930 series switches

The tool has proven itself reliable enough for production network management tasks without requiring a separate lab environment for testing.

Available Tools

Core SSH Tools

ssh_connect

Establish an SSH connection to a remote server.

Parameters:

  • host (required) - Hostname or IP address
  • username (required) - SSH username
  • password (optional) - SSH password
  • privateKeyPath (optional) - Path to private key file
  • passphrase (optional) - Passphrase for private key
  • port (optional) - SSH port (default: 22)
  • connectionId (optional) - Unique identifier for this connection

Returns:

  • success - Boolean indicating success
  • connectionId - ID to use for subsequent commands
  • message - Connection status message

Example:

Connect to my server at example.com using username 'admin' and password authentication

ssh_exec

Execute a command on the remote server.

Parameters:

  • connectionId (required) - ID from ssh_connect
  • command (required) - Command to execute
  • cwd (optional) - Working directory
  • timeout (optional) - Command timeout in milliseconds (default: 60000)

Returns:

  • code - Exit code
  • signal - Signal that terminated the process (if any)
  • stdout - Standard output
  • stderr - Standard error

Example:

Run "ls -la /var/www/html" on the server

ssh_upload_file

Upload a file to the remote server.

Parameters:

  • connectionId (required) - ID from ssh_connect
  • localPath (required) - Local file path
  • remotePath (required) - Remote destination path

Returns:

  • success - Boolean indicating success
  • message - Upload status message

ssh_download_file

Download a file from the remote server.

Parameters:

  • connectionId (required) - ID from ssh_connect
  • remotePath (required) - Remote file path
  • localPath (required) - Local destination path

Returns:

  • success - Boolean indicating success
  • message - Download status message

ssh_list_files

List files in a directory on the remote server.

Parameters:

  • connectionId (required) - ID from ssh_connect
  • remotePath (required) - Directory path to list

Returns:

  • files - Array of file objects with properties:
    • filename - File name
    • isDirectory - Boolean indicating if it's a directory
    • size - File size
    • lastModified - Last modification time

ssh_disconnect

Close an SSH connection.

Parameters:

  • connectionId (required) - ID from ssh_connect

Returns:

  • success - Boolean indicating success
  • message - Disconnection status message

Security Notes

  • Store SSH private keys securely
  • Use key-based authentication when possible
  • Limit SSH access to specific IP addresses
  • Keep your server updated
  • Use strong passwords or passphrases (minimum 8 characters)
  • Secure physical access to console ports and USB-to-Serial adapters
  • Consider setting up environment variables in a .env file for sensitive information

Development

To modify or extend the server:

  1. Edit source files in src/
  2. Rebuild: npm run build
  3. Test your changes
  4. Restart Claude Desktop or VS Code to pick up changes

Running in Development Mode

For quick testing during development:

npm run dev

Contributing

Contributions for additional tools and features are welcome. Please feel free to submit pull requests or open issues for enhancements and bug fixes.

License

MIT License