Stdio MCP server that inspects and (with confirmation) mutates one VPS over SSH.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
A stdio MCP server that operates one VPS over SSH. Cursor and Codex start the process with bun and call read-only tools (host health, Unix debug, Docker, Compose, Swarm, firewall) plus mutation tools (restart, stop, start, prune). Mutations require an explicit confirmation.
Transport is stdio. Do not start the server as a long-lived process by hand: the client (Cursor or Codex) launches it.
See CONTRIBUTING.md (branches, pull requests, verification) and ISSUE.md (how to file an issue).
ssh on PATH)sudo -n for ufw, fail2ban, sshd -T, ss, and dmesg if you use those tools)Edit .env. The file is gitignored.
| Variable | Required | Default | Purpose |
|---|---|---|---|
VPS_SSH_KEY_PATH | yes | β | Absolute path to the private key. The process refuses to start if the file is missing or unreadable. |
VPS_HOST | no | vps.example.invalid | SSH host (placeholder; set your own host). |
VPS_USER | no | ubuntu | SSH user. |
VPS_PORT | no | 22 | SSH port. |
VPS_COMPOSE_DIR | no | β | Absolute Compose directory on the VPS. Without it, Compose tools require the dir argument. |
VPS_COMMAND_TIMEOUT_MS | no | 30000 | Remote command timeout. Expiry returns exit_code 124. |
VPS_LOG_MAX_BYTES | no | 200000 | Cap for stdout/stderr. Overflow is cut and truncated is true. |
VPS_ALLOW_MUTATIONS | no | true | false, 0, no, or off disables every mutation. |
VPS_SSH_KEY_PASSPHRASE | no | β | Avoid. Prefer ssh-agent. Registration scripts do not copy this variable into the client. |
VPS_COMPOSE_DIR must be absolute and match /^[a-zA-Z0-9/_.-]+$/ (it must start with /).
npm package (requires Bun; the MCP Registry points at this artifact):
MCP Registry name: io.github.koller-nexus/vps-ops-mcp. The registry publishes metadata only after the package exists on public npm.
The scripts write MCP config from variables already exported in the shell. They do not load .env themselves. If you skip the export, the scripts fall back to their defaults (host, user, port, and a local key path).
Do this once at the repository root before each script:
Each run backs up the destination file (*.bak.YYYYMMDDHHMMSS) and replaces only the vps-ops server. Other MCP servers stay in place.
Optional script variables:
| Variable | Default | Purpose |
|---|---|---|
MCP_PROJECT_DIR | this repository root | Source of the src/index.ts path. |
CURSOR_MCP_JSON | ~/.cursor/mcp.json | Cursor file to update. |
CODEX_CONFIG | ~/.codex/config.toml | Codex file to update. |
VPS_COMPOSE_DIR is written into the client config only when it is set and non-empty.
Global registration (applies in every workspace):
The script writes ~/.cursor/mcp.json in this shape:
To scope it to one project, point the script at that project's mcp.json:
Then reload the Cursor window (Command Palette β Developer: Reload Window) or restart the server under Settings β MCP. The server appears as vps-ops.
The script writes ~/.codex/config.toml:
Close and reopen the Codex session so it rereads config.toml. If the CLI is on PATH, codex mcp list should show vps-ops.
Test SSH outside MCP with the same flags the server uses:
In Cursor or Codex, ask the client to call vps_ping. The response is JSON:
A non-zero exit_code is an MCP error. If the process exits immediately with VPS_SSH_KEY_PATH is required or missing or unreadable, the variable never reached the client env β rerun the registration script with .env exported.
Every call returns exit_code, stdout, stderr, duration_ms, and truncated.
| Tool | Arguments | What it does |
|---|---|---|
vps_ping | β | uname -a, uptime, hostname. |
vps_resources | β | df -h, free -h, load average. |
vps_journal | unit, n? (1β500, default 100) | journalctl -u. Unit from the allowlist (docker, sshd, fail2ban, ufw, cron, with or without .service) or a safe name ending in .service. |
docker_ps | β | docker ps -a as JSON lines. |
docker_inspect | name | docker inspect. |
docker_logs | name, n? (1β1000, default 200), since? | docker logs --tail --timestamps. |
docker_stats | β | docker stats --no-stream. |
docker_service_ls | β | docker service ls as JSON lines (Swarm). |
docker_node_ls | β | docker node ls as JSON lines (Swarm). |
compose_ps | dir? | docker compose ps in dir or VPS_COMPOSE_DIR. |
host_listen | β | ss -lntup (sudo -n, otherwise without sudo). |
host_failed_units | β | systemctl --failed --no-pager --full. |
host_top | β | Top 30 processes by memory (ps aux --sort=-%mem). |
host_dmesg | n? (1β200, default 100) | dmesg -T + tail (sudo -n, otherwise without sudo). |
host_firewall | β | ufw status verbose (sudo -n, otherwise without sudo). |
host_fail2ban | jail? | fail2ban-client status (sudo -n). |
ssh_hardening_check | β | Filtered sshd -T: port, password, root login, pubkey. |
Container, service, image, and jail names must match ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$.
These require confirm: true. With VPS_ALLOW_MUTATIONS=false, all of them are rejected.
| Tool | Extra arguments | Remote command |
|---|---|---|
docker_restart | name | docker restart |
docker_stop | name | docker stop |
docker_start | name | docker start |
compose_up | dir?, services? | docker compose up -d |
compose_restart | dir?, services? | docker compose restart |
compose_pull_up | dir?, services? | docker compose pull then up -d |
docker_rm | name, force_name | docker rm -f. force_name must equal name. |
disk_cleanup_docker | confirm_volumes? | docker system prune -f. Volumes only with confirm_volumes: true. |
BatchMode=yes, IdentitiesOnly=yes, and StrictHostKeyChecking=accept-new.confirm: true is rejected. docker_rm asks for the name twice. Volume prune requires confirm_volumes: true.VPS_ALLOW_MUTATIONS=false.No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/vps-ops)<a href="https://allmcps.com/mcp/vps-ops"><img src="https://allmcps.com/api/badge/vps-ops?style=directory" alt="VPS Ops on AllMCPs" /></a>