Client Onboarding

Advanced cloud-relay MCP client configurations for the HITL Relay. For direct LAN or Tailscale agent control, start with HITL Channel.

Recommended: Direct Host Agents via HITL Channel (LAN / Tailscale)

Pair Claude Code (:8789), Antigravity (:8790), Codex (:8791), or Hermes (:8792) directly with the mobile app with no cloud relay. Open the Remote Agents guide → or jump to quick CLI snippets below.

Important Notes (Cloud Relay MCP)

  • The base URL for the HITL relay is: https://hitlrelay.app/mcp-server/mcp/
  • To support HITL's 15-minute timeout for human input, you may need to adjust your client's default timeout settings (e.g., from 60 seconds to 900 seconds).
  • You can customize the agent name displayed in the HITL app in three ways:
    • By suffixing the MCP URL: .../mcp/your_agent_name
    • By sending an X-MCP-Agent-Name header.
    • By default, the name from the Dynamic Client Registration is used. This is especially useful for differentiating multiple instances of the same agent type (e.g., multiple Claude instances).

Instructions for Claude code

Basic syntax

claude mcp add --transport http Human-in-the-Loop https://hitlrelay.app/mcp-server/mcp/

Example with custom agent name via URL suffixing

claude mcp add --transport http Human-in-the-Loop https://hitlrelay.app/mcp-server/mcp/your_agent_name

Example with custom agent name via header

claude mcp add --transport http Human-in-the-Loop https://hitlrelay.app/mcp-server/mcp/ \
  --header "X-MCP-Agent-Name: Your Agent Name"

You also need to modify MCP_TOOL_TIMEOUT in your settings.json to be 900000 (15 minutes). See the Claude Code Settings.json documentation for more details.

Instructions for Codex CLI

Server transport configuration

STDIO

# The top-level table name must be 'mcp_servers'
# The sub-table name (`server-name` in this example) can be anything you would like.
[mcp_servers.human-in-the-loop]
command = "npx"
# Optional
args = ["-y", "mcp-remote", "https://hitlrelay.app/mcp-server/mcp/codex_cli"]

Streamable HTTP (recent support in Codex CLI)

# Streamable HTTP requires the experimental rmcp client
experimental_use_rmcp_client = true
[mcp_servers.human-in-the-Loop]
url = "https://hitlrelay.app/mcp-server/mcp/codex_cli"

Other configuration options

# Optional: override the default 60s per-tool timeout
tool_timeout_sec = 900

Instructions for Gemini CLI

Configure MCP servers in ~/.gemini/settings.json to extend Gemini CLI with custom tools:

Add an mcpServers object to your settings.json file:

{
  "mcpServers": {
    "human-in-the-loop": {
      "url": "https://hitlrelay.app/mcp-server/mcp/gemini_cli",
     "timeout": 900000
    }
  }
}

Claude Desktop

Configuration for Claude Desktop follows the same pattern as other MCP clients. Add the server configuration to your Claude Desktop settings.

Chat GPT

You can now use the HITL in ChatGPT as it supports remote MCP. Please see the official documentation and this video for more details.

Unfortunately there is an MCP timeout of 60 seconds so you will need to respond within that time or the request will fail. You can still send one-way notifications to your phone which could be useful for longer running tasks.

Cursor

Install in Cursor manually:

  1. Press Cmd/Ctrl + Shift + J to open Cursor Settings
  2. Select Tools and Integrations
  3. Select New MCP Server
  4. Add the following configuration:
{
  "mcpServers": {
    "human-in-the-loop": {
      "url": "https://hitlrelay.app/mcp-server/mcp/cursor"
    }
  }
}

Optional: To use the service with cursor-agent:

cursor-agent mcp login human-in-the-loop

Windsurf

  1. Press Ctrl/Cmd + , to open Windsurf settings
  2. Scroll to Cascade → MCP servers
  3. Select Add Server → Add custom server
  4. Add the following configuration:
{
  "mcpServers": {
    "human-in-the-loop": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://hitlrelay.app/mcp-server/mcp/windsurf"]
    }
  }
}

Zed

  1. Press Cmd + , to open Zed settings
  2. Add the following configuration:
{
  "context_servers": {
    "human-in-the-loop": {
      "source": "custom",
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://hitlrelay.app/mcp-server/mcp/zed"],
      "env": {}
    }
  }
}

ROOCODE

Use mcp-remote or equivalent proxy for ROOCODE:

{
  "mcpServers": {
    "human-in-the-loop": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://hitlrelay.app/mcp-server/mcp/roocode"],
      "alwaysAllow": [],
      "disabled": false
    }
  }
}

For Streamable HTTP support:

{
  "mcp.servers": {
    "human-in-the-loop": {
      "type": "streamable-http",
      "url": "https://hitlrelay.app/mcp-server/mcp/roocode"
    }
  }
}

Direct Host Agents (LAN / Tailscale via hitl-channel)

Connect coding agents directly to the HITL app over your LAN or Tailscale with zero cloud intermediary using hitl-channel. Paired host agents support native session and workspace folder switching, CLI resume context, live output streaming with tool progress, mid-turn message queueing, correlated approval cards, and one-tap turn cancellation.

1. Install & start a host daemon

git clone https://github.com/slaser79/hitl-channel.git
cd hitl-channel
bun install

# Antigravity (default port 8790)
bun run src/cli.ts daemon --harness agy --cwd ~/your-project

# Codex via @agentclientprotocol/codex-acp (default port 8791)
bun run src/cli.ts daemon --harness codex --cwd ~/your-project

# Hermes Agent (default port 8792)
bun run src/cli.ts daemon --harness hermes --cwd ~/your-project

For interactive Claude Code Channel mode (default port 8789), see the MCP channel config in the hitl-channel Quick Start.

2. Pair from the HITL mobile app

  1. Open HITL and navigate to Agents → Connect a remote agent → Start Pairing.
  2. Select your machine under Discover (LAN mDNS) or choose Manual Entry with your LAN/Tailscale IP and matching port preset (8789–8792).
  3. Tap Connect and enter the 6-digit pairing code shown in your host terminal or desktop notification.
  4. Filter under Agents → Host Agents, tap the chat header pill to switch or create workspace sessions, and tap Stop host turn anytime to cancel a running turn.

For macOS login startup (launchd), Codex permission prompts (INITIAL_AGENT_MODE), and hook isolation (HITL_DAEMON_SESSION=1), see hitl-channel Daemon mode.