xSpeed Cache is officially live! Get 50% OFF during Launch Week — Lifetime starts at just $79Lifetime from $79 — 50% OFF, Launch Week! See Plans →

See Plans →
Features
xSpeed Hub Pricing Docs Blog Scan
Appearance
Get Plugin

Connect Gemini CLI to xSpeed Hub MCP

AI & MCP 3 min read Updated Oct 2026

Add xSpeed Hub to Gemini CLI with gemini mcp add, authenticate with /mcp auth, and manage every WordPress site from your terminal.

You add one remote MCP server, xspeedhub, to Gemini CLI and authenticate it once in a browser.

Before you start

You need a free xSpeed Hub account with at least one site connected. Connect your sites to xSpeed Hub first if you have not.

Steps

  1. Add xSpeed Hub to Gemini CLI

    Run this once. --scope user writes the server to ~/.gemini/settings.json so it works in every project; without it Gemini CLI saves to the project's .gemini/settings.json, which is the default.

    Terminal
    gemini mcp add --scope user --transport http xspeedhub https://app.xspeedcache.com/xspeed/mcp
  2. Authenticate with /mcp auth

    Start gemini and run /mcp auth xspeedhub. A browser page opens where you sign in to xSpeed Hub and approve access, and Gemini CLI receives the redirect on a local port. There is no token to paste, and the client keeps the credentials it receives. Run /mcp afterwards to check that xspeedhub shows as connected and lists its tools.

    Text
    /mcp auth xspeedhub

Sign-in

OAuth sign-in or connection token. Run /mcp auth xspeedhub and approve access in the browser; Gemini CLI registers itself, stores the tokens and refreshes them. If you prefer a header, pass the connection token from the Hub's Connect AI page with --header when you add the server.

Alternative

Or use a connection token

If you cannot open a browser, for example over SSH, edit the settings file and send the connection token as a header. Copy it from Connect AI in the Hub; only the workspace owner sees it. The httpUrl field is the one Gemini CLI documents for streamable HTTP servers, and the same entry can be created with the --header flag on gemini mcp add.

~/.gemini/settings.json
{
  "mcpServers": {
    "xspeedhub": {
      "httpUrl": "https://app.xspeedcache.com/xspeed/mcp",
      "headers": {
        "Authorization": "Bearer <your connection token>"
      }
    }
  }
}

Check it worked

Ask Gemini CLI this. It only reads, so nothing changes on your sites.

Prompt
Use xSpeed Hub to list my sites and tell me which of them have the preloader stopped.

A first prompt

Prompt
With xSpeed Hub, show the page cache hit ratio for every site and flag any below 70%.

If something does not work

  • OAuth needs a browser on the same machine and a localhost redirect. In a headless shell, an SSH session or a container without a browser, use the connection token header instead.
  • The default scope of gemini mcp add is project. Add --scope user, or the server will look missing when you start Gemini CLI in another folder.
  • Keep underscores out of the server name. Gemini CLI documents that its policy parser splits tool names at the first underscore, so a name like xspeed_hub could make allow and deny rules fail silently. The name xspeedhub is safe.
  • Do not add --trust to this server, and do not start Gemini CLI with --approval-mode=yolo (or --yolo) while the Hub is connected. Each bypasses tool confirmations, including the ones for purges and settings changes.