Cursor's Agent SDK defines an agent as a folder of Markdown and TypeScript (instructions, tools, skills, MCP connections, schedules and channels such as Slack and GitHub) and runs it locally or on Cursor hosting. One connection file points an Agent SDK agent at TrendsAGI's hosted MCP server, so it can call list_trends, get_trend_analytics, get_trend_ai_insights, list_recommendations, execute_sql and the other read-only tools by name. Nothing to install from TrendsAGI; the agent authenticates with a TrendsAGI API key. This page lists the required credentials, setup example, mapped endpoints, and production notes.
Base URL
https://staging-api.trendsagi.com115
Routes
24
Guides
3
Languages
Trend tools for agents you define, test and deploy as code
Cursor's Agent SDK defines an agent as a folder of Markdown and TypeScript (instructions, tools, skills, MCP connections, schedules and channels such as Slack and GitHub) and runs it locally or on Cursor hosting. One connection file points an Agent SDK agent at TrendsAGI's hosted MCP server, so it can call list_trends, get_trend_analytics, get_trend_ai_insights, list_recommendations, execute_sql and the other read-only tools by name. Nothing to install from TrendsAGI; the agent authenticates with a TrendsAGI API key.
Install
npm install --global @grok/agent-sdk # Node.js 22.13+Required credentials
// bot/mcp-connections/trendsagi.ts
import { defineConnection } from "@grok/agent-sdk/connections";
export default defineConnection({
url: "https://api.trendsagi.com/mcp",
// An Agent SDK template, filled each time the connection opens:
// from the environment locally, from the deployment secret on Cursor hosting.
headers: { authorization: "Bearer ${TRENDSAGI_API_KEY}" },
advertiseTools: true, // the server's tools, by name
effects: "read", // only tools the server marks as reads
});
// bot/agent.ts: what a hosted deploy may reach and which secret it reads
import { defineAgent } from "@grok/agent-sdk";
export default defineAgent({
hosting: {
egressDomains: ["api.trendsagi.com"],
secretNames: ["TRENDSAGI_API_KEY"],
},
});# Save as quickstart.mjs
node quickstart.mjs1. Install
Add SDK/dependency for this integration path.
2. Authenticate
Set API key and any provider-specific credentials.
3. Map endpoints
Use mapped endpoints below to build deterministic flow.
4. Harden
Add rate-limit backoff, idempotency, and safety gates.
Endpoint Mapping
Each integration is mapped to specific API endpoints so teams can compose deterministic workflows.
Production notes