Gemini CLI Manual Setup
Gemini CLI requires manual setup. TermFlow no longer generates its config in the Connect an AI agent (MCP) modal. The app's config source describes Antigravity CLI as Gemini CLI's successor; see Antigravity CLI for generated config.
Connection Values
Use a Gemini CLI setup that supports streamable-HTTP MCP servers. Map these values into the configuration supported by your installed client:
| Setting | Value |
|---|---|
| Server key | termflow |
| Transport | Streamable HTTP |
| Endpoint | http://127.0.0.1:42032/mcp |
Authorization header | Bearer <token> |
Optional X-Termflow-Terminal-Id header | A literal terminal ID |
TermFlow must be running. If you changed the MCP port in Settings → Connections, use that port instead. For a remote connection, use the address of the TermFlow machine.
Authentication
The token is the authToken shown in Settings → Connections. Localhost connections do not require it; requests require it when Expose on local network is enabled. Keep any config containing the token private and update it after rotating the token.
Terminal Identity
TermFlow injects TERMFLOW_TERMINAL_ID into each terminal it creates. If your client can send custom headers, set X-Termflow-Terminal-Id to that terminal's literal ID to use get_my_terminal, get_my_connections, and the "me" shorthand.
An honest note: This page does not assume Gemini CLI expands environment variables inside headers. Without a working identity header, call
list_terminalsand pass explicit terminal IDs to tools.
Verify the Connection
Reload your client's configuration and ask the agent to call list_terminals. It should return the terminals open in TermFlow. The server exposes eleven MCP tools.
Next Steps
- Other MCP Clients — generic HTTP setup and troubleshooting.
- Local API and Auth — the localhost and LAN authentication model.