GitHub Copilot calls the Trends API MCP server in two places: agent mode in the editor, and the Copilot coding agent on GitHub. Both take the same registration, the trends-api server at https://api.trendsapi.ai/mcp with a Bearer key. Once registered, get_time_series, get_growth, and get_top_trends appear in the tool picker, and Copilot can check a trend claim in the middle of a task instead of guessing from training data. Editor registration sits on VS Code Trends MCP; server detail sits on MCP server setup.
Agent mode in the editor
Copilot in VS Code reads the workspace MCP file, so a project that already registered the server for the editor gives Copilot the tools with no second step. In agent mode, open the tool picker and confirm the three trends tools are enabled for the session. A request such as "compare npm growth for these two packages over 12M" becomes two get_growth calls, and the recommendation cites the percents.
The coding agent on GitHub
For repository tasks, add the MCP configuration in the Copilot coding agent settings:
{
"mcpServers": {
"trends-api": {
"type": "http",
"url": "https://api.trendsapi.ai/mcp",
"headers": {"Authorization": "Bearer $TRENDS_API_KEY"}
}
}
}
Store the key as a Copilot secret and reference it; never commit the value. An agent asked to refresh a market notes file can then pull the current GitHub board through get_top_trends with type GitHub and write dated rows into the repo. Keyword calls take a source string, board calls take a type label; both lists sit on the sources reference.
When the agent should not be the caller
Anything scheduled or stored belongs on POST https://api.trendsapi.ai/api. Agent sessions are for judgement calls inside a task. Only successful 200 responses count against quota; caps sit on pricing.