Give Gemini CLI live web data

Run gemini mcp add -t http with a Bearer header and Apify's MCP URL, scoped to the Actors you want in ?tools=. Gemini CLI saves the server in settings.json; start gemini and type /mcp to see the tools.

Method

  1. Export APIFY_TOKEN first: the shell expands it and Gemini CLI saves the header, token included, in plain text in ~/.gemini/settings.json (keep that file private). In PowerShell write $env:APIFY_TOKEN instead of $APIFY_TOKEN. Drop -s user to save it in the project's .gemini/settings.json.

    Gemini CLI config for Google Maps Business Lead Finder with Email & Social Linksterminal (writes ~/.gemini/settings.json)

    gemini mcp add -t http -s user -H "Authorization: Bearer $APIFY_TOKEN" google-maps-business-lead-finder-with-email "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/google-maps-business-lead-finder-with-email"

  2. Start gemini and type /mcp to check that the server is connected and lists its tools.

  3. Saved by hand, a remote server uses the httpUrl key for streamable HTTP (url means the older SSE transport).

The example uses Google Maps Business Lead Finder with Email & Social Links. Every Actor page and every website page below has the same config, pre-filled.

Good to know

  • -s user saves the server for every project in ~/.gemini/settings.json; without it the server goes into the project's .gemini/settings.json.
  • In settings.json, httpUrl means streamable HTTP and url means the older SSE transport. Apify's server only speaks streamable HTTP, so use httpUrl if you edit the file by hand.
  • The header is written with the token your shell expands from APIFY_TOKEN, so keep settings.json out of version control.
  • --include-tools and --exclude-tools narrow what Gemini may call; the scoped URL already limits the server to your Actors.

Gemini CLI configs by website

Each page opens on the Gemini CLI tab.

When Gemini CLI does not connect

Why does the client say Unauthorized or invalid token?

Every Apify Actor tool needs a signed-in Apify account. Reconnect the server so the OAuth sign-in runs again, or switch to the token variant: an Authorization: Bearer header with an API token from Apify Console, Settings, API and integrations. For a local server the token must be in the server's own env block, not only in your shell.

Source: Apify MCP server README

Why did my agent's tool list change after an update?

Without a tools parameter Apify's server loads its default tool set, which changes between releases. The URLs on this site pin the tools with ?tools=, so the agent always gets the same Actor tool plus fetch-actor-details. Apify's README gives the same advice for production.

Source: Apify MCP server README

What happens when the agent sends input the Actor rejects?

The server answers with the Actor's input schema, so the agent can fix the arguments and call again. The fetch-actor-details tool in every scoped URL lets it read that schema before the first call.

Source: Apify MCP server README

Gemini CLI connects but finds no tools. What is wrong?

In settings.json a remote server needs httpUrl for streamable HTTP; url means the older SSE transport, which Apify's server no longer offers. Adding it with gemini mcp add -t http writes the right key.

Source: Gemini CLI MCP documentation

My old config uses mcp.apify.com/sse and stopped working. Why?

Apify retired the SSE transport on 1 April 2026. Use https://mcp.apify.com with the streamable HTTP transport, as every config on this site does.

Source: Apify changelog: MCP improvements

Questions

Which transport should I choose for Apify in Gemini CLI?

Streamable HTTP: -t http on the command line, httpUrl in settings.json. Apify retired its SSE endpoint in April 2026.

Can I add more than one Actor?

Yes. List them comma-separated in the tools parameter of the URL, or build the URL with the MCP bundle builder on this site.

Sources