WebMCP lets a web page register tools with the browser, which offers them to its built-in agent. Signed in to app.trendsagi.com, a WebMCP agent (Chrome or Edge in the WebMCP origin trial, ChatGPT desktop) can call TrendsAGI's read-only tools with your session, with no connector or API key; trendsagi.com offers public tools such as docs search and the free calculators to every visitor. To offer TrendsAGI tools on your own site, register them from your page and forward calls through your server, which keeps the API key. This page lists the required credentials, setup example, mapped endpoints, and production notes.
Base URL
https://staging-api.trendsagi.com115
Routes
19
Guides
3
Languages
TrendsAGI tools for the AI agent built into the browser
WebMCP lets a web page register tools with the browser, which offers them to its built-in agent. Signed in to app.trendsagi.com, a WebMCP agent (Chrome or Edge in the WebMCP origin trial, ChatGPT desktop) can call TrendsAGI's read-only tools with your session, with no connector or API key; trendsagi.com offers public tools such as docs search and the free calculators to every visitor. To offer TrendsAGI tools on your own site, register them from your page and forward calls through your server, which keeps the API key.
Install
Not providedRequired credentials
// In your page: offer TrendsAGI's tools to the visitor's browser agent.
// Calls go to your own server (see the Python tab), which holds the API key.
const modelContext = document.modelContext ?? navigator.modelContext;
if (modelContext) {
const tools = await fetch("/trendsagi/tools").then((response) => response.json());
const controller = new AbortController(); // controller.abort() removes them
for (const tool of tools) {
await modelContext.registerTool(
{
...tool,
async execute(args) {
const response = await fetch(`/trendsagi/tools/${tool.name}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(args ?? {}),
});
return JSON.stringify(await response.json());
},
},
{ signal: controller.signal },
);
}
}# 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