Zero-inbound-port MCP gateway for managing distributed edge servers over reverse SSH tunnels
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Myrmex Hive is a decentralized, secure, and geeky agent orchestration framework built on top of the Model Context Protocol (MCP). It is designed to securely monitor, query, and manage distributed edge servers, Docker hosts, and Kubernetes nodes without exposing any ingress ports on your target systems.
Myrmex Hive is designed for zero-trust environments where target edge systems (agents) must remain completely isolated from direct inbound network traffic.
crypto/ssh package, enforcing secure Ed25519 signature validation and high-grade ciphers (ChaCha20-Poly1305, AES-GCM).os/exec) rather than invoking a shell (like /bin/sh or bash). This completely bypasses shell expansion, neutralizing shell injection vulnerabilities. Arguments are strictly validated against developer-defined regular expressions in config.json.Myrmex Hive supports Go, Nix, Linux, macOS, and Windows environments.
Add Myrmex Hive to your flake.nix inputs:
You can then run the CLI tool directly:
To deploy a Myrmex Agent or Gateway as a declarative systemd service on NixOS, enable the module in your configuration.nix:
Installs all three binaries: myrmex (operator CLI), myrmex-gateway, and myrmex-agent.
macOS only β Homebrew casks are not supported on Linuxbrew. On Linux use the deb/rpm packages from the releases page, the Nix flake, install.sh, or the container images.
To download, compile, and configure the Agent as a background daemon (systemd on Linux, LaunchDaemon on macOS):
The installer automatically compiles the agent binary, generates secure Ed25519 keys, writes the config.json, and boots the service.
To install the Agent on Windows Server or Windows 10/11, launch PowerShell as Administrator and run:
The PowerShell script compiles the binary, registers the agent configuration under C:\ProgramData\mcp-agent\, generates OpenSSH keys, and schedules a background task to launch the agent at system startup.
Versioned container images and a Helm chart are published to GHCR on every release:
--version pins the chart and the images together (v1.0.1+; v1.0.0 predates
image/chart publishing). See
docs/DEPLOYMENT.md for the image list, a working install
with agent keys, and the TLS/Service/agent_id caveats.
agent_config.json)Allows you to define a single gateway or a list of multiple gateway addresses for High Availability (HA) failover cycling:
gateway_config.json)Configures the receiver, TLS certs, OIDC/Tokens RBAC role mapping (admin, operator, read-only), and signed audit log path:
Note: If audit_log_path is set, Myrmex Gateway records all /api/call and /api/chat executions alongside a cryptographic signature generated using the Gateway's private SSH host key.
Note: oidc_issuer enables native OIDC/JWKS validation of real SSO tokens (opt-in; static tokens keep working alongside). See docs/SECRETS.md.
Note: metrics_enabled exposes a Prometheus endpoint at /metrics (opt-in; behind the same bearer-token auth as the rest of the API). Myrmex Gateway can also route threshold alerts to a webhook/Alertmanager and export OpenTelemetry traces over OTLP β all opt-in. See docs/OBSERVABILITY.md for the metric reference, a scrape_config, the Grafana dashboard, alert routing and tracing.
Governance & scheduling (all opt-in, backward-compatible β empty/unset means off):
risk_tiers classifies each tool (read/write/admin). Built-in mutating tools (service_control, run_command) now default to a non-read tier even when unlisted, so they can't slip past gating unclassified; your explicit entries still override.require_approval_tiers makes calls in those tiers wait for a second operator (myrmex approvals), and a new pending approval also pages your configured alert targets so it can't expire unnoticed. 15-minute TTL.rate_limit_per_minute caps tool calls in a sliding 60-second window.scheduled_tasks periodically run an LLM orchestration prompt against an agent and route the summary through the alerting subsystem β unattended fleet health checks. interval_seconds only (no cron).See Golden Path for how these six gates fit together and a staged rollout.
Myrmex Gateway fails closed: it refuses to start (or rejects a connection) rather than run in an insecure state. When preparing configs and keys, three rules are enforced:
authorized_keys comment = agent-id (identity binding). The Gateway takes each connected agent's identity from the comment on its authorized_keys entry, and rejects any key whose comment is empty or does not match the agent_id the agent presents. Generate every agent key with its agent-id as the comment:
Then the public line in authorized_keys must keep that comment (ssh-ed25519 AAAA... agent-nginx).
Persistent host_key_path required when audit_log_path is set. Audit entries are signed with the Gateway's SSH host key, so a transient (regenerated-on-restart) key would make past signatures unverifiable. The Gateway refuses to start if audit_log_path is set but host_key_path is empty. Generate a stable host key once and point host_key_path at it:
The Gateway also refuses to start without authorized_keys_path (no agent allowlist).
Factual signals from GitHub, npm, and our automated checks β not a rating.
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/myrmex-hive)<a href="https://allmcps.com/mcp/myrmex-hive"><img src="https://allmcps.com/api/badge/myrmex-hive?style=directory" alt="Myrmex Hive on AllMCPs" /></a>