Skip to main content

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

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

Metadata

Release files for remote-admin-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remote-admin-mcp 0.2.0
File Size Uploaded Provenance Actions
remote_admin_mcp-0.2.0.tar.gz 83.1 kB With provenance Details for remote_admin_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for remote-admin-mcp 0.2.0
File Interpreter ABI Platform Actions
remote_admin_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for remote_admin_mcp-0.2.0-py3-none-any.whl

Total release size: 97.7 kB

Release files / remote_admin_mcp-0.2.0.tar.gz

Download URL remote_admin_mcp-0.2.0.tar.gz
Size 83.1 kB
Tags Source
SHA-256 checksum
How to use checksums
43870902e5851da10ef4ef20093c0a41b4251b1001eb09e2f7cd1fbc49eb4c61
BLAKE2b-256 checksum
How to use checksums
50506049d6c278e32e9ccc201271bdd8e05887d5d572a364ef124e8e55443023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / remote_admin_mcp-0.2.0-py3-none-any.whl

Download URL remote_admin_mcp-0.2.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1e7d8d378f9284f5337b681623375ac3f0dfba3df47f91886e50c2c4a674383
BLAKE2b-256 checksum
How to use checksums
37da12f027a2cd6694bf176da75b376800bcd74a3a1e4d15360c5780655fcbb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Security for remote-admin-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for remote_admin_mcp-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page