Teams building on the Vercel AI SDK need grounded trend pulls inside route handlers and agents. Trends MCP exposes Google, Amazon, TikTok, Reddit, YouTube, and 20 more sources through one HTTP MCP endpoint that maps cleanly to createMCPClient.
Developers shipping AI features on Vercel increasingly pair generateText with external tools. Search interest for the Vercel AI SDK rose roughly 29% on Google Search over the 12 months ending 2026-06-06, while interest in the Model Context Protocol climbed about 75% over the same window (Trends MCP, google search, 2026-06-08). That overlap explains why teams search for a trend data source that speaks MCP natively instead of bolting on scrapers per platform.
A typical product brief asks the model to compare demand across Google, Amazon, and TikTok before suggesting copy or inventory moves. Without tools, the model guesses from training cutoffs. With a pile of unofficial scrapers, the route handler inherits 429 errors, proxy bills, and schema drift every time a platform changes markup.
Trends MCP centralizes those pulls behind https://api.trendsmcp.ai/mcp for MCP hosts and https://api.trendsmcp.ai/api for direct JSON POSTs. Values normalize to a 0 to 100 scale where the pipeline supports it, which keeps multi-source answers comparable inside a single assistant turn.
Install the MCP client package alongside the AI SDK, then open a remote client in a server action or route handler:
import { createMCPClient } from "@ai-sdk/mcp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
const mcpClient = await createMCPClient({
transport: {
type: "http",
url: "https://api.trendsmcp.ai/mcp",
headers: {
Authorization: `Bearer ${process.env.TRENDSMCP_API_KEY}`,
},
},
});
const tools = await mcpClient.tools();
const result = await generateText({
model: openai("gpt-4.1"),
tools,
prompt:
"Using TrendsMCP, compare 12M Google Search and Amazon growth for 'standing desk'. Cite the returned dates.",
});
await mcpClient.close();
Store the API key in environment variables on Vercel, never in client bundles. The full MCP reference lists field names for get_trends, get_growth, and get_top_trends.
Interactive chat surfaces benefit from MCP because the model can chain discovery and validation. Background jobs often fare better with REST: a scheduled Vercel cron can POST fixed bodies, persist rows in Postgres, and let the UI read cached series without opening an MCP session per user.
| Pattern | Best fit | Endpoint |
|---|---|---|
| Agent chooses keywords dynamically | MCP tools via client.tools() |
https://api.trendsmcp.ai/mcp |
| Fixed nightly keyword list | REST get_growth |
https://api.trendsmcp.ai/api |
| Dashboard tiles with known feeds | REST mode: top_trends |
https://api.trendsmcp.ai/api |
The headless trends API page walks through cache-friendly REST shapes if the frontend only renders stored JSON.
Product and growth teams often follow the same sequence researchers document for LLM-native trend workflows:
get_top_trends on Google Trends or TikTok Trending Hashtags when the user has no keyword yet.get_trends on the short-listed phrase across google search, youtube, and amazon for level and seasonality.get_growth with ["30D","6M","12M"] to separate a news spike from sustained demand.E-commerce routes can swap amazon and google shopping into step 2. SEO-focused apps can add google news and news volume for citation timing. The multi-source trend validation page explains how to treat disagreements between channels.
get_trendsReturn a dated weekly or daily series for a keyword on one source, ideal for chart components inside a dashboard route.
get_trends(keyword='running shoes', source='google shopping', data_mode='weekly')
get_growthCompute 7D through multi-year growth windows in one call so agent responses cite numeric momentum instead of vague language.
get_growth(keyword='running shoes', source='amazon, google search', percent_growth=['3M', '12M'])
get_top_trendsPull live leaderboards such as TikTok Trending Hashtags or Amazon Best Sellers when the user asks what is hot right now without naming a keyword.
get_top_trends(type='TikTok Trending Hashtags', limit=15)
Close MCP clients after each request on serverless runtimes so connections do not linger across isolates. Log the recent_date and baseline_date fields from growth responses when writing analytics, because those timestamps anchor any chart the UI renders. Rate limits apply per API key; batch keywords in cron jobs instead of fanning out one HTTP call per table row.
Free accounts include 100 requests per month with no credit card. Upgrade paths live on pricing when production traffic exceeds that cap.
Tools for this workflow
get_trendsReturn a dated weekly or daily series for a keyword on one source, ideal for chart components inside a dashboard route.
get_trends(keyword='running shoes', source='google shopping', data_mode='weekly')
get_growthCompute 7D through multi-year growth windows in one call so agent responses cite numeric momentum instead of vague language.
get_growth(keyword='running shoes', source='amazon, google search', percent_growth=['3M', '12M'])
get_top_trendsPull live leaderboards such as TikTok Trending Hashtags or Amazon Best Sellers when the user asks what is hot right now without naming a keyword.
get_top_trends(type='TikTok Trending Hashtags', limit=15)
FAQ