Gemini CLI connects to the Trends API MCP server through settings.json, and the field name is the part that trips people up: remote HTTP servers take httpUrl, not url. One entry registers https://api.trendsapi.ai/mcp with the same Bearer key as REST. After the session restarts, three tools are available in the terminal: get_time_series, get_growth, and get_top_trends. Server-level detail sits on MCP server setup.
The settings entry
{
"mcpServers": {
"trends-api": {
"httpUrl": "https://api.trendsapi.ai/mcp",
"headers": {"Authorization": "Bearer YOUR_API_KEY"}
}
}
}
Put the file at .gemini/settings.json in a project, or in the user profile for every session. An url field instead of httpUrl points Gemini at the wrong transport. Header quoting rules match REST and sit on authentication.
Ask from the terminal
"Growth for ollama on google search over 12M" maps to get_growth with source google search. "Top of the GitHub board" maps to get_top_trends with type GitHub. Keyword calls take a source string; board calls take a type label. Both lists sit on the sources reference.
The terminal is the point. A developer checking whether a library is gaining ground can read the percent, then run the install command in the same window. No browser tab, no export step.
Session questions versus scheduled jobs
Gemini CLI is a question surface, suited to one answer at a time. Cron jobs, Airflow dags, and backfills belong on POST https://api.trendsapi.ai/api. Only successful 200 responses count against quota; caps sit on pricing. The hosted research version of this setup sits on Perplexity Trends MCP.