From dbf4c2e8cba46afdcab306f7326dde636930841d Mon Sep 17 00:00:00 2001 From: sepehr-safari Date: Wed, 23 Sep 2026 18:43:03 +0300 Subject: [PATCH] fix: say how Gemini CLI actually picks a transport for a url entry The Gemini CLI guide said a `url` entry means the older SSE transport and `httpUrl` means Streamable HTTP, and told readers to keep remote servers away from `wrap`. That is what Gemini CLI's MCP documentation page says, but not what its code does: in v0.60.0, the current release, a `url` entry is reached over Streamable HTTP unless it declares `"type": "sse"`, `"type": "http"` is Streamable HTTP, and `httpUrl` is a deprecated spelling of the same thing. Its settings schema also accepts `"type": "stdio"`. So `wrap` from 0.3.2 already handles Gemini CLI's remote entries the way it handles VS Code's: a plain `url` entry or a `"type": "http"` one is wrapped, and one that declares SSE or carries its own headers is skipped with the reason. The guide now says that, and says to rewrite an `httpUrl` entry as `url` with `"type": "http"`, which is Gemini CLI's own recommendation, before wrapping it. --- src/pages/guides/gemini-cli.astro | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/pages/guides/gemini-cli.astro b/src/pages/guides/gemini-cli.astro index d598533..920ed45 100644 --- a/src/pages/guides/gemini-cli.astro +++ b/src/pages/guides/gemini-cli.astro @@ -80,10 +80,14 @@ const guide = findGuide('gemini-cli'); agent-chaperone wrap ~/.gemini/settings.json can make the command change, but not the env line, which you add afterwards. It reads the file as strict JSON, and Gemini CLI allows comments in its settings, so a file with comments is refused with an error - and left untouched. Leave remote servers out of it: in Gemini CLI a url entry - means the older SSE transport and httpUrl means Streamable HTTP, and{' '} - wrap skips httpUrl entries and would treat a url entry - as Streamable HTTP. + and left untouched. A server Gemini CLI reaches by url is wrapped too, from + 0.3.2. Gemini CLI reaches a url entry over Streamable HTTP, the transport the + proxy uses too, unless the entry says "type": "sse", and a{' '} + "type": "http" becomes stdio once the entry runs a command. An entry + that declares SSE, or carries its own headers, is left alone and the output says + why. So is one written with httpUrl, the older spelling Gemini CLI has deprecated + in favour of url with "type": "http"; make that change and run{' '} + wrap again.

@@ -147,11 +151,14 @@ const guide = findGuide('gemini-cli'); those does not exist yet.
  • - A server Gemini CLI reaches by URL. Put an httpUrl server behind the - proxy by hand, as the MCP guide shows, with the URL - after --, and pass any token it needs with --header-env: headers - written in the Gemini CLI entry never reach the proxy. A url server speaks SSE, - and the proxy reaches a URL over Streamable HTTP only. + A server that authenticates with headers. Headers written in the Gemini CLI entry + never reach the proxy, which is why wrap leaves such an entry alone. Put it + behind the proxy by hand, as the MCP guide shows, + and pass the token with --header-env. +
  • +
  • + A server that speaks only SSE. The proxy reaches a URL over Streamable HTTP and + nothing else, so an entry with "type": "sse" stays as it is.
  • What a server does rather than what the call says. This is not a sandbox. It reads