remote-admin-mcp
Enables AI assistants to manage remote servers via SSH with agentless command execution, file operations, and service management.
README
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
sudoausfü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
- Kopiere
.env.examplezu.env:
cp .env.example .env
- Bearbeite
.envmit 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-Namecommand(string): Auszuführender Befehluse_sudo(boolean): Mit sudo ausführen
read_file
Lese eine Datei vom Remote-Server.
Parameter:
server(string): Server-Namepath(string): Dateipfad
write_file
Schreibe eine Datei auf den Remote-Server.
Parameter:
server(string): Server-Namepath(string): Dateipfadcontent(string): Dateiinhalt
get_service_status
Prüfe den Status eines systemd Services.
Parameter:
server(string): Server-Nameservice(string): Service-Name
manage_service
Verwalte einen systemd Service (start/stop/restart/reload).
Parameter:
server(string): Server-Nameservice(string): Service-Nameaction(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)
.envsollte 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.