Connect an AI agent
Install the RustIron MCP server and connect your AI agent to it, on your computer or over SSH.
Two ways to connect
The MCP server, rustiron-mcp, talks to your agent through its standard input and output. You choose where it runs:
- On your own computer, without the server: the agent can read and explain plan files, but it cannot see the server.
- On the server, started by your agent over SSH: the agent can also check the server’s health, your sites, changes, and evidence.
Build and install the MCP server
Build rustiron-mcp in your RustIron source folder, on the same kind of system where you build RustIron itself, then install it on the server.
cargo build --release --locked --bin rustiron-mcpinstall -m 0755 target/release/rustiron-mcp /usr/local/bin/rustiron-mcpLet one account start it
On the server, rustiron-mcp must run as the coordinator’s account to read its socket. Give the account you use for SSH permission to start exactly this one command, and nothing else. The examples use agentops; replace it with your SSH user name. Do not use the name operator: on AlmaLinux it is a built-in system account.
echo 'agentops ALL=(rustiron-coordinator) NOPASSWD: /usr/local/bin/rustiron-mcp --socket /run/rustiron-coordinator/control.sock' > /etc/sudoers.d/rustiron-mcpchmod 0440 /etc/sudoers.d/rustiron-mcpvisudo -cf /etc/sudoers.d/rustiron-mcpAdd it to your agent
Tell your agent to start the MCP server over SSH. Use an SSH key that logs in without a password prompt. For Claude Code, one command adds it:
claude mcp add rustiron -- ssh -T agentops@your-vps.example.com sudo -n -u rustiron-coordinator /usr/local/bin/rustiron-mcp --socket /run/rustiron-coordinator/control.sock{ "mcpServers": { "rustiron": { "command": "ssh", "args": ["-T", "agentops@your-vps.example.com", "sudo", "-n", "-u", "rustiron-coordinator", "/usr/local/bin/rustiron-mcp", "--socket", "/run/rustiron-coordinator/control.sock"] } }}Check that it works
Ask your agent to run the RustIron health check (the rustiron_doctor tool). It should answer with the server’s operating system and state. If the agent says the coordinator is not configured, the —socket part is missing; if the connection fails, try the SSH command alone in a terminal first. The site list answers “dependency unavailable” until the server has an imported inventory, as the command line does; the Console’s Sites page still shows your sites.
The tools the agent gets are: rustiron_doctor, rustiron_site_list, rustiron_site_inspect, rustiron_operation_status, rustiron_evidence_export, rustiron_plan_inspect, and rustiron_plan_envelope. All of them only read.