Skip to main content
Step-by-step guides for SSH on macOS

Connect Claude Code or Cursor to SSH via MCP

Let your AI assistant execute commands, read files, and triage incidents directly on your servers — through SSHive's built-in MCP server.

Estimated time: 3 minutes
MCP (Model Context Protocol) is the open standard Anthropic introduced for AI assistants to talk to local tools. SSHive ships with an MCP server built-in — meaning Claude Code, Cursor, or Claude Desktop can read your active SSH sessions, run commands, and browse SFTP filesystems. The server only listens on localhost, uses Bearer token auth stored in the macOS Keychain, and inherits the permissions of your existing SSH connections. Setup takes 30 seconds.

Step-by-step

  1. 1

    Open Settings → MCP and flip the single toggle (Pro required)

    Open SSHive Settings, pick **MCP** in the sidebar. The page is dominated by one switch: **"Enable MCP server"**. Toggling ON does three things at once: starts the local HTTP server (default port `49422`, customizable via the port field with the Apply button), generates a Bearer-token UUID stored in `settings.json`, and auto-injects an `mcpServers.sshive` entry into the config files of every detected AI client (`~/.claude.json`, `~/.cursor/mcp.json`, plus Claude Desktop's config). Toggle OFF stops the server **and** removes those entries. MCP is **Pro-only**: in Free, the toggle triggers the upgrade modal instead of starting the server.
  2. 2

    Auto-injection vs copy-paste — what each client gets

    For **Claude Code** (CLI + IDE extension) and **Cursor**: SSHive writes directly to `~/.claude.json` and `~/.cursor/mcp.json` (mode `0600` — token is sensitive). The MCP page shows their status as `Configured ✓` or `Not detected`. You don't have to copy anything. For **Claude Desktop** (which only supports stdio, not HTTP natively): SSHive shows a separate copyable block using `npx -y mcp-remote` as a stdio-to-HTTP shim — paste it into `claude_desktop_config.json`. For any other MCP-compatible client: a "Copy Streamable HTTP config" button copies a JSON block **with your real token** ready to paste anywhere.
  3. 3

    Connect SSH sessions in SSHive — they become the AI's tools

    The MCP server only exposes sessions that are **currently connected** in SSHive. Connect to prod, staging or whatever servers you want the AI to reach. The exposed tool surface: `ssh_list_sessions`, `ssh_execute`, `sftp_list`, `sftp_read_file` (1 MB max), `sftp_write_file` (in-memory), `sftp_write_file_chunk` (4 MB chunks for big files via base64 append) and `sftp_write_from_local_path` (read a local file → write to remote, zero base64 — best for large transfers).
  4. 4

    Restart the AI client and ask away

    Restart Claude Code, Cursor or Claude Desktop so they pick up the new MCP entry. Ask: "run `df -h` on the prod SSH session and flag any volume above 80%". The AI calls `ssh_execute` against your live SSHive session, parses, summarizes — and SSHive logs every tool call so you can audit what happened. To rotate the Bearer token: hit "Regenerate token" in Settings → MCP (a double-click confirmation gives you 4 seconds to back out). Old configs become invalid and SSHive re-writes the new token into the client config files it manages (`~/.claude.json`, `~/.cursor/mcp.json`).

Frequently asked questions

Is the MCP integration safe?+
The AI can only do what you can do via the active SSH session — it has no extra privileges. SSHive logs each tool call. The MCP HTTP server binds to `127.0.0.1` only — never reachable from the network. The Bearer token lives in `settings.json` (rotatable from the UI), and the auto-written client configs are mode `0600` (owner read/write only).
Does this require a Pro subscription?+
Yes. MCP is part of SSHive Pro (one-time purchase on the Mac App Store). There is no degraded "read-only MCP" mode in Free — the toggle simply opens the upgrade modal.

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