Reins
Enables remote operations and management of Linux hosts through the Reins agent, including command execution, file transfer, interactive shell, monitoring, and batch tasks.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Reins
Take the reins — then hand them to your AI agent, safely. Self-hosted remote operations for Windows/Linux fleets: one Go binary, zero inbound ports, your data never leaves your network. Your AI agent reaches a server only after passing the rules gate.
Put your AI agent on a real Windows box: bring up a Relay, install the Agent on an authorized Windows machine (outbound-only — no inbound port, NAT just works), add reins-mcp to Claude Desktop or Cursor, then ask your agent to run hostname on it. AI-agent quickstart · Ops quickstart · Watch the demo
reins lets a small team run remote operations on a fleet of Windows/Linux machines from one terminal: command execution, file transfer, interactive shell, port forwarding, multi-step deploy orchestration, batch dispatch, monitoring — over reverse WebSocket connections that traverse NAT without opening a single inbound port on your hosts.
It is an open-source alternative to Teleport (access plane) and MeshCentral/TacticalRMM (RMM), with enterprise primitives built in: mTLS with a built-in CA and CRL, multi-tenant RBAC, a tamper-evident audit hash chain with SIEM export, and a rules gate your AI agents must pass before they touch a server.
CLI (50+ cmds) ──HTTPS/SSE──► Relay (single Go binary) ◄──reverse WS (NAT traversal)── Agent (Windows service / Linux)
Web console (embedded) mTLS + CA + CRL wss://, agent dials out 9 task executors:
Go SDK + MCP (AI agents) RBAC multi-tenant powershell · script · file · screenshot
audit hash chain + SIEM browse (chromedp) · guiclick · update
Prometheus /metrics + pprof power · monitor (TUI)Why reins
Self-hosted, single binary | Relay is one static Go binary (Docker/Helm/systemd also provided). No database required — bbolt by default, Redis optional for horizontal scale. |
Zero inbound ports | Agents dial out over WebSocket/wss. Your hosts stay unreachable from the internet; NAT and home/office networks just work. |
Windows remote operations, first-class | PowerShell execution, interactive shell, service/process control, scheduled tasks, screenshots, GUI & browser automation, power ops — see the Windows capability map below. |
Enterprise security primitives | mTLS with built-in CA, per-device client certs, CRL revocation, credentials bound server-side to a tenant and role ( |
Ops, not just remote desktop | Batch dispatch with retries & live progress, DAG orchestration (dependency graphs, concurrency caps, failure cascade skip), deploy playbooks, process watchdog, cron, snapshots, network diagnostics, log aggregation. |
AI-agent native | An MCP server (14 tools) plus a Go SDK (30+ tools) drive the whole platform from Claude Desktop / Cursor / any MCP client — and |
Related MCP server: mcp-opentym
AI-agent quickstart — Claude on a real Windows box
The fastest way to feel what reins is for: put Claude (or Cursor, or any MCP client) behind the wheel of an actual Windows machine — behind NAT, zero inbound ports, gated by rules.
1. Start the Relay on a host with Docker Compose (private test network is fine for this HTTP setup; replace the token placeholder with a unique trial token):
git clone https://github.com/V-T-V/reins && cd reins
echo "REINS_TOKEN=REPLACE_WITH_A_UNIQUE_TRIAL_TOKEN" > .env
docker compose up -d # Relay on http://localhost:7780 (web console included)2. Install the Agent on a Windows machine you own or are authorized to manage — PowerShell, auto UAC elevation:
iex (((irm 'http://<relay-host>:7780/install.ps1') -replace '^\uFEFF'))The Agent dials out to the Relay over WebSocket, so the Windows machine needs no inbound port — home and office networks just work.
3. Wire your AI client. Download reins-mcp from the latest release (six platforms) or go install github.com/V-T-V/reins/cmd/reins-mcp@latest; an npm-installable TypeScript reference implementation lives at V-T-V/reins-mcp. Add it to Claude Desktop / Cursor / any MCP client:
{
"mcpServers": {
"reins": {
"command": "reins-mcp",
"env": { "REINS_RELAY": "http://<relay-host>:7780", "REINS_TOKEN": "your-token" }
}
}
}Then just ask your agent:
"List my machines, then run
hostnameandGet-Service App*on the Windows one."
14 curated tools (reins_run_command, reins_task_run covering all 9 executor types incl. screenshot / browser / GUI-click, reins_batch_run, reins_power, cron management, …) — full list and per-client configs in docs/mcp.md.
Why this is safe to actually want. Every mutation request — MCP, SDK or CLI — passes the same execution-layer gate: the agent must first read the managed project's .reins/rules.md and carry a content-fingerprint ack; edit the rules and stale acks are rejected instantly (the rejection never echoes the fingerprint, so "skip reading, replay the ack" doesn't work). On top of that: mTLS device identity with CRL revocation, command allow/deny lists enforced on both Relay and Agent, and an append-only audit hash chain exportable to your SIEM. Details in AI agents on your fleet.
Windows fleets, first-class
Windows is where Reins was born. The agent installs as a native Windows service (auto-start on boot, crash auto-restart via SCM) and ships executors Linux-first tools don't have:
Windows capability | What you get |
Remote PowerShell |
|
Interactive shell | live PowerShell session from your terminal — every session recorded (asciinema v2, replayable) |
Service & process control | list/start/stop Windows services (SCM); kill process trees via Job Objects — grandchildren don't survive timeouts and become zombie port-squatters |
Scheduled tasks | manage |
Screenshot | PrintWindow capture for visual verification of remote UIs |
GUI automation | vision-located clicks via SendInput — authorized deployments only, session-recorded and audit-logged |
Browser automation | chromedp-driven remote browser control (login flows, web checks) |
Power | shutdown / restart / sleep with tag whitelist + audit trail |
Self-update | in-place binary swap (two-step rename + SCM restart) with health-check auto-rollback — survives running-exe locks and Defender scans |
One-line install |
|
Run all of it across a fleet: exec -a kiosk1,kiosk2,kiosk3 -c "Get-Service App" or DAG-orchestrate backup → upgrade → health-check with failure cascade skip.
Quickstart
The Relay host, Windows test machine, and operator workstation describe roles, so the Relay and CLI can share a host. Install the Agent only on a Windows machine you own or are authorized to manage. It connects outbound to the Relay over WebSocket, including across NAT, and needs no inbound port. The trial succeeds when the Agent appears online and a remote hostname command returns its name. For production, follow DEPLOYMENT.md for TLS, relay exposure, and deployment options.
1. Start the Relay on a host with Docker Compose available. Use a private test network for this HTTP quickstart. Replace the token placeholder with a unique trial token, then run these commands in a Bash-compatible shell:
git clone https://github.com/V-T-V/reins && cd reins
echo "REINS_TOKEN=REPLACE_WITH_A_UNIQUE_TRIAL_TOKEN" > .env
docker compose up -d # Relay on http://localhost:7780 (web console included)2. Install the Agent in PowerShell on the authorized Windows test machine. Replace <relay-host> with the Relay host name or IP reachable from this machine. localhost works only when the Relay is on this same machine. If the installer prompts for a token, enter your REINS_TOKEN value.
iex (((irm 'http://<relay-host>:7780/install.ps1') -replace '^\uFEFF'))3. Verify from the operator workstation. Download and extract the reins CLI for your OS from the latest release. Add the executable to your PATH or use its full path in the commands below. Replace <relay-host> with an address reachable from the operator workstation, <token> with the REINS_TOKEN value, and <agent-id> with the ID shown by agent list.
reins --relay http://<relay-host>:7780 --token <token> agent list
reins --relay http://<relay-host>:7780 --token <token> task run -a <agent-id> -c "hostname"Linux agent: ./reins-agent run -relay ws://<relay>:7780/agent -token <token> (systemd unit in deploy/). Binaries for windows/linux/darwin are on the Releases page. Production notes: DEPLOYMENT.md.
Feature map
Area | Highlights |
Execution |
|
Transfer | chunked + resumable file up/download with per-chunk SHA256, LAN-direct fast path with relay fallback, |
Orchestration | deploy playbooks ( |
Monitoring |
|
Diagnostics | remote |
Fleet admin | agent enroll/revoke, service/proc/power management, process watchdog, cron, self-update with health check & automatic rollback |
Security | mTLS + CA + CRL, multi-credential RBAC with server-bound identities (admin/operator/viewer), object-level tenant isolation, org enable/disable flag (fail-closed; not yet exposed over HTTP), command policy (32-entry blacklist default, optional allow-only, enforced Relay- and Agent-side), audit hash chain + CEF/Syslog/JSON SIEM export, secrets (TTL, one-time), script library with path-traversal protection |
Full CLI reference: run reins (50+ commands, exit codes 0–5). API contract: deploy/openapi.yaml (40+ endpoints).
How it compares
reins | MeshCentral | TacticalRMM | Teleport | RustDesk | |
License | MIT | Apache-2.0 | source-available¹ | AGPL-3.0 | AGPL-3.0 |
Server | one Go binary | Node.js | Django+Vue+Go+MQ | Go (heavy) | Rust |
Full RMM (batch/DAG/monitor) | ✅ | partial | ✅ (MSP) | ✖ (access plane) | ✖ (desktop) |
Device identity (mTLS+CA+CRL) | ✅ | partial | partial | ✅ | ✖ |
Multi-tenant RBAC | ✅ | ✖ | partial | enterprise | paid |
Tamper-evident audit chain + SIEM | ✅ | ✖ | ✖ | ✅ | ✖ |
AI-agent rules gate | ✅ | ✖ | ✖ | ✖ | ✖ |
Data plane | self-hosted | self-hosted | self-hosted | self-hosted | self-hosted |
¹ Tactical RMM License v1.0 (AmidaWare) — source-available, not an OSI-approved license.
Security & responsible use
reins is built for managing machines you own or are contractually authorized to manage. Unauthorized use is prohibited by the license and likely illegal in your jurisdiction.
Design choices that matter for defenders:
Agents make outbound-only connections; you can firewall all inbound management ports.
Every device gets an mTLS client certificate; revoke per-device via CRL (
agent revoke).Command policy is enforced twice (Relay and Agent, incl. offline-cached tasks — a cached high-risk command for an offline agent is rejected at submission, 403 not 202).
All task submissions land in an append-only hash-chained audit log exportable to your SIEM — the artifact CISA AA23-025A asks for when inventorying approved RMM use.
A credential maps to exactly one server-side identity. Knowing a secret grants the tenant and role the Relay has on file for it; dropping or forging the
tenant:role:prefix grants nothing, and the web console's cookie goes through the same gate as the CLI's Bearer header. Every agent ID is bound on first registration (tenant, or admin-domain credential class); frames from unregistered connections are dropped, result frames are accepted only for the reporting agent's own tasks, andviewercannot connect to the agent channel.One Relay is one trust domain. Tenant isolation separates credentialed users of a shared Relay from each other. To hard-separate customers or clearance levels, deploy separate Relays — see the trust model.
If your antivirus flags the agent, see docs/antivirus.md — false positives are a known industry-wide issue for this software category (they hit MeshCentral, TacticalRMM and RustDesk too), and every release ships a SHA256 manifest.
Vulnerability reporting: see SECURITY.md.
AI agents on your fleet
import "github.com/V-T-V/reins/client"
c := client.New("https://relay:7780", "token")
tools, _ := c.ListTools() // 30+ ops tools for your agent
out, _ := c.RunCommand("agent-1", "Get-Date", 10)
res, _ := c.StreamCommand(ctx, "agent-1", "ping 8.8.8.8", 30, func(ev string, d json.RawMessage) { fmt.Println(ev, string(d)) })Automation guardrail — .reins/rules.md lives in the managed project's repo root (e.g. "never kill the kiosk shell during business hours", "exclude node_modules/ from deploys"). Agents must rules read (content-fingerprint ack, 30s cache) before mutation tasks are accepted; edit the rules and old acks are rejected immediately. The rejection never echoes the fingerprint, so "skip reading, replay the ack" doesn't work.
MCP server (native AI-client integration)
reins-mcp (in every release) exposes the same operations as a Model Context Protocol stdio server — zero external deps. Claude Desktop / Cursor / any MCP client:
{
"mcpServers": {
"reins": {
"command": "reins-mcp",
"env": { "REINS_RELAY": "http://your-server:7780", "REINS_TOKEN": "your-token" }
}
}
}14 curated tools (reins_run_command, reins_list_agents, reins_batch_run, reins_power, cron, …) with JSON-Schema inputs — the AI-agent quickstart above is this path. Full tool list and per-client configs: docs/mcp.md; TypeScript reference implementation: V-T-V/reins-mcp. The rules gate applies regardless of client — MCP, SDK or CLI hit the same execution-layer checkpoint.
Project stats
Go files / LOC | 269 / 34,300+ (all Go files incl. tests / non-test Go, |
Tests / benchmarks | 641 / 35 ( |
CLI commands / REST endpoints / executors | 50+ / 40+ / 9 |
CI | build + |
Deliverables | Docker ×2, Helm, OpenAPI, goreleaser, systemd units |
Honest limitations
Windows agent is first-class; the Linux agent covers script/monitor + dialect-aware CLI ops (~85%) — validated end-to-end on real Ubuntu 24.04/WSL2 (linux relay + agent, sh-script execution, dialect-aware sysinfo driven from the Windows CLI).
Single Relay is the default deployment; multi-relay failover and the Redis TaskStore/EventBus federation exist and are tested, but production-hardening continues.
Tenant isolation is not a hard multi-tenant boundary. Everyone on a Relay shares one process, one command policy and one update repository, and the Relay operator can do anything. Isolate customers or clearance levels with separate Relays.
Command blacklist is best-effort by design; enable allow-only mode (
-policy-allowon Relay,policy_allowon Agent) for strict environments.
Documentation
README.zh-CN.md — full Chinese README (config, RBAC, batch/DAG, file transfer internals, rules gate)
DEPLOYMENT.md — production deployment guide
BENCHMARK.md — performance baselines
deploy/openapi.yaml — REST API contract
AGENTS.md — deep architecture notes (dense, Chinese)
CHANGELOG.md — release history
Contributing
Issues and PRs welcome — see CONTRIBUTING.md. Monthly release cadence.
License
MIT © 2026 QiuShichang
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
An MCP server that provides agents access to the KeldynAI platform
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server that gives AI assistants full control over your desktop — monitor system resources, manage windows, capture screenshots, control the clipboard, launch applications, and more.MIT
- FlicenseNot gradedqualityDmaintenanceA lightweight MCP HTTP server giving AI assistants real tools to interact with your Windows machine, including running commands, file access, system info, web search, and browser automation.1-
- AlicenseAqualityDmaintenanceAn MCP server that grants AI agents unrestricted file system, Python, and PowerShell access on Windows for real, unfiltered automation.141MIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI clients to connect to a Windows machine for file operations, PowerShell execution, Git inspection, task management, memory, and skills.-