← Back to Blog

Speed Run: Use Higgsfield MCP with Hermes Agent via SSH Tunnel

July 29, 2026 speed-run hermes

Introduction

Higgsfield is an AI media platform that exposes an MCP server on localhost:8765. But there's a catch — their OAuth authentication flow opens a browser window, and your agent runs headless on a VPS with no display.

The solution is simple: SSH port forwarding. I'll show you how to tunnel your VPS's localhost:8765 to your local machine, run higgsfield auth login, and connect your Hermes Agent to use Higgsfield's tools — all in under 10 minutes.

Prerequisites

Before you start, make sure you have:

SSH Access
Higgsfield

Don't have a Higgsfield account yet? Sign up here.

Step 1: Start the SSH Tunnel

On your local machine, open a terminal and forward port 8765 from your VPS to your localhost:

ssh -p 2211 -N -L 8765:localhost:8765 root@wildflower.derez.ai

This tells SSH to listen on your local port 8765 and forward everything to port 8765 on the VPS. The -N flag means “don't open a shell—just forward ports.” Keep this terminal open for the entire session.

Step 2: Authenticate on the VPS

SSH into your VPS and run the Higgsfield login:

ssh -p 2211 root@wildflower.derez.ai
higgsfield auth login

This command starts a local HTTP server on the VPS and tries to open your default browser. But the VPS has no display, so the browser opens on localhost:8765 — which is the VPS's localhost, not yours.

Because your SSH tunnel is running, the VPS's localhost:8765 is forwarded to your machine's localhost:8765. The browser opens on your local machine and connects seamlessly through the tunnel.

Why the tunnel is necessary: Without the SSH tunnel, higgsfield auth login opens the OAuth page on the VPS's localhost (port 8765 on the VPS itself), and your local machine's browser can't reach it. The tunnel bridges that gap — the VPS thinks the browser is local, but the browser window actually appears on your machine.

Complete the OAuth flow in your browser. Once authenticated, the token is stored on the VPS and higgsfield auth status should confirm you're logged in.

Step 3: Connect Hermes Agent

In your Hermes dashboard, add the Higgsfield MCP integration pointing to http://localhost:8765 on the VPS. Your agent communicates with the VPS's localhost, which is the same endpoint that higgsfield auth login used.

The agent connects via the MCP protocol. No API keys needed beyond what you set during auth login — the agent reuses the token already stored on the VPS.

Step 4: Use Higgsfield Tools

With the integration active, your agent can call Higgsfield's MCP tools. Here's the pattern:

higgsfield mcp call video.create --prompt "A cinematic drone shot over a sunset coastline" --output /tmp/video.mp4

Replace with whatever tool and parameters Higgsfield exposes. The agent handles the MCP request/response cycle through the local port.

Wrap Up

SSH port forwarding solved the browser auth challenge for a headless VPS. The same pattern works for any MCP server or local HTTP tool that needs OAuth — forward the port, run auth, keep the tunnel alive, and your agent gets full access.

Pro tip: Use autossh instead of raw ssh -N for your production tunnels. It auto-reconnects if the SSH connection drops, so your agent's MCP integration stays alive without you noticing.

Use coupon code BLOG950 at checkout to get $9.50 off your first month — zero risk, full access.

Deploy your own agent now.

derez.ai — Deploy your AI agent in 10 Minutes.