Fetching latest headlines…
I built an MCP server that lets Claude Code actually run commands on my servers (not just suggest them)
NORTH AMERICA
πŸ‡ΊπŸ‡Έ United Statesβ€’April 18, 2026

I built an MCP server that lets Claude Code actually run commands on my servers (not just suggest them)

0 views0 likes0 comments
Originally published byDev.to

I've been using Claude Code for infrastructure work for months. And every session followed the same pattern:

  1. Ask Claude what command to run
  2. Read Claude's answer
  3. Open terminal
  4. Copy-paste the command
  5. Read output
  6. Paste output back to Claude
  7. Repeat

It felt like I'd hired a senior engineer who wasn't allowed to touch the keyboard. So I built Conduit β€” and gave Claude the keyboard.

What is Conduit?

Conduit is a cross-platform remote connection manager (SSH, RDP, VNC, web) with a built-in MCP server. Think Termius or Royal TS, but the whole thing is wired up as an MCP server so Claude Code can drive it directly.

Apache 2.0 open source: https://github.com/advenimus/conduit-desktop

The MCP integration

When you add Conduit as an MCP server in Claude Code:

claude mcp add conduit -- node "/Applications/Conduit.app/Contents/Resources/mcp/dist/index.js" \
  --env CONDUIT_SOCKET_PATH="$HOME/Library/Application Support/conduit/conduit.sock" \
  --env CONDUIT_ENV="production"

Claude gets access to 60+ tools across five categories.

Terminal (SSH)

  • terminal_execute β€” run a command in an SSH session and get the output back
  • terminal_read_pane β€” read the current terminal buffer
  • terminal_send_keys β€” send raw keystrokes (including Ctrl+C, arrow keys, etc.)

Now instead of "run df -h on each server," Claude just does it. Across all of them.

RDP / VNC

  • rdp_screenshot β€” capture a screenshot of a remote desktop
  • rdp_click β€” click at coordinates
  • rdp_type β€” type text
  • rdp_send_key β€” send keyboard shortcuts (Win+R, Ctrl+Alt+Del, etc.)
  • Same set for VNC sessions

This unlocks something surprisingly powerful: Claude can look at a Windows server, read error dialogs, and click through them. Not just SSH into the host β€” actually drive the graphical interface.

Web sessions

  • website_click_element β€” click by CSS selector (more reliable than coordinates)
  • website_fill_input β€” fill inputs with React/Vue/Angular event dispatch
  • website_execute_js β€” run JavaScript in the page
  • website_get_elements β€” discover all interactive elements on a page

Web sessions are driven by Electron's WebContentsView β€” a full browser engine. Claude can navigate admin dashboards, fill forms, and execute JavaScript in sessions that are already logged in.

Credential vault

  • credential_list β€” list stored credentials (metadata only)
  • credential_read β€” retrieve a secret (requires explicit user approval prompt)

AES-256, local-first. Secrets never leave your machine. When the agent wants a credential, you get an approval prompt β€” you see exactly what's being requested and why.

How it actually works under the hood

Claude Code ──(MCP protocol)──> Conduit MCP binary (Node.js)
                                         β”‚
                                  (Unix socket)
                                         β”‚
                                 Conduit desktop app
                                         β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚                   β”‚                      β”‚
               SSH session         RDP session           Web session
               (node-pty)       (FreeRDP C helper)  (Electron WebContentsView)

The MCP binary is a separate Node.js process that connects to the desktop app over a Unix domain socket. Every tool call goes through the main process where it's rate-limited, audited, quota-checked, and approval-prompted.

The MCP binary holds no session state β€” it's a thin proxy. If it crashes or restarts, it reconnects automatically.

Safety model

"AI agent with SSH access to all your servers" is a large trust surface. Here's how Conduit handles it:

Approval prompts are color-coded by risk:

  • πŸ”΅ Read operations (list connections, read terminal buffer)
  • 🟑 Execute operations (run commands, navigate web)
  • 🟠 Write operations (fill forms, click UI elements)
  • πŸ”΄ Credential operations (read secrets from vault)

Every prompt has a 120-second auto-deny timeout β€” walk away from your machine and nothing sensitive happens.

Audit log records every tool call: timestamp, tool name, arguments (secrets masked), result status.

Rate limiting: 30 calls/minute per connection by default, token bucket algorithm.

Bring-your-own-subscription: Claude Code authenticates directly with Anthropic. Conduit never proxies API calls or sees your API keys.

A real example

Here's a real workflow:

"Check disk usage on all prod servers, find the one with least headroom, and tell me what's in its largest directories"

Claude:

  1. connection_list β†’ gets my SSH connections
  2. terminal_execute on each β†’ runs df -h
  3. Parses output, identifies the problem server
  4. terminal_execute β†’ runs du -sh /* 2>/dev/null | sort -rh | head -20
  5. Reports back with findings

What used to be 10 minutes of tabbing between terminals is a 30-second conversation.

Tech stack

For the curious:

  • App: Electron 34 + React 18 + TypeScript
  • SSH: ssh2 + node-pty + xterm.js
  • RDP: FreeRDP 3.x (custom C helper binary with binary protocol to the main process)
  • VNC: rfb2
  • MCP: @modelcontextprotocol/sdk
  • Vault: AES-256-GCM, local storage, optional Supabase cloud sync
  • Auth: Supabase

The FreeRDP integration was the hardest part β€” building the C helper, the binary protocol, and getting screenshots flowing at acceptable latency took weeks. Happy to write a separate post on that if there's interest.

Try it

Happy to answer questions in the comments β€” especially about the MCP tool design, the FreeRDP C helper, or the approval/safety system.

Comments (0)

Sign in to join the discussion

Be the first to comment!