Google Trends MCP for Gemini

Gemini CLI stores remote MCP under httpUrl. That is the Google Trends path. AI Studio without an MCP field should wrap REST instead.

Google Trends reaches Gemini through Trends MCP as Streamable HTTP, not through Cursor’s url plus transport object. Gemini CLI stores the server under mcpServers in ~/.gemini/settings.json (user) or .gemini/settings.json (project). The remote field is httpUrl https://api.trendsmcp.ai/mcp with a Bearer key from the account page. Then get_top_trends type Google Trends returns the live board. get_growth source google search returns keyword history. Default board limit is 25.

The generic install is Trends MCP for Gemini. The ranked shortlist is best MCP servers for Gemini. Cursor combo: Google Trends MCP for Cursor. API contract: Google Trends API. Gemini is a model runtime. It is not a Google Trends license and not Search Console.

httpUrl is the Gemini field

"trends-mcp": {
  "httpUrl": "https://api.trendsmcp.ai/mcp",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}

Gemini CLI can also add the server. Flags belong in a fence:

gemini mcp add --transport http trends-mcp https://api.trendsmcp.ai/mcp --header "Authorization: Bearer YOUR_API_KEY"

Never point Gemini at https://www.trendsmcp.ai/mcp. That www host is Claude.ai OAuth. Official CLI field names: Gemini CLI MCP docs (accessed 26 August 2026). Recheck that page if Google renames keys.

Say “using TrendsMCP.” A Gemini loop that only has Search grounding will invent a rank from a snippet. A loop that only has Trends MCP cannot open an arbitrary URL. Pair them.

Board string versus keyword string

Type Google Trends takes no keyword. Source google search takes a phrase. The source is not google trends. That mix is invalid_source.

get_top_trends(type="Google Trends", limit=25)
get_growth(keyword="gemini cli", source="google search", percent_growth=["30D", "12M"])

Category boards use type Google Trends by Category plus an official name such as Technology. sort rank_change needs a baseline snapshot. REST series mode is get_time_series. Weekly grain.

get_growth with google search, tiktok on one keyword is two requests. Several windows in one call still count once per source plus keyword.

Do not freeze this morning’s board in a system prompt. Cite as_of_ts.

When Studio has no MCP field

Google AI Studio only works if that account actually exposes custom MCP HTTP. If it does not, wrap REST: POST https://api.trendsmcp.ai/api with mode get_top_trends or get_growth, then expose those as function declarations. The user-facing model can stay Gemini. The trend host stays api.trendsmcp.ai.

A Gemini app in Cloud Functions that embeds the Bearer key in a public client is a leak. Keep the key on the server.

Free 100 requests per month. Starter $19 / 1,000. Pro $49 / 5,000. Business $199 / 25,000. Annual 20 percent off. Pricing. One proving board plus one growth call is two requests. An agent that pages every official category finishes the free month before the brief is written.

Empty series: not_found or data_unavailable. Low-volume keywords print huge percents on a 1-to-2 index. Quote both values. Official Google Trends API Alpha is Google Cloud, not this MCP.

Gemini CLI is a weak cron. Nightly boards belong on REST or n8n. Connecting is free. Calling is not.

If tools miss after a restart, check httpUrl before blaming the API. Cursor transport in this file is the usual miss.

Gemini API apps versus the CLI

Gemini CLI is one runtime. A Vertex or AI Studio app that calls the Gemini API is another. The CLI reads httpUrl. The app only sees Trends MCP if the developer declared tools. Function declarations that POST https://api.trendsmcp.ai/api with mode get_top_trends or get_growth keep the contract on the api host when Studio has no MCP field. Do not ship the Bearer key to a browser bundle.

Grounding with Google Search can retry. A grounded retry is not a Trends MCP request. A failed MCP call that Gemini retries is a Trends MCP request. Pin google search as the source string in the system prompt so a retry does not send google trends and bill twice.

A proving loop that fits the free month: one Google Trends page, one get_growth on a single phrase with 30D and 12M in the same call. Two requests. Category type Google Trends by Category is a third object. Skip it unless the ticket named a category.

~/.gemini/settings.json is user-level. Project .gemini/settings.json is the better home for a shared server name. Mixing a production tmcp_live_ key into a public repo is a leak. Restricted folders can hide MCP until the workspace is trusted. That failure looks like “Google Trends MCP does not work in Gemini” when the runtime is protecting the directory.

Empty not_found on a later growth call is not a failed connect. The board already proved the server. Fail closed. Do not ask Gemini to estimate a percent from grounding snippets.

If the next turn needs Ads or Search Console, stop using Trends MCP. Official Google products own those objects. This CLI path stays public boards plus weekly search history. A Vertex job that wraps REST should log mode and type so a 429 can be traced. Connecting is free. Calling is not. Do not treat Gemini grounding as as_of_ts. Gemini CLI logs help when a 401 repeats. The log will show the host. www means the OAuth URL leaked. api with a missing Bearer means the header never landed. Fix the settings file, restart the CLI session, then prove one board. Do not loop categories while debugging auth. That loop is how the free month dies during setup.

AI Studio chat that has no MCP row still uses REST. POST https://api.trendsmcp.ai/api with mode get_top_trends and type Google Trends. Do not invent an httpUrl field inside a Studio prompt. Gemini CLI is the client this page means when MCP is the job. Grounding snippets are not as_of_ts.

Common questions

In Gemini CLI, put Trends MCP under mcpServers with httpUrl https://api.trendsmcp.ai/mcp and a Bearer header. Then ask the model, using TrendsMCP, for get_top_trends type Google Trends or get_growth source google search. The Gemini setup page holds current field names.
No. Cursor uses url plus transport http. Gemini CLI remote Streamable HTTP uses httpUrl. SSE leftovers use url. Mixing those keys is why a restart shows zero tools.
No. If the account has no custom MCP HTTP field, wrap REST POST https://api.trendsmcp.ai/api as Gemini function declarations. Do not invent a Cursor file inside Google Cloud.
No. Grounding cites web pages. Trends MCP returns a hosted board and a weekly google search series. Pair them. Do not treat a grounded snippet as as_of_ts.