google-trends
Summary: This MCP server fetches live Google Trends data and adds it to questions for Claude Code/Cursor.
Get current trending searches by country or region with approximate volume and headlines.
Compare search interest for 1-5 keywords over selectable timeframes on a 0-100 scale.
Retrieve top and rising related queries for a keyword, including Breakout growth above 5000%.
Enrich a user's question with trending searches plus optional keyword interest/related data using
add_trends_to_question.Configure default country, result limits, cache TTL, and fetch timeout; no API key and results cached for five minutes.
Expose Claude Code slash prompt
ask_with_trendsand MCP tools usable from Cursor.
Fetches live Google Trends data, including trending searches by country, keyword interest over time, and related queries. It can attach this trends data to user questions for context.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-trends what's trending on Google in the US right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Trends-MCP
An MCP server that fetches the latest Google Trends data and adds it to the question sent to the model. Works with Claude Code and Cursor.
What it does:
Runs as a stdio MCP server so Claude Code or Cursor can spawn it.
Pulls live Google Trends data: trending searches, interest over time, related queries.
Adds that data to your question, either when you ask (tool / slash command) or on every prompt (Claude Code hook).
No API key. Google Trends doesn't have a public API, so this uses the same endpoints the trends.google.com site uses and caches results for five minutes so Google doesn't start rate limiting.
Requirements
Node.js 18 or newer
Related MCP server: Google Trends MCP Server
Install
git clone https://github.com/yzafar2003/Trends-MCP.git
cd Trends-MCP
npm install # also compiles to dist/
npm run smoke # optional: hits live Google Trends through the serverConnect to Claude Code
Option A: per project. Open Claude Code inside the cloned folder. The included .mcp.json registers the server automatically. Approve it when prompted.
Option B: everywhere. Register it once for your user:
claude mcp add --scope user google-trends -- node "C:/path/to/Trends-MCP/dist/index.js"Verify with claude mcp list. You should see google-trends: ... - ✓ Connected.
Then either ask naturally ("what is trending in the UK right now?") and Claude will call the tools, or use the slash command, which fetches the data first and sends it along with whatever you type after it:
/mcp__google-trends__ask_with_trends What should my next blog post be about?
/mcp__google-trends__ask_with_trends GB What should my next blog post be about?
/mcp__google-trends__ask_with_trends GB keywords=bitcoin,ethereum Which of these is getting more attention?Options go first, as single tokens: an UPPERCASE country code (or geo=gb) and keywords=a,b,c for terms to look up in detail. Everything else is your question. Claude Code splits the text after a command on spaces and feeds the tokens to the prompt's arguments one by one, which is why the options have to be single words and why a lowercase country code is only accepted in the geo= form.
Automatic injection on every prompt (Claude Code hook)
If you want the trends data added to every question without asking, add a UserPromptSubmit hook. Put this in .claude/settings.json (project) or ~/.claude/settings.json (user), adjusting the path:
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node \"C:/path/to/Trends-MCP/dist/hook.js\"",
"timeout": 20
}
]
}
]
}
}A ready-made copy is in hooks/claude-code-settings.example.json. The hook never blocks a prompt: if Google Trends is unreachable it silently adds nothing.
Hook environment variables (set them in the "env" of the hook command or your shell):
Variable | Default | Meaning |
|
| Country code for trending searches |
|
| How many trending searches to include |
| unset | Regex. When set, data is only added if the prompt matches it, e.g. |
Connect to Cursor
Add the server to .cursor/mcp.json in your project (a copy is included in this repo) or to ~/.cursor/mcp.json for all projects:
{
"mcpServers": {
"google-trends": {
"command": "node",
"args": ["C:/path/to/Trends-MCP/dist/index.js"],
"env": { "TRENDS_GEO": "US" }
}
}
}Enable it under Cursor Settings → MCP. In Agent mode, Cursor will call add_trends_to_question or the other tools when your question depends on what people are searching for. You can also nudge it: "use add_trends_to_question first, then answer". Cursor supports MCP tools and resources but, at the time of writing, not MCP prompts, so the ask_with_trends slash command is a Claude Code thing.
What the server exposes
Tools
Tool | What it does |
| Latest trending searches for a country, with approximate volume and a headline each. |
| 0-100 search interest for 1 to 5 keywords over a timeframe, like the Google Trends chart. |
| Top and rising related queries for a keyword. "Breakout" means growth above 5000%. |
| Fetches everything above and returns the user's question with the data attached, ready to answer. |
Common arguments: geo (ISO country or region code, e.g. US, GB, IN, PK, US-CA) and timeframe (one of now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y).
Prompt
ask_with_trends(geo?, keywords?) fetches the data and returns a user message containing the trends block plus an instruction to answer the question typed after the command. Claude Code exposes it as /mcp__google-trends__ask_with_trends. Both arguments are optional single tokens: GB or geo=gb, and keywords=term1,term2.
What the injected block looks like
<google_trends fetched_at="2026-11-11T10:01:44Z" geo="US">
Trending now on Google (US):
1. when is black friday 2026 (500+ searches) - Early Amazon Kitchen Deals ... (Allrecipes)
2. side effect (5000+ searches) - FDA orders new warning labels on Ozempic ... (Fox Business)
...
Interest over time (US, today 3-m, 0-100 scale):
bitcoin: avg 47, ethereum: avg 6
Most recent points:
Nov 10, 2026: bitcoin=43, ethereum=5
...
Related queries for "bitcoin" (US, today 3-m):
Top:
bitcoin price (100)
Rising:
british man recovers lost bitcoin (Breakout)
</google_trends>
Question: Is bitcoin getting more popular?Server environment variables
Variable | Default | Meaning |
|
| Default country when a tool call omits |
|
| How long fetched data is reused (5 minutes) |
|
| Per-request timeout |
Development
npm run build # compile src/ to dist/
npm run dev # recompile on change
npm run smoke # spawn the server over stdio and call every tool against live dataSource layout:
src/trends.ts: Google Trends client (RSS trending feed, explore tokens, widget data, caching, formatting).src/index.ts: MCP server with the tools and prompt.src/hook.ts: Claude CodeUserPromptSubmithook.scripts/smoke.mjs: end-to-end check using the MCP client SDK.
Caveats
The explore endpoints get rate limited fairly easily. If you see HTTP 429, wait a minute and retry. The trending RSS feed is much more forgiving and is always fetched first.
"Trending now" is whatever Google puts in the RSS feed, roughly the last 24h per country.
These are unofficial endpoints. They could change or break at any time.
License
MIT
Available Tools
4 toolsadd_trends_to_questionAdd Google Trends data to a questionA
Fetch the latest Google Trends data (trending searches, plus interest-over-time and related queries for any keywords given) and return the user's question with that data attached. Call this before answering any question that depends on what people are currently searching for, and then answer the enriched question.
Inputs: question (required), geo, keywords, timeframe, +1 more.
interest_over_timeGoogle Trends interest over timeA
Compare search interest for 1-5 keywords over a time range (0-100 relative scale, like the Google Trends chart). Use this to see whether something is rising or falling in popularity.
Inputs: keywords (required), geo, timeframe.
trending_nowTrending now on GoogleA
Fetch the latest trending Google searches for a country, with approximate search volume and a related headline for each. Use this for 'what is trending right now' questions.
Inputs: geo, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The three core tools (trending_now, interest_over_time, related_queries) target clearly distinct Google Trends views. However, add_trends_to_question is a composite that re-fetches trending searches plus interest-over-time and related queries, so an agent faces a real choice between the granular tools and the wrapper, and the instruction to call it 'before answering any question that depends on current searches' actively overlaps with the other three.
All names use snake_case, which is consistent, but the structural convention is mixed: trending_now and interest_over_time are adverb/noun phrases, related_queries is adjective+noun, and add_trends_to_question is a verb_noun_to_noun pattern. The result is readable but not a predictable verb_noun scheme.
Four tools is a tight, well-scoped surface for a Google Trends server, and each of the three core tools maps to a real Trends capability. The only waste is the composite add_trends_to_question, which largely duplicates the others rather than adding a new operation.
The surface covers the three most common Trends workflows (current trending, time-series interest, related queries), but notable gaps remain: no interest-by-region/subregion breakdown, no keyword suggestion or category filters, and no way to get trending by category. Agents needing geographic comparison will hit a dead end.
Maintenance
Related MCP Connectors
SEO research, Search Console, GA4 and PPC tools for Claude and ChatGPT.
Claude connector and ChatGPT connector for trend data: Google, TikTok, YouTube, Reddit, Amazon
Google Search Console, GA4, Bing Webmaster and PageSpeed MCP for Claude, ChatGPT, Cursor. Free.
Read-only Google Ads, GA4 and Search Console data for Claude, with no Google Cloud setup.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceReal-time trend data from Google Trends (Search, Images, News, Shopping), YouTube, TikTok, Reddit, Amazon, Wikipedia, npm, Steam, Spotify, X (Twitter), App Store, Google Play, web traffic, and news sentiment via one MCP connection. Works with Claude, Cursor, VS Code, Windsurf, ChatGPT, and any MCP-compatible AI.28MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access Google Trends data for comparing keywords, discovering trending searches, and analyzing regional interest through natural language.2MIT
- AlicenseBqualityDmaintenanceEnables Claude to query Google Trends data such as keyword interest, related queries, and regional popularity, with robust proxy rotation to bypass Google's anti-bot measures.566 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query Google Trends data, including search interest over time, regional breakdowns, trending searches, and keyword ideas.MIT