my-mcp-ssh: MCP server for SSH connections and remote file operations

my-mcp-ssh: MCP server for SSH connections and remote file operations

my-mcp-ssh•byffpy

An MCP server that lets language models connect to remote servers over SSH, run commands, transfer files, and manage sessions.

License: Apache License, Version 2.0•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Connects to remote SSH servers and maintains multiple sessions, with tools to list and disconnect sessions.
  • •Executes commands on remote servers with optional stdin input and a configurable timeout.
  • •Uploads and downloads files between the local machine and remote servers.
  • •Supports credentials from a local credentials file with exact and wildcard pattern matching, and optional environment variable defaults.

BEST FOR

  • •Repeated connections to the same servers using environment variable defaults.
  • •Automated deployment scripts in CI/CD pipelines.
  • •Container deployments that need SSH defaults configured without modifying code.

ABOUT MY-MCP-SSH

my-mcp-ssh: MCP server for SSH connections and remote file operations is cataloged as an MCP server attributed to ffpy. An MCP server that lets language models connect to remote servers over SSH, run commands, transfer files, and manage sessions. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Apache License, Version 2.0. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for my-mcp-ssh: MCP server for SSH connections and remote file operations are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What happens when credentials are passed directly to the connect tool?

Parameters passed to the connect tool always override environment variables.

What are the default session timeout and maximum output length?

The session timeout defaults to 30 minutes, and the maximum command output length defaults to 5000 characters.

How are changes to the credentials file applied?

Credential file changes take effect immediately without restarting the server, because the file is read fresh on each connection attempt.

上游原版 README

在 GitHub 查看同一版本原文

README.md · bbf6df718d6f · 采集于 2026-11-13 12:22:34 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

my-mcp-ssh

EN doc CN doc

A Model Context Protocol (MCP) based SSH connection tool that allows large language models to securely connect to remote servers via SSH and perform file operations through the MCP protocol.

Features

  • SSH Connection Management: Connect to remote SSH servers
  • Command Execution: Execute commands on remote servers
  • File Transfer: Upload and download files
  • Session Management: Maintain and close SSH sessions

Installation

Dependencies

  • Python >= 3.12
  • uv package manager
# Clone the project
git clone https://github.com/ffpy/my-mcp-ssh.git

# Enter the project directory
cd my-mcp-ssh

# Install dependencies
uv sync

Usage

Configure in client

{
  "mcpServers": {
    "my-mcp-ssh": {
      "command": "uv",
      "args": [
        "--directory",
        "<your_path>/my-mcp-ssh",
        "run",
        "src/main.py"
      ],
      "env": {}
    }
  }
}

Environment Variables

SSH Connection Defaults (Optional)

Environment variables provide default values for SSH connections, useful when frequently connecting to the same server or in automated environments:

  • SSH_HOST: SSH server hostname or IP address
  • SSH_PORT: SSH server port
  • SSH_USERNAME: SSH username
  • SSH_PASSWORD: SSH password (if using password authentication)
  • SSH_KEY_PATH: SSH private key file path (if using key authentication)
  • SSH_KEY_PASSPHRASE: SSH private key passphrase (if needed)

When to use SSH environment variables:

  • Repeated connections: When connecting to the same server multiple times
  • CI/CD pipelines: For automated deployment scripts
  • Development environments: Set defaults for your commonly used servers
  • Container deployments: Configure defaults without modifying code

Note: Parameters passed to the connect tool always override environment variables.

Server Configuration

Additional server behavior can be configured:

  • SESSION_TIMEOUT: Session timeout in minutes, default is 30 minutes
  • MAX_OUTPUT_LENGTH: Maximum command output length in characters, default is 5000 characters

SSH Credentials File

For better security, you can store SSH credentials in a local configuration file instead of passing passwords as parameters.

  1. Copy the example file:
cp ssh-credentials.json.example ssh-credentials.json
  1. Edit ssh-credentials.json with your actual credentials:
{
  "root@192.168.1.100": "your_password",
  "admin@web-[0-9].example.com": "web_password",
  "deploy@server-{dev,test,staging}.company.com": "deploy_password",
  "admin@*.internal.network": "internal_password"
}

Supported Patterns:

  • * - matches any characters
  • ? - matches single character
  • [0-9] - matches any digit
  • {dev,test,staging} - matches any of the listed options

Authentication Priority Order:

  1. Parameters passed to connect tool (password, key_path)
  2. Exact match in credentials file (username@host)
  3. Pattern match in credentials file (wildcards)
  4. Environment variable password (SSH_PASSWORD)
  5. Environment variable key (SSH_KEY_PATH)
  6. Default SSH key (~/.ssh/id_rsa if exists)

Security:

  • File permissions are automatically set to 600 (owner read/write only)
  • The file is added to .gitignore to prevent accidental commits

Note:

  • Credential file changes take effect immediately without server restart
  • The file is read fresh on each connection attempt

Tool List

connect

Connect to an SSH server

Parameters:

  • host: SSH server hostname or IP address (optional)
  • port: SSH server port (optional, default 22)
  • username: SSH username (optional)
  • password: SSH password for authentication (optional)
  • key_path: SSH private key file path for authentication (optional)
  • key_passphrase: SSH private key passphrase if needed (optional)

disconnect

Disconnect from an SSH session

Parameters:

  • session_id: The session ID to disconnect

list_sessions

List all active SSH sessions

Parameters:

  • None

execute

Execute a command on the SSH server

Parameters:

  • session_id: Session ID
  • command: Command to execute
  • stdin: Input string to provide to the command, default is empty
  • timeout: Command timeout in seconds, default is 60 seconds

upload

Upload a file to the SSH server

Parameters:

  • session_id: Session ID
  • local_path: Local file path
  • remote_path: Remote file path

download

Download a file from the SSH server

Parameters:

  • session_id: Session ID
  • remote_path: Remote file path
  • local_path: Local file path

Debugging

Run ./inspector.sh for online debugging

License

my-mcp-ssh is licensed under the Apache License, Version 2.0

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for my-mcp-ssh: MCP server for SSH connections and remote file operations from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/my-mcp-ssh)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools