Cursor background agents can run scheduled trend research without a human in the loop: pull live leaderboards, compare growth across sources, and write briefs to Slack or S3. This page documents the MCP wiring, prompt patterns, and guardrails that keep autonomous runs accurate.
Cursor cloud agents run on a schedule or in response to repository events. They read instructions from the repo, call MCP tools, and post results to Slack or commit artifacts. Trend research fits that model when the agent pulls live data instead of reciting stale training snapshots.
This page covers the wiring for Trends MCP in background agents. Setup basics for the Cursor desktop client are on MCP server for Cursor.
A background agent asked "what is trending in developer tools" without tools will hallucinate plausible-sounding names. The failure mode is confident prose with no date anchor.
Trends MCP returns timestamped JSON: ranked leaderboards via get_top_trends, normalized time series via get_trends, and period growth via get_growth. The agent's job is to interpret that JSON, not to simulate it.
Register Trends MCP as an HTTP streamable server:
"trends-mcp": {
"url": "https://api.trendsmcp.ai/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
Store YOUR_API_KEY in Cursor Secrets, not in committed files. Free tier: 100 requests per day at https://www.trendsmcp.ai/account.
Cloud agents inherit MCP servers configured for the automation environment. Verify the trends-mcp server shows as connected before enabling a cron that depends on live pulls.
A typical daily trend brief automation runs in four phases:
get_top_trends on one or two feeds.get_growth on the top 3-5 items with percent_growth: ["7D", "30D"].Example discovery call the agent should emit:
get_top_trends(type="Google Trends", limit=25)
Example validation call for a candidate keyword:
get_growth(keyword="mcp server", source="google search", percent_growth=["7D", "30D", "90D"])
For developer stack monitoring, pair leaderboard discovery with npm:
get_top_trends(type="GitHub Trending Repos", limit=25)
then for a shortlisted repo:
get_growth(keyword="vitest", source="npm", percent_growth=["3M", "6M"])
The GitHub trending repositories API page documents the REST equivalent if the agent posts JSON to S3 instead of using MCP.
Background agents need constraints in AGENTS.md or the automation template. Patterns that work:
Require tool use before claims.
Cap tool spend.
Anchor freshness.
Separate inference from data.
These rules align with the read-only trend data MCP pattern when agents should not mutate production systems.
Some cloud environments block MCP but allow HTTPS egress. The same data ships over REST:
curl -X POST https://api.trendsmcp.ai/api \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mode": "top_trends", "type": "Google Trends", "limit": 25}'
Growth via REST:
curl -X POST https://api.trendsmcp.ai/api \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "google search",
"keyword": "ai agents",
"percent_growth": ["30D", "90D"]
}'
Document which path the automation uses so the next agent run does not double-call both MCP and REST for the same keyword.
| Destination | When to use | Notes |
|---|---|---|
| Slack thread | Daily human review | Post only blockers or summaries; link to full brief |
| S3 markdown | Content pipeline | Match existing content-trendsmcp key conventions |
| Git commit | In-repo digests | Commit JSON snapshot plus interpreted brief |
| PR comment | CI trend gate | Compare growth vs baseline before merge |
The automated weekly trend briefings page covers longer-horizon bundles; cloud agents on daily cron should stay narrower to respect rate limits.
Free tier: 100 requests per day. A naive agent that calls get_trends on 25 keywords exhausts the allocation in one run.
Safer daily budget:
| Step | Calls |
|---|---|
| 1x get_top_trends | 1 |
| 4x get_growth validation | 4 |
| 1x get_trends sparkline | 1 |
| Total | 6 |
Weekly deep dives can spend 20-30 calls on Mondays; keep Tuesday-Saturday runs on the six-call template.
Stagger automations if multiple agents share one API key. Two crons at 06:00 UTC doubles concurrent spend and can trip daily caps.
| Symptom | Agent action |
|---|---|
| 401 from API | Stop and flag missing or rotated key |
| Empty leaderboard | Report empty feed; do not backfill from memory |
| npm keyword not found | Retry with exact package name from npmjs.com |
| Steam ambiguous match | Narrow game title; first search result may be wrong |
Post to Slack only on blockers, per most content automation playbooks. Successful runs can stay silent.
Before calling a spike "real," an agent can run two growth checks:
get_growth(keyword="claude code", source="google search", percent_growth=["30D"])
get_growth(keyword="claude code", source="reddit", percent_growth=["30D"])
Divergence (Google up, Reddit flat) suggests SEO or news-driven interest, not grassroots adoption. Convergence raises confidence. The multi-source trend validation page expands that logic for product teams.
A minimal cloud agent trend run:
analytics/WHATS_WORKING.md or a local watchlist file.get_top_trends on Google Trends and GitHub Trending Repos.get_growth on three overlapping candidates across google search and npm.That loop turns Cursor cloud agents from generic summarizers into scheduled research workers grounded in the same JSON a human analyst would pull manually. For broader agent toolchains, see AI agent trend tools and LLM-native trend research workflow.
FAQ