Back to Home
fairyto2 icon

remote-shell-mcp-server

by fairyto2

Overview

Provides a Model Context Protocol (MCP) service for AI assistants to securely manage SSH connections, execute commands, perform file operations, and maintain multi-turn interactive sessions on remote servers.

Installation

Run Command
uv run python remote_main.py

Environment Variables

  • MCP_SSH_LOG_LEVEL
  • MCP_SSH_TIMEOUT
  • MCP_SSH_CONFIG
  • MCP_SSH_HOST
  • MCP_SSH_PORT
  • MCP_SSH_CONFIG_FILE
  • MCP_SSH_JWT_SECRET
  • MCP_SSH_API_KEYS
  • MCP_SSH_ALLOWED_IPS
  • MCP_SSH_RATE_LIMIT
  • MCP_SSH_ENABLE_CORS
  • MCP_SSH_CORS_ORIGINS
  • MCP_SSH_MAX_SESSIONS
  • MCP_SSH_CLEANUP_HOURS
  • MCP_SSH_KEEPALIVE

Security Notes

The default remote server configuration (`config/remote_config.json`) sets `enable_auth: false`, which is a critical security vulnerability for any network-exposed service. It also uses a placeholder `jwt_secret`. In `SSHConnectionManager`, `paramiko.AutoAddPolicy()` is used, automatically adding new host keys without verification, which is susceptible to Man-in-the-Middle attacks. Command execution directly uses input arguments from MCP requests, making robust authentication to the MCP server itself paramount. It's not safe for production use without configuring authentication and strong secrets.

Similar Servers

Stats

Interest Score0
Security Score4
Cost ClassLow
Avg Tokens50
Stars0
Forks0
Last Update2026-01-19

Tags

SSHRemote ExecutionAI AgentModel Context ProtocolPython