From dbf4c2e8cba46afdcab306f7326dde636930841d Mon Sep 17 00:00:00 2001
From: sepehr-safari 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.
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.
+ "type": "sse" stays as it is.