Skip to main content
Glama
remote-admin-mcp

remote-admin-mcp

by intershopper

SSH MCP Server

MCP Server für SSH-basierte Server-Administration. Ermöglicht KI-Assistenten die Verwaltung von Remote-Servern via SSH.

Supported MCP Clients

graph LR
    subgraph Getestet
        K[Kiro CLI]
        C[Claude Desktop]
    end
    subgraph Kompatibel
        A[Alle MCP-fähigen Clients<br/>stdio + StreamableHTTP]
    end
    K --> MCP[SSH MCP Server]
    C --> MCP
    A --> MCP

Client

Transport

Status

Kiro CLI

stdio

✅ getestet

Claude Desktop

stdio

✅ getestet

Jeder MCP-Client

stdio / StreamableHTTP

✅ kompatibel

Related MCP server: cygnus-ssh-mcp

Features

Verwalte Linux-Server per SSH — direkt aus dem KI-Assistenten heraus. Keine Agents, Daemons oder Tools auf den Zielservern nötig. Nur ein SSH-Zugang reicht.

graph LR
    AI[KI-Assistent] -->|MCP| S[SSH MCP Server]
    S -->|SSH/SFTP| R1[Server 1]
    S -->|SSH/SFTP| R2[Server 2]
    S -->|SSH/SFTP| RN[Server N]
  • Agentless: Kein Setup auf den Zielservern — funktioniert mit jedem SSH-Zugang

  • Remote Command Execution: Einzelbefehle oder mehrzeilige Scripts ausführen

  • Sudo Support: Befehle mit sudo ausführen, ohne interaktives Passwort

  • File Operations: Dateien lesen (teilweise/komplett), schreiben, suchen, chirurgisch editieren

  • File Transfer: Upload/Download via SFTP

  • Service Management: Systemd Services starten, stoppen, restarten, Status prüfen

  • Code Navigation: Funktions-/Klassen-Übersicht aus Quelldateien extrahieren (grep-basiert, kein Language Server nötig)

  • Multi-Server: Beliebig viele Server parallel verwalten

  • Connection Pooling: SSH-Verbindungen werden 5 Minuten wiederverwendet

  • User Approval: Schreibende Operationen erfordern Bestätigung durch den Operator

  • Audit Log: Alle Aktionen werden protokolliert (Pfad konfigurierbar)

Installation

Von PyPI

pip install remote-admin-mcp

Mit uv (empfohlen für Entwicklung)

# Virtuelle Umgebung erstellen und Abhängigkeiten installieren
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"

Mit pip

# Virtuelle Umgebung erstellen
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Abhängigkeiten installieren
pip install -e ".[dev]"

Konfiguration

  1. Kopiere .env.example zu .env:

cp .env.example .env
  1. Bearbeite .env mit deinen Server-Zugangsdaten:

SSH_SERVER_1_NAME=production
SSH_SERVER_1_HOST=prod.example.com
SSH_SERVER_1_PORT=22
SSH_SERVER_1_USER=admin
SSH_SERVER_1_PASSWORD=your-password

SSH_SERVER_2_NAME=staging
SSH_SERVER_2_HOST=staging.example.com
SSH_SERVER_2_PORT=22
SSH_SERVER_2_USER=deploy
SSH_SERVER_2_PASSWORD=your-password

MCP Tools

list_servers

Liste alle konfigurierten Server auf.

execute_command

Führe einen Befehl auf einem Remote-Server aus.

Parameter:

  • server (string): Server-Name

  • command (string): Auszuführender Befehl

  • use_sudo (boolean): Mit sudo ausführen

read_file

Lese eine Datei vom Remote-Server.

Parameter:

  • server (string): Server-Name

  • path (string): Dateipfad

write_file

Schreibe eine Datei auf den Remote-Server.

Parameter:

  • server (string): Server-Name

  • path (string): Dateipfad

  • content (string): Dateiinhalt

get_service_status

Prüfe den Status eines systemd Services.

Parameter:

  • server (string): Server-Name

  • service (string): Service-Name

manage_service

Verwalte einen systemd Service (start/stop/restart/reload).

Parameter:

  • server (string): Server-Name

  • service (string): Service-Name

  • action (string): Aktion (start/stop/restart/reload)

Verwendung mit KI-Assistenten

Kiro CLI / Claude Desktop (uvx — empfohlen)

Kein manuelles Installieren nötig — uvx lädt und cached das Paket automatisch:

{
  "mcpServers": {
    "ssh": {
      "command": "uvx",
      "args": ["remote-admin-mcp"],
      "env": {
        "SSH_SERVER_1_NAME": "production",
        "SSH_SERVER_1_HOST": "prod.example.com",
        "SSH_SERVER_1_USER": "admin",
        "SSH_SERVER_1_KEY_FILE": "~/.ssh/id_ed25519"
      }
    }
  }
}

Alternative: Mit .env-Datei

{
  "mcpServers": {
    "ssh": {
      "command": "uvx",
      "args": ["--env-file", "/path/to/.env", "remote-admin-mcp"]
    }
  }
}

Alternative: Lokale Installation

{
  "mcpServers": {
    "ssh": {
      "command": "/path/to/.venv/bin/ssh_mcp_server"
    }
  }
}

Beispiele

Log-Analyse:

"Zeige mir die letzten 100 Zeilen vom nginx error log auf production"

Service Restart:

"Starte den nginx Service auf staging neu"

Config ändern:

"Lies die nginx.conf auf production und erhöhe worker_processes auf 4"

Sicherheit

  • Schreibende Tools erfordern User-Approval durch den MCP Client

  • Lese-Tools (list_servers, read_file, search_in_file, get_file_structure) sind auto-approved

  • SSH-Key-Authentifizierung empfohlen (Passwort-Auth möglich)

  • .env sollte NICHT ins Git committed werden

Audit Log

Alle Aktionen werden in ein Logfile geschrieben:

[2026-04-12 13:14:00] [production] execute: tail -100 /var/log/syslog
[2026-04-12 13:14:05] [production] write_file: /etc/nginx/nginx.conf — Config update

Default: ~/.ssh-mcp-audit.log. Konfigurierbar per Environment-Variable:

SSH_MCP_AUDIT_LOG=/var/log/ssh-mcp-audit.log

Entwicklung

# Tests ausführen
pytest -v

# Linting
ruff check src/

Lizenz

MIT — siehe LICENSE

Available Tools

9 tools
executeA

Execute a command or multi-line script on a remote server via SSH. For single commands use command, for multi-line scripts use script. Requires approval.

Inputs: server (required), reason, script, command, +2 more.

get_file_structureA

Get an overview of functions, classes and key definitions in a source file. Returns symbol names with line numbers. Use this to understand a large file before reading or editing specific sections.

Inputs: path (required), server (required), language.

list_serversA

List all configured SSH servers with their connection details. Call this first to discover available server names.

Inputs: no named parameters.

read_fileA

Read a file or specific line range from a remote server. For large files (>200 lines), always use lines+offset to read only the relevant section. Use tail=true to read from end (e.g. log files).

Inputs: path (required), server (required), tail, lines, +1 more.

replace_in_fileA

Replace a specific text passage in a remote file without loading the full content. Preferred over write_file for editing large files. Returns error if old_text not found. Supports dry_run preview.

Inputs: path (required), server (required), new_text (required), old_text (required), +3 more.

search_in_fileA

Search for a text pattern in a remote file using grep. Returns matching lines with line numbers and surrounding context. Use this to locate code sections before editing.

Inputs: path (required), server (required), pattern (required), max_matches, +1 more.

serviceA

Manage or query a systemd service. Use action=status to check, or start/stop/restart/reload to control. Actions other than status require sudo.

Inputs: action (required), server (required), service (required), reason.

transfer_fileA

Transfer a file between local machine and remote server via SFTP. Use direction=upload to send, direction=download to receive.

Inputs: server (required), direction (required), local_path (required), remote_path (required), +1 more.

write_fileA

Overwrite an entire file on remote server via SFTP. WARNING: replaces full file content. For surgical edits on large files, use replace_in_file instead. Requires approval.

Inputs: path (required), server (required), content (required), reason.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool has a clear, distinct purpose: server discovery, command execution, file reading/writing/transfer, service control, and file inspection/editing. The overlap between write_file and replace_in_file is explicitly disambiguated by descriptions, and file-reading tools are differentiated by intent (full read, search, structure).

    Naming Consistency4/5

    Most tools follow a verb_noun pattern (list_servers, read_file, write_file, transfer_file, search_in_file, replace_in_file), with a couple of exceptions: 'execute' is a bare verb and 'service' is a noun used as a command. However, the pattern is recognizable and predictable overall.

    Tool Count5/5

    9 tools is well-scoped for a remote administration server. Each tool covers a necessary function without bloat, and the count is within the ideal range for a specialized MCP server.

    Completeness4/5

    The tool surface covers the core remote admin workflows: discovering servers, executing commands, reading/editing/writing files, transferring files, and managing services. Minor gaps exist (e.g., no explicit directory listing or delete/rename file tool), but these can be worked around via the execute tool.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to securely connect to and manage remote servers via SSH, supporting command execution, file transfers via SFTP, and multi-server management with both password and SSH key authentication.
      9
      62 npm
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to manage remote servers via SSH with 43 specialized tools for command execution, file editing, directory operations, and background tasks across Linux, macOS, and Windows.
      46
      87 PyPI
      9
      GPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to securely execute commands, transfer files, and manage port forwarding on remote servers via SSH.
      158 npm
      38
      Apache 2.0