Google Trends MCP Server
Provides access to Google Trends data, including trending topics, trending questions, and API status.
Click on "Install 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 MCP Serverwhat are the top trending topics 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.
Google Trends MCP Server
⚠️ IMPORTANT SECURITY NOTICE: Never commit API keys to version control. This package requires an API key to be set via environment variable.
An MCP (Model Context Protocol) server that provides access to Google Trends data through the Google Trends Scraper API.
Features
Status: Check the API status and health
Questions: Get trending questions from Google Trends
Trending: Get currently trending topics from Google Trends
Installation
Option 1: Using npx (Recommended)
# Set your API key first
export GOOGLE_TRENDS_API_KEY="your-api-key-here"
# Run directly with npx
npx @andrewlwn77/google-trends-mcpOption 2: Global Installation
npm install -g @andrewlwn77/google-trends-mcpOption 3: Local Development
git clone <repository-url>
cd google-trends-mcp
npm install
npm run buildConfiguration
Optional: You can set the GOOGLE_TRENDS_API_KEY environment variable. If not set, a default API key will be used.
Get an API key from RapidAPI Google Trends Scraper
Set the environment variable:
# Option 1: Export in your shell export GOOGLE_TRENDS_API_KEY="your-api-key-here" # Option 2: Create a .env file (for local development) echo "GOOGLE_TRENDS_API_KEY=your-api-key-here" > .env
⚠️ Security: Never commit your .env file or API key to version control!
Usage
Running the server
# If installed globally or using npx
google-trends-mcp
# For local development
npm start
# For development with auto-reload
npm run devAvailable Tools
1. google_trends_status
Check the status of the Google Trends API.
Parameters:
language(optional): Language code (default: "en")country(optional): Country code (default: "US")
2. google_trends_questions
Get trending questions from Google Trends.
Parameters:
language(optional): Language code (default: "en")country(optional): Country code (default: "US")
3. google_trends_trending
Get currently trending topics from Google Trends.
Parameters:
language(optional): Language code (default: "en")country(optional): Country code (default: "US")
Example Usage with MCP Client
// Check API status
const status = await client.callTool('google_trends_status', {
language: 'en',
country: 'US'
});
// Get trending questions
const questions = await client.callTool('google_trends_questions', {
language: 'en',
country: 'US'
});
// Get trending topics
const trending = await client.callTool('google_trends_trending', {
language: 'en',
country: 'US'
});Configuration
The server can be configured using environment variables:
GOOGLE_TRENDS_API_KEY: Your RapidAPI key for the Google Trends Scraper API (optional, defaults to example key)
Development
Project Structure
google-trends-mcp/
├── src/
│ ├── index.ts # Main MCP server implementation
│ └── types.ts # TypeScript type definitions
├── tests/
│ ├── integration/ # API integration tests
│ ├── unit/ # Unit tests
│ └── helpers/ # Test helper utilities
├── package.json
├── tsconfig.json
├── .env.example
└── README.mdType Safety
This server is written in TypeScript and provides full type safety for:
API parameters
API responses
Error handling
Google Trends data structures
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/andrewlwn77/google-trends-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server