
Cygnus Ssh Mcp
io.github.cygnussystemsPublished by GitHub account cygnussystemsv1.5.1Updated Oct 24, 2026
SSH-based MCP control of remote Linux, macOS, and Windows servers -- 46 purpose-built tools.
Overview
A local MCP server that gives an AI assistant 46 SSH tools to run commands, edit files and manage processes on remote Linux, macOS and Windows servers.
- What you can do
- Connect to configured hosts by alias or user@host, check status, sudo access and system info, and manage the host list and config files. Run shell commands with timeouts, check status, read output, kill commands and review history. Launch, poll and kill background tasks. Read, write, copy, move and transfer files, and edit config files line by line with match-based replace, insert and delete. List, search, size, copy, delete and transfer directories, and create or extract tar.gz archives.
- When to use it
- Useful when you want an assistant to administer real remote machines over SSH: inspecting hardware and logs, patching configuration files, deploying artifacts, restarting services, or auditing open ports and firewall rules across several hosts.
- Requirements
- Runs locally as a Python package (pip or uvx), so Python must be on PATH. Each target needs a running SSH server. Hosts are defined in a TOML file (default ~/.mcp_ssh_hosts.toml, or a path passed with --config) with port plus a password or keyfile, and optional alias, sudo_password and key_passphrase. Network access to the targets is required.
Installation
In SourceWeft
- Open Cygnus Ssh Mcp in the dashboard and add it to a workspace.
- 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
cygnus-ssh-mcp
Cross-platform SSH MCP server with 46 purpose-built tools for real server management by AI agents
[PyPI version] [Python] [License: GPL v3] [Tests]
Give Claude, OpenCode, or any MCP-compatible AI assistant full control of your Linux, macOS, and Windows servers with 46 specialized tools
Prerequisites · Installation · Quick Start · Features · Documentation
[!TIP] A note from the author: I've been running this daily since April 2025 — over a year now — to manage a dozen+ machines and devices, plus a Proxmox host running 30+ containers, across a network tied together with Tailscale. It started as a tool to solve my own problem, and it's saved me a huge amount of manual work ever since. After a year of running it against Linux, I've since added support for Windows, macOS, and other devices with reduced shells like BusyBox. I'm open-sourcing it now because I think anyone running real infrastructure will find it just as useful. This is a young public repo, but the tool behind it isn't new or unproven — it's been battle-tested against my own servers for over a year.
If you find it useful, a ⭐ star or a mention to someone who manages their own infrastructure goes a long way for a project this new — thank you!
Why cygnus-ssh-mcp?
cygnus-ssh-mcp is an MCP server - usable from Claude Desktop, Claude Code, OpenCode, or any other MCP-compatible client - that connects your AI assistant directly to your remote servers over SSH, exposing 46 purpose-built tools instead of one generic command-runner. It turns natural-language requests into real systems administration - connecting by alias, editing files, managing background processes, handling sudo - across Linux, macOS, and Windows targets alike.
Doing that properly means solving a pile of genuinely hard, per-platform problems
that a naive ssh wrapper never has to face - and that this project hit and fixed
the hard way, including:
- Getting a real PID back from a Windows target, instead of a meaningless local channel number
- Recovering the actual exit code when Win32-OpenSSH silently flattens it to
1 - Reading file contents via SFTP instead of
Get-Content, because PowerShell's console encodes stdout in its OEM code page and corrupts anything non-ASCII - Killing a
sudo'd background process without leaving its privileged child orphaned or blindly firing SIGKILL at the wrong PID
None of this shows up until you actually run these tools against real Linux, macOS, and Windows targets under real conditions - which is exactly how every one of these was found and fixed here, not guessed at from documentation.
Beyond Linux, macOS, and Windows, cygnus-ssh-mcp can also reach further -
routers, NAS boxes, and other non-standard SSH targets connect too, via a
flex platform type and a capability probe that detects what each device's
shell can actually do. See Connecting to Alternate Platforms below.
[!WARNING] Alternate-platform (
flex) support is a work in progress. It's been verified against several real devices, but the space of routers/NAS/embedded systems is huge - expect rough edges on hardware that hasn't been tried yet.
Example agent tasks
Ask your MCP-capable agent to:
- "Check disk space, memory, uptime, and recent logs on my
webhost." - "Patch this remote config file safely and show me the diff."
- "Upload this build artifact, extract it, and restart the service."
- "Start this command in the background and fetch the output later."
- "Inspect running processes on my Windows SSH host."
Prerequisites: SSH on Your Target Servers
cygnus-ssh-mcp connects over standard SSH - it doesn't provide SSH itself, so each server you want to manage needs an SSH server already installed and running.
Linux - usually pre-installed on server distros; if not:
macOS - enable Remote Login in System Preferences → Sharing, or from the terminal:
Windows (Server 2019+, or Windows 10/11) - OpenSSH Server is an optional feature:
See Windows Support for Windows Server 2016 and other edge cases.
Installation
Pick one of the two options below - they're independent tools that don't share storage, so commands from one won't see or affect what the other did.
Option A: pip (a persistent install)
Uninstalling or upgrading:
Option B: uvx (no install at all)
[!NOTE] What's
uvx? It's part ofuv(a fast Python package manager) -uvx <package>downloads a package into a disposable, isolated cache and runs it immediately, without installing it into your system Python, a project, or anywherepipcan see. Nothing lingers afterward for you to manage. It's the easiest option if you just want your MCP client to launch this server without thinking about Python environments at all.
There's nothing to "uninstall" - uvx re-resolves and re-fetches the latest
version on every run anyway. To force a fresh fetch or clear its cache instead:
If you want a uvx-style setup that does persist (so it doesn't re-fetch every
time) and can be upgraded deliberately, use uv tool install cygnus-ssh-mcp
instead - manage that with uv tool uninstall cygnus-ssh-mcp / uv tool upgrade cygnus-ssh-mcp. This is still separate from pip (Option A) - don't mix pip
commands with anything set up via uv/uvx, they can't see each other.
Quick Start
1. Add your hosts
You don't need to create anything by hand - the first time the server starts, it
automatically creates an empty host config file at ~/.mcp_ssh_hosts.toml (secure
0o600 permissions) if nothing is there yet. Just open that file (or use
ssh_conn_add_host from within your AI assistant) and add entries like:
Required fields: port + (password OR keyfile)
Optional fields: alias, description, sudo_password, key_passphrase
sudo_password is optional if your account uses password auth - when omitted, the
regular password is reused for use_sudo operations too. It's only required if
your sudo password differs from your login password, or if you're using SSH key
auth (keyfile) with no password field at all - in that case, either set
sudo_password explicitly or configure passwordless sudo on the server.
[!TIP] Host file locations: Default is
~/.mcp_ssh_hosts.toml. Falls back to./mcp_ssh_hosts.tomlif not found. Use--config /path/to/hosts.tomlfor a custom location. If a file already exists at whichever path is used, it is never overwritten or reset - auto-creation only ever happens when nothing is there yet.
[!WARNING] Watch for hidden file extensions. If you create this file yourself in Notepad or TextEdit, Windows and macOS both hide known extensions by default - a file you named
mcp_ssh_hosts.tomlcan silently actually be saved asmcp_ssh_hosts.toml.txt, and the server will never find it. Turn on "show file extensions" in Explorer/Finder, or verify from a terminal:ls -la ~/.mcp_ssh_hosts.toml*(macOS/Linux) ordir %USERPROFILE%\.mcp_ssh_hosts.toml*(Windows) - either should show exactly one file, with no extra extension after.toml.
2. Add to your MCP client
Most MCP clients (Claude Desktop, Claude Code, OpenCode, Cursor, Cline, Windsurf,
and others) use the same mcpServers JSON shape shown below - only the config
file's name and location differ per client. Claude Desktop is used as the concrete
example here; see the Claude Code note further down for one client that differs,
or check your own client's docs for its config file's path.
[!WARNING] Python must be on
PATHfor"command": "cygnus-ssh-mcp"(below) to work at all. This is the most common reason an MCP client fails to start the server (or the tool list never appears) - and with Python often installed in several different places on one machine, it's easy to hit. Check first with:If that fails with "not recognized"/"command not found", Python isn't on
PATH- fix that first (reinstall Python with "Add to PATH" checked on Windows, or add it to your shell profile), or work around it entirely by finding the full path to the installed executable instead:where cygnus-ssh-mcp(Windows) orwhich cygnus-ssh-mcp(macOS/Linux), then use that directly ascommand:
For Claude Desktop, edit claude_desktop_config.json:
Or with a custom hosts file location:
On Windows, use an absolute path with escaped backslashes (JSON needs \\, not
a single \):
Using Claude Code instead of Claude Desktop?
It reads its own project-level .mcp.json file (in your project root) rather than
claude_desktop_config.json, and its schema supports a couple of extra fields
Desktop doesn't have:
working_dir- the directory the server process runs from. Claude Desktop has no equivalent - it doesn't expose a configurable working directory at all, which is exactly why the Desktop examples above always use absolute paths.auto_start- whether Claude Code starts this server automatically. Claude Desktop always auto-starts every configured server; there's no toggle for it.
Everything else - the --config argument, and the PATH/backslash caveats from the
warning above - applies the same way to both clients.
3. Start managing servers
[!NOTE]
PRODin the examples below is just an example alias (alias = "prod"in the hosts file from step 1) - it's not a magic name. If a host doesn't have an alias configured, refer to it by its fulluser@hostkey instead, e.g. "Connect to [email protected] and..." or "Connect to [email protected] and...".Depending on which LLM/client you're using, it may not automatically realize it should reach for this MCP server - if it tries to answer without connecting, or claims it can't access remote servers, explicitly tell it to use the SSH MCP tools (e.g. "use the ssh MCP to connect to PROD and...").
Just say:
"Connect to PROD and tell me about the machine - hardware, status, everything"
"Connect to the GPU box and tell me how many graphics cards it has and how much total VRAM"
"Edit /etc/nginx/nginx.conf and change worker_connections to 2048"
"Find all .log files larger than 100MB in /var/log"
It handles multi-step jobs just as easily - install packages, edit configs, open firewall ports, and restart services, all in one request:
"Install PostgreSQL, set it to listen on all interfaces, add a pg_hba.conf rule for remote connections, open port 5432 in the firewall, and create a database called analytics"
"Set up a full LAMP stack, download the latest WordPress, configure wp-config.php with a new database, and get the site running at /var/www/wordpress"
"Get a Let's Encrypt certificate for example.com, configure nginx to serve it over HTTPS, and redirect all HTTP traffic to it"
"My Node app in /opt/api keeps crashing - check the logs, find out why, and set it up as a systemd service that restarts automatically"
"Audit PROD's security - check what ports are open, what's actually listening on them, whether the firewall rules match, and flag anything that looks like it shouldn't be exposed to the internet"
Platform Support
cygnus-ssh-mcp works from any client (Windows, Linux, macOS) to any target server:
Windows targets require OpenSSH Server installed and running.
Connecting to Alternate Platforms
[!WARNING] This is a work in progress. It's been verified against several real devices below, but routers/NAS/embedded systems vary enormously - expect to hit devices that don't work yet, and please open an issue if you do.
Beyond Linux, macOS, and Windows, cygnus-ssh-mcp connects to any SSH target
that responds to a basic shell command - routers, NAS boxes, BSD-kernel
appliances, and other embedded Linux devices. These report os_type: "flex".
On connect, a one-time capability probe checks the specific shell/coreutils
features this project's tools depend on (GNU find -printf, stat -c, du -sb, tar --strip-components, ps -o pgid=, xargs -0, and more) - many
embedded/BusyBox-based devices only support a smaller flag set than full GNU
coreutils. The results come back from ssh_conn_connect as capabilities
and, for anything missing, capability_warnings. A tool that needs a missing
capability fails with a clear error naming exactly what's unavailable and,
where one exists, a concrete fallback - nothing silently degrades. Where a
portable alternative exists (e.g. glob search and directory size without GNU
find -printf), the tool simply uses it.
The probe also checks that SFTP is usable: some devices have no SFTP at all
(OpenWrt), and some offer an SFTP that shows a different filesystem than the
shell (Synology DSM's share-only SFTP). Either way, SFTP-based file tools then
say so and point to ssh_cmd_run, instead of giving wrong answers.
Verified against (each by an automated suite that walks an everyday administration workflow and checks every tool's answer against the shell):
Known limitation: some devices reject SSH shell access entirely for an
account, even one with admin-level permissions - this shows up as every
command (even a bare echo) failing immediately after a successful login. No
capability probe can fix that; ssh_conn_connect explains the situation
in that failure rather than a generic error.
Full details, capability list, and current gaps: docs/26-alternate-platforms.md.
Features
Host Configuration
Stop typing credentials. Connect by alias.
Then just: "Connect to WEB"
Supports password, SSH key, and encrypted keys with passphrase.
Update a field on an existing host without losing the rest (ssh_host_update), or
switch every host tool to an alternate config file for the session
(ssh_host_use_config) - handy for keeping separate host lists per project or
environment.
Line-Level File Editing
Edit config files with surgical precision—no download/upload needed.
Safety built-in: Operations fail if the match isn't unique—no accidental mass edits.
Background Task Management
Launch long-running processes and check back later.
Comprehensive Sudo Support
Every tool supports use_sudo. Password is handled automatically.
Three-Way Timeout System
Never get stuck on a hanging command - and never lose track of a long one either.
io_timeout and wait_timeout never kill the remote command - they hand off to
background monitoring so you can check back later (ssh_cmd_check_status), read
output collected so far (ssh_cmd_output), or decide to end it early
(ssh_cmd_kill). Only runtime_timeout ever terminates anything.
A single call never blocks longer than 50 seconds (--max-wait /
MCP_SSH_MAX_WAIT), because many MCP clients (e.g. OpenCode) abort a tool call at 60s and
the handoff would be lost. Longer commands just return a normal wait_timeout handoff with
wait_capped: true - poll them, or use ssh_task_launch for anything that runs for minutes.
Full Unicode Support
Write and read files with emojis, international text, and special characters—on all platforms.
How it works: ssh_file_read and ssh_file_write use SFTP for direct binary transfer, completely bypassing shell encoding issues. This means Unicode works perfectly even on Windows targets where PowerShell's console encoding would normally corrupt special characters. The server's own PowerShell scripts write UTF-8 too, so file names in Windows results (delete previews, glob search, listings) keep their exact spelling. Line edits keep a file's own line endings (CRLF stays CRLF).
Windows Server Support
Full support for Windows targets with OpenSSH Server:
- PowerShell & CMD command execution
- Windows path handling (backslashes, drive letters, UNC paths)
- Administrator detection — shows if session has elevated privileges
- SFTP-based file operations — Unicode-safe, no encoding issues
Note: use_sudo is ignored on Windows (no sudo equivalent). For elevated operations, connect with an Administrator account.
And Much More...
- Command history with output retention and pattern filtering
- Recursive directory operations: search, copy, delete with dry-run
- Archive operations: create and extract tar.gz
- System info: OS version, memory, disk, CPU, uptime
- Pattern search: regex and plain text in files
- Alternate host config files: switch host lists per project/environment without restarting
All 46 Tools
Connection & Host Management (12 tools)
Command Execution (6 tools)
Background Tasks (3 tools)
File Operations (12 tools)
Directory Operations (11 tools)
Archive Operations (2 tools)
Documentation
Full docs site: cygnussystems.github.io/cygnus-ssh-mcp — searchable, with navigation. Or browse the raw files directly in docs/:
- Overview
- Installation
- Platform Compatibility
- Windows Support
- Alternate Platforms (flex)
- Host Configuration
- Tools Reference
- Command Execution
- Process Management
- Logging
- Claude Desktop Setup
Use Cases
- DevOps Automation — Deploy, configure, and manage servers via AI
- Log Analysis — Search and analyze logs across multiple servers
- Configuration Management — Edit configs with precision line operations
- Backup & Recovery — Create archives, transfer files, restore backups
- System Monitoring — Check status, verify services, monitor processes
- Security Auditing — Search for sensitive patterns, verify configurations
License
GPL-3.0 — Free and open source.
Built by Cygnus Systems
Star this repo if you find it useful!
Source: README.md at commit c02fd38
Tools
0Version history
1- v1.5.1LatestSep 16, 2026
Score
50% 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