11im
MCP Server11impublic

python mcp remote ssh

一个通过SSH访问远程文件系统的MCP服务器实现,支持文件读写、目录操作和命令执行。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

一个通过SSH访问远程文件系统的MCP服务器实现,支持文件读写、目录操作和命令执行。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Remote SSH MCP Server

An implementation of an MCP (Message Control Protocol) server that accesses a remote file system through SSH. This project provides functionality to connect to remote servers via SSH and manage their file systems.

Features

  • Remote file system access via SSH
  • Remote file reading/writing
  • Remote directory listing
  • File searching
  • Remote command execution
  • MCP protocol support

Requirements

  • Python 3.7+
  • paramiko library
  • mcp package

Installation

Install the required libraries:

pip install paramiko mcp

Usage

Running from the Command Line

python main.py --hostname example.com --port 22 --username user --password pass --base-path /home/user

Using a Configuration File

  1. Create an SSH configuration file (e.g., ssh_config.json):
{
  "hostname": "example.com",
  "port": 22,
  "username": "your_username",
  "password": "your_password",
  "base_path": "/home/your_username"
}
  1. Run using the configuration file:
python main.py --config ssh_config.json

MCP Configuration File

To integrate the MCP server with other MCP clients, you can use a configuration file in the following format:

{
  "mcpServers": {
    "remote-ssh-file-server": {
      "command": "python",
      "args": ["main.py", "--config", "ssh_config.json"],
      "cwd": "/path/to/py-mcp-ssh"
    }
  }
}

Command Line Options

OptionDescription
--configPath to SSH configuration JSON file
--hostnameSSH server hostname
--portSSH server port (default: 22)
--usernameSSH username
--passwordSSH password
--key-filePath to SSH key file
--base-pathBase working directory (default: /)

MCP API List

API NameDescription
remote_read_fileRead a remote file
remote_write_fileWrite to a remote file
remote_list_directoryList the contents of a remote directory
remote_search_filesSearch for files on the remote server
remote_execute_commandExecute a command on the remote server

Security Considerations

  • Using key file authentication instead of password is better for security.
  • Avoid storing passwords as plaintext in configuration files.
  • Restrict base_path to a specific user directory instead of root (/) to enhance security.

Quick Start

1

Clone the repository

git clone https://github.com/11im/python-mcp-remote-ssh
2

Install dependencies

cd python-mcp-remote-ssh
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Owner11im
Repopython-mcp-remote-ssh
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation