Google Trends MCP Server for analyzing search trends
Project description
Google Trends MCP Server
一个基于 Model Context Protocol (MCP) 的 Google Trends 分析服务器,可以获取和分析 Google 搜索趋势数据。
🚀 功能特性
- 📊 获取 Google Trends 搜索趋势数据
- 📈 分析关键词关注度对比
- 🔍 识别上升搜索词和市场机会
- 💡 提供基于数据的营销策略建议
- 🌐 支持中文搜索和时区设置
- ⚡ 通过 uvx 一键安装和运行
📦 安装
使用 uvx (推荐)
uvx google-trends-mcp-server
使用 pip
pip install google-trends-mcp-server
🔧 使用方法
在 Agent 客户端中配置
在你的 agent 客户端配置文件中添加:
{
"mcpServers": {
"google-trends": {
"command": "uvx",
"args": ["google-trends-mcp-server"]
}
}
}
本地直接运行
# 使用 uvx
uvx google-trends-mcp-server
# 或者使用 pip 安装后运行
google-trends-mcp
🛠️ 可用工具
google_trends_analysis
分析 Google 搜索趋势数据并生成报告。
参数:
keywords(必需): 关键词列表,例如["iPhone", "Android"]timeframe(可选): 时间范围,默认"today 3-m"
时间范围选项:
"today 3-m"- 最近 3 个月"today 12-m"- 最近 12 个月"today 5-y"- 最近 5 年"all"- 所有时间
示例调用:
{
"name": "google_trends_analysis",
"arguments": {
"keywords": ["咖啡", "茶", "奶茶"],
"timeframe": "today 12-m"
}
}
📊 分析报告内容
生成的报告包含以下部分:
- 📈 平均关注度对比 - 各关键词的搜索热度排名
- 📊 趋势变化分析 - 最近趋势变化百分比
- 🚀 热门上升搜索词 - 发现新的市场机会
- 💡 策略建议 - 基于数据的营销建议
🌐 配置文件位置
Claude Desktop
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
其他 Agent 客户端
请参考对应客户端的文档配置 MCP 服务器。
⚠️ 注意事项
- Google Trends API 有频率限制,请适度使用
- 如遇到 429 错误,请稍后重试
- 建议使用通用关键词以获得更好的结果
- 支持最多 5 个关键词同时分析
🔨 开发
本地开发设置
# 克隆仓库
git clone https://github.com/yourusername/google-trends-mcp-server.git
cd google-trends-mcp-server
# 安装依赖
pip install -e .
# 运行服务器
google-trends-mcp
构建和发布
# 构建包
python -m build
# 发布到 PyPI
python -m twine upload dist/*
📝 依赖
📄 许可证
MIT License
🤝 贡献
欢迎提交 Pull Request 和 Issue!
📞 支持
如有问题,请在 GitHub Issues 中提出。
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file google_trends_mcp_qihoo-1.0.0.tar.gz.
File metadata
- Download URL: google_trends_mcp_qihoo-1.0.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d3a9c41b05ac707cf5cf85d93fe3c34c9a4898abb224d4f24f557da200ffe6f
|
|
| MD5 |
f19b79cb03c084bb507a7076e0a24b72
|
|
| BLAKE2b-256 |
7ac923a5802251f0efbf1d37a0d2eef13d9465f17746ebd29ab370542e7ca8b1
|
File details
Details for the file google_trends_mcp_qihoo-1.0.0-py3-none-any.whl.
File metadata
- Download URL: google_trends_mcp_qihoo-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbddf2b988a45c30a5651523c340222cee5191302654a17d30c1f14509ba320e
|
|
| MD5 |
1a9933e3aadd71f5da026df8e8a1ab86
|
|
| BLAKE2b-256 |
0d39af162b6ab1df75c3a7c77f09558b03b116497ed0dfe2772bc91b82184150
|