TrendsAGI

io.github.TrendsAGI由 GitHub 帳號 TrendsAGI 發布v1.2.0更新於 Nov 7, 2026

Trend data, insights and recommendations for AI agents. Read-only, with an Agent Skill.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取資料與分析商業與電商

概覽

AI 產生的概覽

託管的唯讀 MCP 伺服器,讓助理取得即時社群趨勢資料、AI 洞察、建議,並對 TrendsAGI 資料集執行唯讀 SQL。

可以做什麼
  • 依類別或關鍵詞列出與搜尋熱門話題,可依速度、成長或量體排序,並取得有效類別名稱。
  • 取得單一趨勢及其量體時間序列,以及包含摘要、關鍵主題、情緒、受眾和行銷角度的 AI 洞察。
  • 列出附決策簡報且有依據的建議、受監控話題的危機事件,以及關注清單項目。
  • 讀取資料結構,並執行一筆經驗證的唯讀 SQL SELECT,用於篩選、串接和彙總。
  • 判斷 TrendsAGI 能否完成某項任務以及由哪個工具或應用頁面處理,並查看每日剩餘 API 額度。
適用情境
適合助理需要當前社群趨勢訊號、實測量體與速度,或有依據的行銷角度而非一般網頁搜尋的情境。適用於付費媒體、成長和內容規劃類問題,例如某類別中什麼正在加速、應該鎖定誰。
執行需求
透過 streamable HTTP 連線 api.trendsagi.com 遠端端點,需 OAuth 登入並核准連線;不支援 OAuth 的用戶端可用 Authorization Bearer 標頭傳送 API 金鑰。需要 TrendsAGI 帳號和 API 金鑰,每次呼叫計為一次 API 請求,佔用方案每日額度。
安裝前請注意
每次工具呼叫都會消耗 API 額度;免費方案每天 100 次呼叫,超出額度按超額計費。託管工具為唯讀,但關注清單與建議的寫入僅在本地伺服器啟用寫入時出現。API 金鑰可存取你的帳號資料,請勿放入共用設定,並及時撤銷不再使用的連接器金鑰。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 TrendsAGI,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.TrendsAGI%2Ftrendsagi/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "trendsagi": {
      "type": "http",
      "url": "https://api.trendsagi.com/mcp"
    }
  }
}

README

TrendsAGI

[PyPI Version] [npm Version] [Python Versions] [License: MIT]

Real-time trend intelligence for your code and your AI agents: what is trending on social platforms right now, with measured volume, velocity and growth, AI insights on why each topic is moving, evidence-backed recommendations, crisis alerts and watchlists. Paid media and growth teams use it to target what is rising, time spend to the trend curve and brief creative on measured demand.

Python clientTrendsAGIClient, a typed REST client
Command linetrendsagi, one command per API action, tables in a terminal and JSON in a pipe
Agent toolsTrendsAGITools for OpenAI, Claude, LangChain and WebMCP
Hosted MCP serverhttps://api.trendsagi.com/mcp for Claude, ChatGPT, Grok, Cursor and Gemini CLI
Cursor Agent SDKA ready agent project in agent-sdk/: one connection file gives an Agent SDK agent every hosted tool
Browser agents (WebMCP)Signed in to app.trendsagi.com, your browser's agent gets the same tools (webmcp/)
Local MCP servertrendsagi mcp, the same tools over stdio
PluginsClaude, Grok, Cursor and Snowflake Cortex Code plugin in plugins/trendsagi, Gemini CLI extension at the repo root
Ad executionExecutors that preview, then apply, Google, Meta, TikTok and LinkedIn ad changes from your own infrastructure

Install

bash
pip install trendsagi            # client, agent tools and the trendsagi commandpip install "trendsagi[mcp]"     # adds the local MCP server (Python 3.10+)pipx install trendsagi           # just the command line, in its own environmentnpx trendsagi --help             # or the same command line from npm (Node.js 18+)

Create an API key under Profile > API Keys at app.trendsagi.com and export it:

bash
export TRENDSAGI_API_KEY="your_api_key"

Quickstart

python
import osfrom trendsagi import TrendsAGIClient
client = TrendsAGIClient(api_key=os.environ["TRENDSAGI_API_KEY"])
# Fastest-moving Technology topics right nowtrends = client.get_trends(category="Technology", sort_by="velocity", limit=5)for trend in trends.trends:    print(trend.id, trend.name, trend.volume)
# Why is the top one moving?insight = client.get_ai_insights(trends.trends[0].id)if insight:    print(insight.sentiment_summary, insight.key_themes)

Command line

bash
trendsagi login                  # paste an API key; saved to ~/.config/trendsagi/config.jsontrendsagi trends list --category Technology --sort velocity --limit 10trendsagi insights get 123       # audience, sentiment and marketing anglestrendsagi sql "SELECT category, count(*) FROM trends GROUP BY 1 ORDER BY 2 DESC"trendsagi recommendations list --priority hightrendsagi watchlist add "oat milk" --threshold 50000 --emailtrendsagi api /api/integrations/delivery/health -q lookback_hours=24   # any endpoint
CommandsWhat they do
login, logout, whoamiSave, forget and check the API key
trends list get analytics categories autocompleteTrending topics with measured volume, velocity and growth
insights get generate [--wait] status searchAI insights per trend
recommendations list action feedbackEvidence-backed recommendations and their workflow status
crisis list actionCrisis events: acknowledge, archive, reopen
watchlist list add removeTracked keywords and categories, with alerts
sql, schemaOne read-only PostgreSQL SELECT over your data, and the tables it can read
tools list call, findThe agent tools, and whether TrendsAGI can do a task
webhooks, exportsCreate, change, test and run webhooks and data exports
ads providers resources preview apply report report-exportConnected ad platforms: trend-based changes and reports
integrations availability status health valueIntegration status and delivery health
streamLive trend updates as JSON lines
usage, status, apiAPI usage, service status, and any endpoint without its own command

Every command has --help. In a terminal, lists print as tables; piped or with --json they print JSON, so trendsagi trends list | jq works. The key comes from --api-key, then TRENDSAGI_API_KEY, then the saved login. Commands that delete something or change live ads ask first; pass --yes in scripts. Exit codes: 0 success, 1 API error, 2 invalid usage, 4 missing or rejected key.

The commands are declared once in src/trendsagi/cli_spec.json; a dependency-free Node.js build of the same CLI lives in npm/ and is published as trendsagi on npm. Guide: trendsagi.com/api-docs/integrations/cli.

The client calls any endpoint too: client.request("GET", "/api/integrations/delivery/health", params={"lookback_hours": 24}).

Use TrendsAGI in your AI assistant (no install)

Add the hosted MCP server, sign in to TrendsAGI and approve the connection:

AssistantSetup
ClaudeOpen TrendsAGI in the Claude directory, or Settings > Connectors > Add custom connector with the URL below
Claude Codeclaude mcp add --transport http trendsagi https://api.trendsagi.com/mcp, or /plugin marketplace add TrendsAGI/TrendsAGI then /plugin install trendsagi@trendsagi
ChatGPTAdd a custom connector with the URL below
GrokInstall the TrendsAGI plugin, or add the URL as a remote MCP server
Cursor{ "mcpServers": { "trendsagi": { "url": "https://api.trendsagi.com/mcp" } } }
Snowflake Cortex Codecortex mcp add trendsagi https://api.trendsagi.com/mcp --type http, or cortex plugin install github:TrendsAGI/TrendsAGI/plugins/trendsagi
Gemini CLIgemini extensions install https://github.com/TrendsAGI/TrendsAGI
text
https://api.trendsagi.com/mcp

Then ask "What is accelerating fastest in Technology this week, and who should I target with it?" The hosted tools are read-only, and each call counts as one API request. Each connection gets its own key, listed as "AI connector: " under Profile > API Keys; delete it to disconnect. Clients without OAuth can send an API key as Authorization: Bearer <key>. Guide: trendsagi.com/mcp.

The hosted server also publishes the TrendsAGI paid-media skill over MCP (SEP-2640) at skill://trendsagi/SKILL.md. Clients that support the io.modelcontextprotocol/skills extension discover it with skills/list and load it with resources/read; the manifest carries a SHA-256 digest and byte size for every file. Clients without the extension still receive the server instructions and tool descriptions, and the plugin distributions keep a bundled copy of the skill.

Build an agent with Cursor Agent SDK

Agent SDK defines agents as a folder of Markdown and TypeScript. Add TrendsAGI with one file and the agent gets the hosted MCP server's read-only tools by name:

ts
// bot/mcp-connections/trendsagi.tsimport { defineConnection } from "@grok/agent-sdk/connections";
export default defineConnection({  url: "https://api.trendsagi.com/mcp",  headers: { authorization: "Bearer ${TRENDSAGI_API_KEY}" },  // filled by Agent SDK, not JavaScript  advertiseTools: true,  effects: "read",});
bash
agent-sdk run --dir . --message "What is rising fastest in Technology this week?"

agent-sdk/ is a complete project to copy: instructions, a trend-brief skill, hosting settings (egress to api.trendsagi.com, a TRENDSAGI_API_KEY secret) and smoke evals. Guide: trendsagi.com/api-docs/integrations/agent-sdk.

Use TrendsAGI from your browser's agent (WebMCP)

WebMCP lets a web page hand tools to the AI agent built into the browser (Chrome and Edge in origin trials, ChatGPT desktop, Brave Leo). While you are signed in to app.trendsagi.com, the app registers TrendsAGI's read-only tools with document.modelContext, so the agent uses them with your session: no connector or API key, and calls count as app use rather than API usage. trendsagi.com offers public tools (docs search, trend reports, plans and the free calculators) to every visitor.

To put TrendsAGI tools on your own site, register them in your page and run them on your server, which keeps the API key:

python
tools = TrendsAGITools(TrendsAGIClient(api_key=os.environ["TRENDSAGI_API_KEY"]))
tools.webmcp()                     # serve to your page: name, title, description, inputSchema, annotationstools.call("list_trends", args)    # run the call your page forwards

webmcp/ has the browser module and a FastAPI server. Guide: trendsagi.com/webmcp.

Agent tools

One registry, every format. The tools are read-only by default; add_to_watchlist and update_recommendation appear only with allow_writes=True (or trendsagi mcp --allow-writes).

ToolWhat the agent gets
list_trendsTrending topics by category or phrase, sorted by velocity, growth or volume
list_trend_categoriesValid category names
search_trend_insightsTrends and insights matching a theme
get_trend / get_trend_analyticsOne trend and its volume time series
get_trend_ai_insightsSummary, key themes, sentiment, audience, marketing angles
list_recommendationsEvidence-backed actions with a decision brief
list_crisis_eventsReputation and crisis events for monitored topics
list_watchlist / get_api_usageWatched topics and remaining daily quota
read_data_schema / execute_sqlRead-only SQL for questions that need filters, joins or aggregation
find_capabilityWhether TrendsAGI can do a task, and which tool or app page does it

OpenAI

python
import json, osfrom openai import OpenAIfrom trendsagi import TrendsAGIClient, TrendsAGITools
tools = TrendsAGITools(TrendsAGIClient(api_key=os.environ["TRENDSAGI_API_KEY"]))openai = OpenAI()messages = [{"role": "user", "content": "Find a fast-rising Technology trend and suggest a campaign angle."}]
while True:    reply = openai.chat.completions.create(model="gpt-5-mini", messages=messages, tools=tools.openai())    message = reply.choices[0].message    messages.append(message)    if not message.tool_calls:        print(message.content)        break    for call in message.tool_calls:        result = tools.call(call.function.name, call.function.arguments)        messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)})

Claude, LangChain and others

python
tools.anthropic()         # Anthropic Messages API tools=tools.openai_responses()  # OpenAI Responses API tools=tools.langchain()         # LangChain StructuredTools (pip install "trendsagi[langchain]")tools.webmcp()            # WebMCP descriptors for document.modelContext.registerTool

With Claude, pass tools=tools.anthropic() and answer each tool_use block with {"type": "tool_result", "tool_use_id": block.id, "content": json.dumps(tools.call(block.name, block.input))}. tools.call never raises: errors come back as {"error": ...} so the model can read a rate limit or a bad argument and recover.

Local MCP server

bash
pip install "trendsagi[mcp]"claude mcp add trendsagi --env TRENDSAGI_API_KEY=your_api_key -- trendsagi mcp

Or in any MCP client's JSON config (Claude Desktop, Cursor, VS Code):

json
{ "mcpServers": { "trendsagi": { "command": "trendsagi-mcp", "env": { "TRENDSAGI_API_KEY": "your_api_key" } } } }

The local server publishes the same skill as the hosted endpoint, at skill://trendsagi/SKILL.md, and declares the io.modelcontextprotocol/skills extension. It is read from the installed package, so it stays in step with the version of trendsagi you installed. Supporting references cover the tool surface, paid-media workflow, read-only SQL and error handling.

Query with SQL

For answers no single endpoint returns, such as growth by category or the trends that match a watchlist:

python
schema = client.get_data_schema()   # tables, columns, rules, examplesresult = client.execute_sql(    """    SELECT category, count(*) AS trends, round(avg(growth_pct)::numeric, 1) AS avg_growth_pct    FROM trends    WHERE last_seen_at > now() - interval '7 days' AND growth_pct IS NOT NULL    GROUP BY category ORDER BY avg_growth_pct DESC    """,    max_rows=20,)print(result["columns"], result["rows"])

Tables: trends, trend_snapshots (90 days of readings), trend_categories, trend_insights, watchlist, recommendations and crisis_events; the last three only contain your own account's rows. Queries are one validated SELECT, run read-only for at most 5 seconds, and count as one API request. A refused query raises exceptions.QueryError with a code (such as unknown_table or timeout), plus hint and position when known.

Recommendations with decision briefs

python
recommendations = client.get_recommendations(match_user_interests=True, priority="high", sort="priority", limit=10)for rec in recommendations.recommendations:    brief = rec.decision_brief    if brief and brief.actionable:        print(rec.title, brief.why_now, brief.next_steps[:1])

Each brief explains why an action is timely, the measured signals behind it and concrete next steps. Its confidence score measures evidence completeness, not the chance of success; use actionable and data_quality to hold back when signals are stale or incomplete.

Ad execution in your own infrastructure

GoogleAdsExecutor, MetaAdsExecutor, TikTokAdsExecutor and LinkedInAdsExecutor take credentials at runtime, use deterministic idempotency keys, and support dry-run previews and strict validation:

python
from trendsagi.integrations import GoogleAdsExecutor
insight = client.get_ai_insights(trend_id)  # the trend you decided to act ongoogle = GoogleAdsExecutor({    "access_token": os.environ["GOOGLE_ADS_ACCESS_TOKEN"],    "developer_token": os.environ["GOOGLE_ADS_DEVELOPER_TOKEN"],})# Positive keywords target an ad group; campaign criteria can only exclude.preview = google.apply_targeting(    insight,    customer_id="1234567890",    campaign_id="9876543210",    ad_group_id="1122334455",    dry_run=True,    strict_mode=True,)print(preview.response)  # inspect before any real change

See INTEGRATIONS_BYOC.md for every executor.

Errors

python
from trendsagi import exceptions
try:    client.get_trends(limit=5)except exceptions.RateLimitError:    ...  # back off and retryexcept exceptions.AuthenticationError:    ...  # invalid or revoked key

Other commands

bash
trendsagi mcp [--allow-writes]                              # MCP server over stdiotrendsagi scaffold --type docker --output-dir ./runner      # executor runner templatetrendsagi scaffold --type terraform --output-dir ./infra    # infrastructure template

Plans and limits

The free Developer plan includes one API key and 100 API calls a day; Advantage, Scale and Enterprise raise the daily limit and add keys and team features. Calls above the daily allowance are billed as overage. See pricing.

Links

License

MIT. See LICENSE.

來源:README.md,提交 278bc72

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

3
  1. v1.2.0最新Nov 7, 2026
  2. v1.1.1Nov 3, 2026
  3. v1.1.0Oct 13, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分