Mcp Sftp Orchestrator

io.github.fkom13Published by GitHub account fkom13v8.0.4Updated Oct 24, 2026

Serveur MCP pour l'orchestration de tâches distantes (SSH/SFTP) avec une file d'attente persistante.

Overview

AI-generated overview

A local stdio MCP server that lets an assistant orchestrate a fleet of remote servers over SSH/SFTP, with a persistent job queue, file editing, diffs, snapshots

What you can do
Run commands over SSH on one alias, several aliases, a group or all servers, with a persistent queue, retries and logs; open interactive and sequenced command sessions and remote tmux sessions and SSH tunnels. Read, write and hash-safe edit local and remote files, transfer files over SFTP including server-to-server, and diff files, folders and project sources. Manage the fleet: server aliases and groups, SSH public-key authorization, command blocklists, API catalogue, server notes, projects and work sessions. Audit and monitor: infrastructure overview and audit, fleet status, inventory, CPU/RAM/disk, systemd/Docker/PM2 services, Fail2Ban, API health checks and logs. Create, list, diff, and,
When to use it
Useful when an assistant has to operate several remote Linux servers from one place: deploying or fixing files, running commands across a fleet, comparing local and remote project trees, or keeping notes and snapshots of interventions. It fits operators who already manage servers over SSH and want the agent to work inside that same access model.
Requirements
Runs locally as a Node.js process (Node.js 18 or later) over stdio, started by the MCP client with the server script path. SSH access to the target hosts is needed, configured through server aliases holding a key path or password. Optional environment variables set the data directory, timeouts, connection pool, allowed local roots, read-only mode and debug logging.
Before you install
It grants broad remote control: commands run over SSH, files are written and edited, keys are added to authorized_keys, and tunnels are opened, so a misdirected call can change or delete data on production hosts. Server aliases can store SSH passwords in a local JSON file, and the API catalogue holds secrets, though tools mask them on read. Destructive commands are dry-run by default and a blocklist and read-only modes exist, but skip_policy and force can bypass them. Prefer key paths over plain

Installation

In SourceWeft

  1. Open Mcp Sftp Orchestrator in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

🚀 MCP Orchestrator — Serveur d'orchestration SSH/SFTP

v11.8.0 Security Refresh — Les 82 tools publient désormais les annotations MCP standard. infra_overview reste léger sans argument, mais infra_overview { alias: "..." } effectue une découverte live et corrèle Nginx/domaines, ports, Docker/Compose et services. Voir CHANGELOG.md.

Version : 11.8.0
Tools : 82
License : MIT
Node : >= 18.0.0
Changelog : CHANGELOG.md

Serveur MCP (Model Context Protocol, transport stdio) qui donne à un agent IA la capacité d’orchestrer un parc de serveurs : SSH, SFTP, édition de fichiers locale/remote (hash-safe), diffs cross-server, shell PTY, snapshots d’infra, notes de protocole, projets, sessions de travail, inventaire, trust SSH (pubkey), groupes d’alias et audit parc.


✨ Points forts (v11.6)

DomaineCapacité
Exécutiontask_exec multi-serveur / group:oci / dry-run destructif / force
Fichiersfile_read / file_edit (chirurgical) / file_write + hash + dryRun + backup
Parcnotes, infra_audit, fleet_status, server_inventory
Projetsregistre local↔remote + project_diff
Travailwork_start → edits → work_end (note d’intervention auto)
Trustssh_authorize_key (pubkey only, dry_run par défaut)
Sécusecrets masqués, RO global + RO par alias, blocklist, pool SSH robuste

📦 Installation

bash
git clone https://github.com/fkom13/mcp-sftp-orchestrator.gitcd sftp-mcp   # ou tools/sftp-mcpnpm installcp .env.example .env# Éditer MCP_DATA_DIR et chemins de clés

Prérequis : Node.js >= 18


⚙️ Configuration (.env)

Toutes les variables sont optionnelles.

VariableDéfautDescription
MCP_DATA_DIR~/.config/mcp-orchestratorDossier data (JSON, snapshots, projets…)
MCP_SYNC_TIMEOUT_S120Délai (s) avant passage d’une tâche en arrière-plan
MCP_DEFAULT_CMD_TIMEOUT_S600Timeout SSH commande (s). 0 = infini
MCP_INTERACTIVE_CMD_TIMEOUT_S300Timeout interactif (s). 0 = infini
MCP_MAX_WAIT_TIMEOUT_S600Timeout max task_wait (s)
MAX_CONNECTIONS_PER_SERVER5Pool SSH max / serveur
MIN_CONNECTIONS_PER_SERVER1Pool SSH min / serveur
IDLE_TIMEOUT300000Fermeture connexion inactive (ms)
KEEP_ALIVE_INTERVAL30000Keepalive SSH (ms)
MAX_QUEUE_SIZE1000Taille max queue jobs
SAVE_INTERVAL5000Autosave queue (ms)
MCP_ALLOWED_ROOTS(vide)Racines autorisées pour paths locaux (CSV)
MCP_READONLYfalse1 = refuse écritures / exec mutantes (global)
MCP_COMPACTfalse1 = réponses tronquées (tokens agent)
MCP_DEBUGfalseLogs détaillés stderr

Fichiers sous MCP_DATA_DIR

FichierContenu
servers.jsonAlias SSH (host, user, keyPath/password, port?, readonly?)
apis.jsonCatalogue APIs (secrets masqués en lecture tools)
queue.json / queue.backup.jsonJobs
history.jsonHistorique tâches
server_notes.jsonProtocoles / notes par serveur
server_groups.jsonGroupes d’alias
projects.jsonRegistre projets
work_sessions.jsonSessions de travail
policies.jsonBlocklist commandes
tunnels.json / tunnel_allowlist.jsonTunnels SSH
infra_snapshots/Snapshots content-addressable

🔌 Connexion client MCP

Grok / config.toml

toml
[mcp_servers.orchestrator]command = "node"args = ["/chemin/absolu/sftp-mcp/server.js"]# optionnel:# env = { MCP_DATA_DIR = "/chemin/absolu/sftp-mcp/data" }

OpenCode / Claude Desktop (JSON)

json
{  "mcpServers": {    "orchestrator": {      "command": "node",      "args": ["/chemin/absolu/sftp-mcp/server.js"],      "env": {        "MCP_DATA_DIR": "/chemin/absolu/sftp-mcp/data"      }    }  }}

Après modification du code : recharger le serveur MCP (/mcps → r ou restart session). Vérifier system_diagnostics → version: "11.8.0".


🧰 Référence des outils (82)

Diagnostic & audit

OutilDescription
helpGuide outils + .env + astuces
guideManuel IA (workflows, cheatsheet, pitfalls, audit, security)
system_diagnosticsQueue, pool, serveurs/APIs masqués, version, readOnly
infra_auditSynthèse parc + projets + notes + crashed
infra_overviewServeurs + notes (vue légère)
fleet_statusPing SSH parallèle (latence, load, disk)
server_inventoryInventaire léger (pm2/docker/disk/home, cache 10 min)

Serveurs & groupes

OutilDescription
server_addCRUD alias (keyPath ou password, port, readonly)
server_listListe (passwords masqués)
server_removeSupprime un alias
server_group_list/set/removeGroupes (oci, contabo…). Usage : group:oci ou nom de groupe

Projets (v11.6)

OutilDescription
project_list / project_get / project_set / project_removeRegistre
project_resolve→ { local, remote, ignore, runtime }
project_diffDiff local↔remote du projet

Exemple project_set :

json
{  "name": "p-image",  "local": { "path": "/home/.../dev-serveur/p-image" },  "servers": {    "prod": {      "alias": "fkomprodmini2_prod",      "path": "/home/ubuntu/p-image",      "runtime": { "pm2": "p-image", "port": 5002 },      "url": "https://pruna.esprit-artificiel.com"    }  },  "ignore": ["node_modules", ".git", "data"]}

Sessions de travail (v11.6)

OutilDescription
work_startOuvre un journal (alias, project, tag, snapshot optionnel)
work_logEvent (file_edit, task_exec, …)
work_listSessions actives (+ historique)
work_endClôture + server_note last_intervention

Trust SSH (v11.6)

OutilDescription
ssh_authorize_keyAjoute une pubkey dans authorized_keys distant. dry_run défaut. Sources : string | local_path | alias
json
{  "target_alias": "fkomprodmini1_prod",  "source": { "type": "alias", "alias": "vps_contabo" },  "comment": "fleet-from-contabo",  "dry_run": true}

Policies

OutilDescription
policy_blocklist_list/add/removeBlocklist commandes (aussi appliquée à shell + sequences)

Catalogue API

OutilDescription
api_add / api_list / api_remove / api_checkMonitoring (clés masquées en list)

Exécution de tâches

OutilDescription
task_execSSH ; alias | tableau | all | group:x ; dry_run/force destructif
task_exec_interactivePrompts yes/no, menus
task_exec_sequenceSéquence sur un serveur (policy par étape)
task_transferSFTP upload/download/server_to_server
task_transfer_multiMulti + globs

Files / Diff / Shell / Snapshots

FamilleOutils
Filesfile_read, file_write, file_edit
Diffdiff_files, diff_folders, compare_all_sources
Shellshell_create, shell_exec (+ skip_policy), shell_list, shell_close
Snapshotssnapshot_create/list/diff/restore/delete

Édition safe : file_read → hash → file_edit + expectedHash (+ dryRun / backup).

Notes serveur

OutilDescription
server_note_set/get/list/removeProtocole (description, services, warnings, intervention)

Monitoring & logs

OutilDescription
get_system_resourcesCPU / RAM / disque
get_services_statussystemd / Docker / PM2
get_fail2ban_statusFail2Ban
check_api_healthHTTP via SSH+curl
get_pm2_logs / get_docker_logs / tail_fileLogs

Queue

OutilDescription
task_queue / task_status / task_history / task_wait / task_logsSuivi
task_retry / task_retry_allRelance
task_purgePurge (dry_run défaut)
queue_stats / pool_statsStats

Tmux & tunnels

OutilDescription
tmux_create/exec/read/list/killSessions tmux distantes
tunnel_create/list/closeTunnels SSH local/remote/socks
tunnel_allowlist_add/removePorts autorisés pour tunnels

📖 Workflows agent recommandés

Début de session

infra_audit  (ou infra_overview)fleet_statusproject_list / project_resolve

Chantier sur un projet

work_start { project: "p-image", alias: "fkomprodmini2_prod", tag: "fix-x", message: "…" }file_read → file_edit (expectedHash, dryRun puis apply)work_log { type: "file_edit", path: "…" }work_end { summary: "…" }   → note serveur mise à jourproject_diff { name: "p-image" }

Commandes longues

task_exec { timeout: 0, … }  → si > syncTimeout → task_wait { id }

Cibles multi-serveurs

task_exec { alias: "group:oci", cmd: "hostname" }task_exec { alias: "all", cmd: "uptime" }

🏗️ Architecture

Client MCP (stdio)    │server.js ─── 82 tools    │    ├── queue.js          File d’attente persistante + purge/retry    ├── ssh.js / sshPool  Exécution + pool (retry safe, port configurable)    ├── sftp.js           Transferts (server_to_server via sourceAdapter/pool)    ├── sourceAdapter.js  Local fs | remote SFTP pool    ├── fileOps.js        Read/write/edit + hash + dryRun + backup    ├── diffEngine.js / compareEngine.js / diffFormatter.js    ├── shellSessions.js  PTY persistants + policy    ├── snapshotManager.js    ├── projects.js / workSession.js / inventory.js / groups.js / fleet.js    ├── sshTrust.js       authorized_keys (pubkey only)    ├── servers.js / apis.js / notes.js / policies.js / tunnels.js    ├── history.js / guide.js / config.js / utils.js

Cycle de vie d’un job

pending → running → completed | failed | partial                      ↓ (redémarrage MCP pendant running)                    crashed → task_retry → pending

🔒 Sécurité

MécanismeDétail
SecretsMasqués en api_list / diagnostics (*** + 4 derniers car.)
Shell escapeescapeShellArg sur curl, logs, chemins
Blocklistpolicies.json ; shell + sequence inclus ; skip_policy pour forcer
RO globalMCP_READONLY=1
RO alias"readonly": true dans servers.json
Destructiftask_exec dry-run si pattern dangereux sans force:true
TrustPubkey only ; dry_run par défaut
ClésPréférer keyPath SSH ; Vaultwarden pour secrets API

🧪 Tests

bash
npm test:unit    # p0 + p1 + p16 (43 tests)npm test         # unit + smoke MCP + featuresnode diagnose.js # diagnostic local optionnel
FichierCouverture
test_p0_unit.jsutils, policies, redact, timeouts, version
test_p1_unit.jsgroups, purge, destructive, RO env
test_p16_unit.jsprojects, work session, compact, sshTrust
test_mcp.jssmoke SDK
test_features.jsqueue / pool / globs / prompts

🛣️ Versions récentes

VersionContenuSnapshot gencodedoc
11.6.1Hardening multi-agent: RO transversal, server-to-server dossiers/force, allowed roots anti-symlink, quoting shell/tmux, queue + JSON stores atomiques—
11.6.0Projets, work sessions, inventory, ssh_authorize_key, RO alias, compact#23 (final docs)
11.4.0fleet, infra_audit, groups, retry_all, purge, pool rewrite#21
11.3.0Secrets mask, policy shell/seq, port SSH, wait partial#20
10.4–10.0file ops, diff, shell, snapshots, notes, guide#17–19
9.x / 8.xSFTP force, timeouts, interactif, sécu de base—

Détail : CHANGELOG.md · plans historiques : ROADMAP.md, ROADMAP_EXTENDED.md.


📄 Licence

MIT — Copyright (c) 2025-2026 Franck (fkom13)

Source: README.md at commit 91725bf

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v8.0.4LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.