home / mcp / google trends mcp server
Exposes Google Trends data via an MCP-compatible HTTP endpoint for easy integration
Configuration
View docs{
"mcpServers": {
"ainightshift-google_trends_mcp": {
"url": "http://localhost:3000/mcp",
"headers": {
"SEARCH_API_KEY": "YOUR_KEY_HERE"
}
}
}
}Search Trends Explorer combines a Next.js UI with an MCP server that exposes the same data as a tool you can connect to OpenAI or any MCP-compatible client. It retrieves the last 12 months of relative interest for a search term from SearchAPI.io and makes it accessible via HTTP MCP endpoints for easy integration.
You connect to the MCP server from any MCP client to fetch Google Trends data for a term. The server exposes a single tool named fetch_google_trends over streamable HTTP. When you invoke the tool, you provide a term and optional geo and category, and you receive a structured timeline of interest data you can feed into your apps or agents.
Prerequisites you need before installing the server.
# Create a local environment file with your API key
cat > .env << 'ENV'
SEARCH_API_KEY=your_key_here
ENVStart the MCP server to expose the fetch_google_trends tool on the standard local port. The server honors the PORT environment variable and provides a health endpoint for checks.
npm install
npm run mcp:devThe MCP server will be available at the following endpoint on your machine. Use this URL from your MCP client.
http://localhost:3000/mcpFrom an MCP client, point your tool at the local MCP endpoint. For example, you can connect via an MCP inspector or an OpenAI-compatible agent that supports MCP HTTP endpoints.
When you invoke fetch_google_trends you provide a JSON payload with the search term and optional geo and category. The server returns normalized timeline data suitable for visualization or analysis.
Fetch Google Trends timeline data for a given term, optional geo and category, using SearchAPI.io and return normalized timeline points.