Skip to main content
AI Integrations
macOS only
Anthropic's CLI + IDE coding assistant

Claude Code + SSH through SSHive's MCP server

Let Claude Code run commands on your servers, read remote files, and explore your fleet, via SSHive's local MCP server. One-shot CLI setup, no cloud relay.

Claude Code is Anthropic's CLI and IDE assistant, `claude` in your terminal, plus integrations for VS Code, Cursor and JetBrains. It is great at writing and refactoring code, but until you give it MCP servers, it has no idea what is running on your actual infrastructure. SSHive's built-in MCP server bridges that gap on macOS: every SSH and SFTP session you have open in SSHive becomes a tool Claude can call, with the same credentials, the same jump-host chain, the same Keychain protection. No new authentication, no separate session pool, Claude reuses what you already have. The MCP server runs on `127.0.0.1` only, with a random Bearer token regenerated on every SSHive launch. Nothing leaves your machine. Note: MCP is a macOS-only feature because it needs an always-on local HTTP server that iOS background restrictions prevent.

Set up Claude Code with SSHive in 4 steps

  1. 1

    Enable the MCP server in SSHive

    Open SSHive on macOS, go to Settings → MCP, toggle "Enable MCP server". A random Bearer token appears just below, copy it. The server is now listening on `http://127.0.0.1:49422/mcp`.

  2. 2

    Run the one-shot `claude mcp add` command

    In your terminal, paste the command SSHive shows you in the same Settings panel. It tears down any old `sshive` MCP entry and registers the new one in `~/.claude.json` in a single step.

    Copy this
    claude mcp remove sshive --scope user 2>/dev/null; claude mcp add --transport http --scope user sshive http://127.0.0.1:49422/mcp --header "Authorization:Bearer <your-token>"
  3. 3

    Restart Claude Code

    Quit any running `claude` session and reopen. The next time you run `claude` (or launch the IDE plugin), it loads the new MCP config and discovers the SSHive tools: `ssh_list_sessions`, `ssh_execute`, `sftp_list`, `sftp_read_file`, `sftp_write_file`, `sftp_write_file_chunk`, `sftp_write_from_local_path`.

  4. 4

    Open the SSH sessions you want Claude to see

    Claude only sees sessions that are actually connected in SSHive. Open the prod, staging, db-master profiles you want, Claude can now `ssh_list_sessions` to discover them and `ssh_execute` to run commands. Sessions you close vanish from Claude's tools.

What to ask Claude Code once connected

You ask

"List all Docker containers on my prod server and tell me which ones have been up the longest."

What happens

Claude calls `ssh_list_sessions`, picks the prod profile, runs `docker ps --format "..."` via `ssh_execute`, parses the output and replies in natural language.

You ask

"Read the nginx config on staging and tell me which sites it serves."

What happens

Claude calls `sftp_list` on `/etc/nginx/sites-enabled/`, then `sftp_read_file` on each entry, summarizes server blocks and listed domains.

You ask

"My deploy script just failed on prod, check `/var/log/deploy.log` and tell me what went wrong."

What happens

Claude `sftp_read_file`s the log, finds the error stanza, correlates with the previous successful entry, and proposes the likely root cause in plain English.

Why pair Claude Code with SSHive specifically

Claude Code does its best work when it has real context. Without MCP, you spend half the session pasting `docker ps` output back and forth, summarizing log files for Claude, copy-pasting config blocks one screenful at a time. SSHive's MCP server collapses that loop: Claude calls the tool, gets the live output, reasons over it, suggests a fix. The fix lands faster, the conversation stays terse, and your hands stop translating between two terminals. What is unique about SSHive vs other ways of giving Claude SSH access: • It uses sessions you already have open. Other approaches require you to give Claude raw SSH credentials, which means the credentials end up in the model's context, which is a security risk for any non-toy fleet. SSHive instead exposes *your existing authenticated sessions*, Claude never sees the key material, only the side effect of running commands. • It runs locally. Some "SSH for AI" tools spin up a cloud relay so the model can reach your servers through their infrastructure. SSHive's MCP server is bound to `127.0.0.1`, your traffic never leaves your Mac. • It survives across model versions. The MCP standard is Anthropic's, and Claude Code, Cursor, Claude Desktop and an increasing number of other clients implement it. The same SSHive MCP server works with all of them without per-client configuration drift.

Frequently asked questions

Does Claude see my SSH private keys?+
No. SSHive's MCP server exposes the *sessions*, not the credentials. Your keys, passphrases, and host configs stay inside SSHive's Keychain entries. Claude can call `ssh_execute` on a connected session, but it cannot ask for your private key.
Where does the MCP traffic go?+
Localhost only. The MCP server binds to `127.0.0.1`, it is not reachable from the network. Claude Code's `claude` process and SSHive talk over the loopback interface, Bearer-token authenticated. No cloud relay, no telemetry.
Can Claude write files to my servers via SFTP?+
Yes, if you let it, the `sftp_write_file`, `sftp_write_file_chunk` and `sftp_write_from_local_path` tools are exposed. Claude will ask you to confirm before writing if your Claude Code permission profile is set to require approval. You can also disable individual tools in SSHive Settings → MCP.
Why is MCP macOS-only and not iOS?+
MCP needs an always-on local HTTP server. iOS aggressively suspends background apps to save battery, which would kill the MCP server every time you switched apps. macOS does not have this restriction. Note that iOS still gets every other SSHive feature, SSH, SFTP, RDP, VNC, VPN, tunnels, broadcast, network tools.

Try SSHive Free for macOS

Get the all-in-one SSH, SFTP, RDP and VNC client for Mac. Free download, no signup required.

Download SSHive Free