ClaudeMap

google-trends-for-agent

Unofficial MIT pytrends alternative for AI agents, CLI and MCP (gtfa-mcp) returning calibrated daily search volume estimates via 59 Google Ads anchors with optional Apify proxy egress

MCP Serversmcpgoogle-trendsseosearchcli

google-trends-for-agent (gtfa) is an unofficial, MIT-licensed replacement for the archived pytrends library built for AI agents, CLI scripts and MCP clients (including Claude Code, Claude Desktop, Cursor, Codex, Windsurf and DeepSeek Harness). Published on npm, it exposes a CLI (gtfa) and a 4-tool stdio/Streamable-HTTP MCP server (gtfa-mcp: trends_snapshot, trends_ask, trends_compare, trends_now) that returns structured JSON envelopes, trend curves, related top/rising queries, explicit error codes and calibrated daily search volume estimates anchored against 59 public Google Ads benchmarks. By default it runs on the local machine's IP (and honors HTTPS_PROXY / HTTP_PROXY) at $0 cost; when hitting Google Trends HTTP 429 limits, users can switch egress to Apify's public or self-deployed Actor (--egress actor-public / actor-own with APIFY_TOKEN) or connect via Apify's remote MCP gateway. Unofficial project, not affiliated with or endorsed by Google; calls undocumented public Google Trends web endpoints intended for light interactive analysis rather than bulk scraping. MIT.

What it does

  • 4 direct MCP tools via gtfa-mcp (stdio or local Streamable HTTP on 127.0.0.1): trends_snapshot, trends_ask, trends_compare (1–5 keywords) and trends_now (trending searches across up to 30 countries)
  • Calibrated daily search volume estimates using 59 public Google Ads anchors with multi-tier auto-calibration retry instead of raw 0–100 relative curves alone
  • Stable JSON envelope with primary and 7-day traffic blocks, related top/rising queries, charts and explicit error codes (NETWORK_ERROR, RATE_LIMITED, etc.)
  • Flexible egress routing: $0 local IP or custom HTTPS_PROXY / HTTP_PROXY by default, plus optional Apify cloud egress (--egress actor-public or actor-own) to recover from HTTP 429
  • Multi-surface distribution: npm package (CLI + MCP), native DeepSeek Harness (dsh) plugin with sidebar query/history UI and Apify Actor deployment

When to use it

Best for SEO researchers, content strategists and AI-agent builders who want Claude Code or Claude Desktop to check breakout keywords, compare up to five search terms and estimate daily US/regional search demand without paying for legacy SEO suites.

Getting started

{
  "mcpServers": {
    "google-trends": {
      "command": "npx",
      "args": ["-y", "-p", "google-trends-for-agent", "gtfa-mcp"]
    }
  }
}

Things to know

Unofficial project, not affiliated with or endorsed by Google. It calls undocumented public Google Trends web endpoints that can change or fail without notice and whose use may conflict with Google's Terms of Service — intended for light interactive analysis, not bulk scraping or an SLA. Requires Node.js 20+ for CLI/MCP (Node >= 24.9 and pnpm >= 10 if using the dsh CLI). Comparing 5 keywords fills Classic Explore's 5 comparison slots, so daily volume can only be calibrated if one of the five is already a known regional anchor. Apify OAuth (used by remote MCP and dsh plugin Actor routes) requests Apify's full_api_access scope (account-wide API access), while CLI and local MCP cloud egress uses APIFY_TOKEN; the remote MCP gateway exposes an Actor runner plus Dataset/KV/abort tools rather than promising the four direct trends_* tool names. The published npm tarball bundles the audited apify dependency tree, which materially increases package size. MIT.

Repository

meka-im/google-trends-for-agent

Charted

Related on the map

  • Blitz Strike

    MCP Server

    A penetration-testing methodology delivered as one MCP server: BLITZ maps the attack surface, EAGLE-EYE traces source-to-sink, STRIKE live-verifies every finding before it is reported.

    • mcp-server
    • security
    • pentest
    • methodology
  • Ripwire

    MCP Server

    Red Hat's "ripgrep for AI context" — a C++23 zero-dependency CLI that also speaks MCP.

    • mcp
    • code-context
    • cli
    • red-hat
  • Deja Vu

    MCP Server

    One shared session memory for 25+ coding agents — Claude Code, Codex, and Cursor finally remember the same project.

    • mcp
    • memory
    • cross-agent
    • context
  • Exa MCP

    MCP Server

    Exa's official MCP server — live web search, crawling, and deep research wired into Claude.

    • official
    • search
    • web
    • mcp
  • Official Chrome DevTools MCP server — performance tracing, network inspection, and live debugging for coding agents.

    • official
    • chrome
    • debugging
    • browser
  • Vercel's handler for spinning up MCP servers on Next.js, Nuxt, Svelte, and more.

    • deploy
    • vercel
    • serverless
    • edge