Google Trends MCP Server
Provides access to Google Trends data including status, trending questions, and trending topics via MCP tools.
README
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-mcp
Option 2: Global Installation
npm install -g @andrewlwn77/google-trends-mcp
Option 3: Local Development
git clone <repository-url>
cd google-trends-mcp
npm install
npm run build
Configuration
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 dev
Available 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.md
Type 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.