I've been building rcmd, a relay-based remote command tool. No SSH keys, no open ports — your servers connect out to a relay, and you send commands through it.
Today I shipped the thing I've wanted since day one: an MCP server.
What is MCP?
Model Context Protocol is the standard way AI agents (Claude Code, Cursor, Windsurf, Devin) call external tools. Instead of shelling out to ssh user@host "df -h" and parsing text, the agent calls a structured tool and gets JSON back.
What rcmd's MCP server exposes
Four tools:
-
rcmd_list_targets— list your configured servers -
rcmd_exec— run a command on a remote server, get stdout/stderr/exit code/duration -
rcmd_cp— copy a file to a remote server -
rcmd_health— check if a server is reachable + latency
How to set it up
- Install rcmd and configure a target:
rcmd add-target --name prod --token <token>
- Add rcmd as an MCP server. For Claude Code (
~/.claude/mcp.json):
{
"mcpServers": {
"rcmd": {
"command": "rcmd",
"args": ["mcp"]
}
}
}
Same config for Cursor (.cursor/mcp.json) and Windsurf (~/.codeium/windsurf/mcp_config.json).
- That's it. Your AI agent can now run commands on your servers.
What this looks like in practice
You ask Claude: "Check disk space on prod"
Claude calls rcmd_exec with {"target": "prod", "command": "df -h"} and gets:
{
"target": "prod",
"command": "df -h",
"stdout": "Filesystem Size Used Avail Use% Mounted on\n/dev/vda1 40G 28G 11G 73% /",
"exit_code": 0,
"duration": "142ms",
"success": true
}
No SSH parsing. No "which server was that again?" No key management.
Why this matters
I built rcmd because SSH is friction for AI agents:
- Keys need to be on the right machine
- Firewalls block inbound ports
- NAT makes connecting impossible without a VPN
- Parsing terminal output wastes tokens
rcmd's daemon connects out to a relay. No inbound ports. No keys on the agent's machine. The MCP server reads your local rcmd config and handles the rest.
The agent never sees your tokens. It only sees target names. All traffic goes through the relay with token-based auth.
Self-host or use the hosted relay
The relay is open source (MIT). You can self-host it in 5 minutes — one binary, one port, done. Or use the hosted one at rcmd.intrane.fr for €5/mo.
Full self-hosting guide: https://github.com/javimosch/remotecmd-cli/blob/main/docs/self-hosting.md
MCP server docs: https://github.com/javimosch/remotecmd-cli/blob/main/docs/mcp-server.md
What's next
- More MCP tools (cron management, tunnel setup, team operations)
- Resources (expose server state as MCP resources, not just tools)
- Streaming output for long-running commands
The binary is ~6MB, single file, no dependencies. Linux + macOS, amd64 + arm64.
# Download from GitHub releases
# Or: curl -sSL https://github.com/javimosch/remotecmd-cli/releases/latest | ...
GitHub: https://github.com/javimosch/remotecmd-cli
rcmd is agent-first infrastructure. Every command returns structured JSON. Every feature is designed to be called by an AI, not just a human. The MCP server is the natural endpoint of that design.
Top comments (0)