Google Trends数据服务

提供免费访问Google Trends数据的MCP服务器,无需API密钥,支持搜索量趋势跟踪、关键词比较、相关查询发现、实时热门话题和地理兴趣分析。

  • by locupleto
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 locupleto/mcp-google-trends

使用说明

Google Trends MCP Server

An MCP (Model Context Protocol) server providing free access to Google Trends data. No API keys required.

Features

  • Interest Over Time - Track search volume trends for any keyword
  • Keyword Comparison - Compare up to 5 keywords side by side
  • Related Queries - Discover top and rising related searches
  • Trending Searches - Real-time trending topics via Google RSS
  • Regional Interest - Geographic breakdown by country, region, or city

Installation

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Usage with Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "google-trends": {
      "type": "stdio",
      "command": "/path/to/mcp-google-trends/venv/bin/python3",
      "args": ["/path/to/mcp-google-trends/google_trends_mcp_server.py"],
      "env": {}
    }
  }
}

Testing

source venv/bin/activate
python test_server.py

Rate Limiting

The server includes three layers of rate limiting:

  1. 5-second delay between trendspy API calls
  2. Single-threaded executor (serialized requests)
  3. 30-minute in-memory cache

Dependencies

  • mcp - Model Context Protocol SDK
  • trendspy - Unofficial Google Trends library
  • pandas - DataFrame handling