Google Trends MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GTRENDS_HL | No | Language of the names Google returns (locations, categories, topics) | en-US |
| GTRENDS_GEO | No | Default location code (`US`, `IR`, `US-CA`) when a tool is called without one | worldwide |
| GTRENDS_PROXY | No | HTTP(S) proxy URL for requests to Google | |
| GTRENDS_COOKIE | No | A signed-in Google session (raw `Cookie` header). Only needed for `related_topics` | |
| GTRENDS_DB_PATH | No | The data file: cache, trending history, watchlist | <config dir>/trends.sqlite |
| GTRENDS_OFFLINE | No | Answer from the cache only, never contact Google | false |
| GTRENDS_TIMEZONE | No | IANA timezone for times in results and for hourly data, e.g. `Asia/Tehran` | |
| GTRENDS_CACHE_TTL | No | Seconds a chart answer is reused | 3600 |
| GTRENDS_CONFIG_DIR | No | Where the data file and session cookie live | ~/.config/gtrends-mcp-full |
| GTRENDS_TIME_BUDGET | No | Seconds one tool call may spend waiting on Google before it reports back | 50 |
| GTRENDS_COOKIES_FILE | No | A Netscape `cookies.txt` file with a signed-in Google session. Only needed for `related_topics` | |
| GTRENDS_MIN_INTERVAL | No | Seconds between requests to Google | 1.5 |
| GTRENDS_TRENDING_TTL | No | Seconds a Trending Now answer is reused | 300 |
| GTRENDS_ALLOWED_HOSTS | No | Host names allowed in HTTP mode behind a reverse proxy. HTTP mode has no authentication and will not start on a public address without this |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_capabilitiesA | Version, settings, session and cache state, saved history and the list of tools. Call this first when unsure. |
| check_endpointsA | Ask each Google Trends endpoint one small question and report which ones answer. Google Trends has no public API; this server uses the endpoints of the Trends website, which can change without notice. Run this when a tool fails unexpectedly: it separates "Google is rate-limiting me" from "this endpoint changed" from "the network is down". Sends about 12 requests and never answers from the cache. |
| find_locationA | Find the location code (geo) for a country, region, state or metro area by name. query: part of a name ("tehran", "calif", "bavaria") or a code ("IR").
inside: a code whose sub-locations to list instead ("IR" → its provinces, "US-CA" → its metro areas).
Codes look like IR, US, US-CA, US-CA-807. Every other tool takes them as |
| find_categoryA | Find the id of a Google Trends category ("Autos & Vehicles" = 47) to narrow a term to one meaning. A category limits a search term to searches Google files under that subject — "jaguar" in
Autos & Vehicles is the car, in Pets & Animals the cat. Pass the id as |
| find_topicA | Find the Google Trends topics for a piece of text and the ids that select them. A search term ("tesla") counts only searches containing that exact wording, in one language. A topic ("Tesla — Automotive company", id /m/0dr90d) counts every search about the thing, in any language and spelling, and leaves out other meanings (the band, the inventor). Pass a topic id wherever a keyword is expected. |
| clear_cacheA | Delete saved answers so the next call asks Google again. what: "expired" (default — only answers too old to be used even as a fallback), "all", or one kind: trending, timeseries, regions, related, explore. reset_session: also forget the stored session cookie and any back-off, for a clean start after a block. Saved Trending Now history and the watchlist are never touched. |
| trending_nowA | What people are searching right now: the full Trending Now list for a country or region. Each trend has its search volume, growth, start time, whether it is still active, its category and the other queries people type for the same story. geo: country or region code (US, GB, DE, IR, US-CA). Blank = the default location, else US. hours: look-back window — 4, 24, 48 or 168 (any value 1-191). category: filter by name, e.g. "sports", "technology", "business" (see the header of the result). status: "active" (still trending), "ended" or "all". sort_by: "volume", "growth" or "recent". contains: keep trends whose title or queries contain this text, as whole words. |
| trend_detailsA | Everything about one current trend: every query in it, the news behind it, and its hour-by-hour curve. trend: the trend's title, or any words it contains. geo: country or region code; blank = the default location, else US. with_chart: also fetch the last 7 days of hourly interest for the title (two more requests). |
| trending_feedA | The top daily search trends with the news stories behind each — Google's public trending feed. Lighter than trending_now (about 10-20 trends, one request) and it carries headlines and links, which makes it the quickest answer to "what is in the news in today". geo: country code; blank = the default location, else US. |
| trending_across_countriesA | Trends that are live in several countries at once — the stories that travel. Pulls Trending Now for each country and groups trends that are the same search (the same title, or one country's title appearing among another's queries). geos: comma-separated country codes, up to 12. Blank = US, GB, CA, AU, IN, DE, FR, BR. min_countries: only show trends found in at least this many of them. |
| match_trendsA | Which current trends touch your subjects — for newsjacking and timely content. terms: comma-separated words or phrases that define your niche (brands, products, people, subjects). A trend matches when its title or any query inside it contains one of them as whole words, in any letter case: "ai" finds «ai news», not «rain». geo: country or region code; blank = the default location, else US. |
| interest_over_timeA | Search interest over time for up to 5 terms on one shared scale — the main Google Trends chart. keywords: comma-separated terms or topic ids (find_topic). Operators work inside a term:
|
| interest_by_regionA | Where a term is most popular: countries, regions, cities or metro areas ranked by interest. With one term, each place gets 0-100 relative to the strongest place — interest as a share of that place's own searches, so a small region can outrank a large one. With 2-5 terms, each place shows how its interest splits between them (percentages), i.e. who wins where. geo: blank = worldwide (ranks countries); a country ranks its regions; a region its cities. resolution: auto, country, region, city, or dma (US metro areas). include_low_volume: also list places with little search volume. |
| related_queriesA | What else people who search a term also search: the top related queries and the rising ones. Rising = the largest growth against the previous period; "Breakout" means more than +5000%, usually a query that barely existed before. Top = the most searched, 100 being the most common. keyword: one term or topic id. timeframe, geo, category, property: as in interest_over_time. |
| related_topicsA | The topics (people, brands, things) searched alongside a term, top and rising, with their topic ids. Google withholds this list from anonymous sessions: without a signed-in cookie (GTRENDS_COOKIE or GTRENDS_COOKIES_FILE) it usually comes back empty, and this tool says so rather than pretending there are none. related_queries works either way. |
| compare_periodsA | One term in two time ranges on the same scale: this year against last year, this quarter against the one before. period: the range to look at (3m, 12m, 2026, 2026-03, or explicit dates; not hours). against: "year_before" (same dates a year earlier), "previous" (the range just before), or another range. The two curves are aligned by position, so day 10 of one sits beside day 10 of the other. |
| compare_locationsB | One term in up to 5 countries or regions side by side: where it matters more, and whether the curves move together. geos: comma-separated location codes (US, GB, DE) — countries or regions, not worldwide. The values say how large a share of each place's own searches the term takes, so a small country can score above a large one; they are not search counts. |
| keyword_overviewA | The whole Google Trends page for one term in a single call: curve, direction, top places, related searches. Use it as the first look at a keyword. It makes four requests; a part that Google refuses is reported and the rest is still returned. |
| compare_manyA | Rank 6 to 25 terms on one scale — past Google Trends' limit of five per comparison. Google rescales every comparison to its own maximum, so two separate five-term charts cannot be read against each other. This tool runs the terms in groups that all contain one shared anchor term and uses it to bring every group onto a single scale. anchor: the shared term. Blank = chosen automatically (a mid-sized term among the first five, which keeps both large and small terms measurable). Returns each term's average, peak and latest value, where the largest average is 100. Costs two requests per group of four terms. |
| seasonalityA | The yearly rhythm of a term: which months it peaks and dips, how reliably, and when to publish for it. Uses five years of data by default ("all" goes back to 2004). Growth or decline is removed first, so a rising term is not mistaken for a seasonal one. Returns a month-by-month index (100 = an average month), the peak and trough, how consistent the pattern is from year to year, year averages, the months ahead on the current rhythm, and a publishing date. lead_weeks: how long before demand starts to climb the content should be live. |
| trend_momentumB | Is each term growing, fading, flat or exploding — with the numbers behind the verdict. Each term (up to 8) is measured on its own scale, so a small term's shape is not flattened by a large one. Per term: year-over-year change of the last quarter, last quarter against the quarter before, the long-run slope, where it stands against its own peak, and a label: breakout, rising, stable, declining or new. |
| find_spikesA | The moments a term suddenly jumped: when each spike started, when it peaked, how long it lasted and how big it was. A spike is a run of points at least |
| share_of_searchB | Share of search: your brand's portion of all searches for you and up to 4 competitors, and how it is moving. Share of search tracks market share closely in many categories and moves before it, which makes it a cheap leading indicator. Returns each brand's share over the whole range, at its start and at its end (first and last fifth of the range), and the change in points. Use topic ids (find_topic) when a brand name has other meanings. |
| content_calendarB | A publishing calendar from seasonality: for up to 8 topics, when each peaks and the date its content must be live. Each term's five-year rhythm is measured; the result is sorted by what needs publishing soonest. Terms without a yearly pattern are listed as evergreen. lead_weeks: how long before demand starts to climb the content should be published. |
| daily_historyA | Day-by-day interest over a long range — Google Trends itself only gives daily data for up to ~9 months. The range is fetched as overlapping 8-month windows and the windows are joined on one 0-100 scale using the days they share. Up to about 4 years (8 windows, two requests each). Also returns the weekday pattern: which days of the week the term is searched most. start, end: YYYY-MM-DD; end defaults to today. points: rows to return (the daily series is averaged down to this many); the summary is always given. |
| keyword_ideasB | Keyword ideas from what people actually search next: rising and top related queries for up to 5 seed terms, merged. The same query coming from several seeds is listed once; each idea shows which seeds it came from — an idea related to several seeds sits at the centre of the subject. Rising ideas are sorted breakouts first: these are the searches that did not exist a period ago. Costs two paced requests per seed. |
| snapshot_trendingA | Save the current Trending Now list to the local history, so it can still be searched after Google drops it. Google shows a trend for about a week; after that there is no way to ask what was trending.
Each call stores every trend for the given countries (a trend seen again is updated, not
duplicated). Run it on a schedule — geos: comma-separated country or region codes (up to 12); blank = the default location, else US. hours: look-back window to save, 1-191. 24 is right for a daily schedule. |
| trending_historyA | Search the saved Trending Now history: when something trended, how big it got and how long it lasted. Works on what snapshot_trending has stored — no network. With no filter it lists the biggest saved trends of the period. contains: text the trend's title or queries must contain, as whole words. geo: one location code; blank = every saved location. days: how far back to look, counted from the trend's start. |
| watchlist_addA | Put terms on the watchlist so watchlist_report tracks their direction over time. keywords: comma-separated terms or topic ids. geo: the location to track them in (blank = default). note: an optional label, e.g. the client or campaign they belong to. |
| watchlist_removeA | Take terms off the watchlist. Blank geo removes them from every location; their past readings are kept. |
| watchlist_reportA | The watchlist measured now: each term's direction, what changed since the last report, and whether it is trending today. Every run stores a reading per term, so the next report can say "was stable, now rising".
Terms are measured over five years, one at a time (two requests each): |
| history_sqlA | Run a read-only SQL SELECT on the local data file, for questions the other history tools do not cover. Tables: trending(geo, title, qkey, started, ended, volume, growth, categories, breakdown, first_seen, last_seen) — one row per saved trend; times are unix seconds UTC; categories and breakdown are JSON lists. snapshots(id, taken_at, geo, hours, trends) — one row per snapshot_trending run. watchlist(keyword, geo, note, added_at) readings(keyword, geo, taken_at, latest, average, yoy, label) — one row per watchlist_report measurement. Example: SELECT title, volume, datetime(started,'unixepoch') FROM trending WHERE geo='US' ORDER BY volume DESC LIMIT 20 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| trend_report | A full read on one keyword: direction, seasonality, places, related searches and what to do about it. |
| newsjacking_brief | Today's trends that touch your subjects, with the story behind each and an angle to take. |
| seasonal_content_plan | A publishing calendar for a list of topics, built from their five-year seasonality. |
| market_comparison | Share of search for a brand against its competitors, where each one wins, and what is rising around them. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Reading Google Trends | How to read the 0-100 index, time ranges, operators, topics and Trending Now. |
| Trending Now categories | The category names that trending_now accepts as a filter. |
TDQS
Scored across 32 tools
Most tools target clearly distinct operations, and descriptions go to lengths to distinguish them (e.g. trending_now vs trending_feed vs trend_details). However there is a dense cluster of time-series analysis tools (interest_over_time, daily_history, compare_periods, compare_many, trend_momentum, find_spikes, seasonality) whose boundaries, while documented, still invite misselection.
Nearly all names are snake_case and readable, with some verb_noun forms (find_location, compare_locations, clear_cache) and some noun phrases (seasonality, daily_history, content_calendar). Conventions are mixed in verb/noun ordering but no camelCase or chaos, so it stays predictable.
At 32 tools this sits at the heavy end for a single-domain server. The breadth of Google Trends analysis justifies many of them, but several analysis tools (seasonality vs content_calendar, related_queries vs keyword_ideas) overlap enough that consolidation would help.
The surface covers trending now, historical trending via snapshots, over-time and by-region interest, related queries/topics, multi-term and multi-period comparisons, seasonality, momentum, spikes, share of search, watchlists and raw SQL. Core Trends workflows and edge cases (anonymous-session limitations, endpoint health) are all addressed with no obvious dead ends.