Cursor cloud agent trend research

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.

Why cloud agents need an MCP trend source

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.

MCP configuration

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.

Cron workflow shape

A typical daily trend brief automation runs in four phases:

  1. Discover: get_top_trends on one or two feeds.
  2. Validate: get_growth on the top 3-5 items with percent_growth: ["7D", "30D"].
  3. Cross-check: optional second source (e.g., Google Search growth for a GitHub repo name).
  4. Publish: write markdown to S3, open a PR, or post to Slack with data timestamps.

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.

Prompt instructions that survive unattended runs

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.

REST fallback when MCP is unavailable

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.

Output destinations

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.

Rate limits and scheduling

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.

Failure modes to flag, not guess

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.

Cross-source validation template

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.

Security notes

Putting it together

A minimal cloud agent trend run:

  1. Read analytics/WHATS_WORKING.md or a local watchlist file.
  2. get_top_trends on Google Trends and GitHub Trending Repos.
  3. get_growth on three overlapping candidates across google search and npm.
  4. Write a 300-word brief with timestamps and source labels.
  5. Upload or post only if data calls succeeded.

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.

Common questions

Yes, once the MCP server is registered in the agent environment with a valid API key, background and cloud agents invoke get_trends, get_growth, and get_top_trends like any other MCP tool. The agent still needs explicit instructions in its prompt or AGENTS.md file to call those tools instead of guessing numbers from training data.
Add a streamable HTTP MCP entry pointing at https://api.trendsmcp.ai/mcp with an Authorization Bearer header containing a Trends MCP API key. The same JSON block works in local Cursor mcp.json and in cloud agent secret configuration. Full client-specific steps live on the mcp-server-for-cursor page.
Start with get_top_trends for discovery (one feed label such as Google Trends or GitHub Trending Repos) and get_growth for validation on 2-4 candidate keywords. Use get_trends only when the brief needs a full historical curve. Pulling all three for every keyword burns the free tier quickly on daily cron schedules.
Require every numeric claim in the output to cite a tool response timestamp and source label. Ban paraphrased percentages unless they appear in a get_growth result. Add a pre-publish check: if the draft mentions a growth figure, the agent must include the exact percent_growth payload it received.