Trends MCP for local LLM agents

Local models running through Ollama, LM Studio, or llama.cpp keep prompts and outputs on-device, but they cannot reach live trend data without a tool bridge. Trends MCP connects over HTTP with a Bearer token, so a local agent can query Google, TikTok, Reddit, and 15 other sources while the model weights stay offline.

Privacy-sensitive teams run Llama, Mistral, and Qwen weights through Ollama or LM Studio so customer data never leaves the machine. That isolation breaks the moment someone asks "what is trending on TikTok right now?" A local model has no live web access unless a tool layer supplies it. Trends MCP fills that gap with one HTTP endpoint, stable JSON, and 25 normalized sources behind a single Bearer token.

For cloud-hosted MCP clients like Cursor and Claude Desktop, see the MCP server setup guide. This page covers local inference stacks only.

What stays local versus what hits the API

The split matters for compliance reviews. When Ollama serves the model on localhost:11434, every token of the conversation stays on the host. Trends MCP tool calls are separate HTTP POST requests to https://api.trendsmcp.ai/mcp carrying only structured parameters:

{"source": "google search", "keyword": "running shoes"}

The API returns a JSON time series. No chat history, no system prompt, and no document uploads travel with the request. Teams auditing data residency should note that trend query keywords themselves may contain sensitive terms; treat tool arguments like any other outbound API payload.

Architecture: local model plus remote MCP

[User prompt] → [Local LLM via Ollama/LM Studio]
                      ↓ tool call decision
              [MCP client / mcp-remote bridge]
                      ↓ HTTPS + Bearer token
              [api.trendsmcp.ai/mcp]
                      ↓ JSON response
              [Local LLM synthesizes answer]

The model decides when to call get_trends, get_growth, or get_top_trends. The MCP bridge translates that into HTTP. The model never scrapes Google Trends directly.

Setup path 1: Ollama with Continue in VS Code

Continue supports MCP servers alongside local Ollama models. This is the fastest path for developers already running open-weight models locally.

Step 1: Run Ollama and pull a model

ollama pull llama3.1:8b
ollama serve

Confirm the API responds at http://localhost:11434.

Step 2: Get a Trends MCP API key

Create a free key at trendsmcp.ai/account. The free tier includes 100 requests per month. No credit card required.

Step 3: Add Trends MCP to Continue config

In ~/.continue/config.json, add the MCP server block:

{
  "mcpServers": {
    "trends-mcp": {
      "url": "https://api.trendsmcp.ai/mcp",
      "transport": "http",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Set the model provider to Ollama in the same config. Continue routes tool calls to Trends MCP while inference stays on localhost:11434.

Step 4: Test with a live feed query

Prompt: "Using TrendsMCP, what is trending on Google right now?"

The model should invoke get_top_trends with type: "Google Trends". The response returns ranked query strings the model can summarize without hallucinating breakout terms.

For Continue-specific screenshots and troubleshooting, see MCP server for Continue.

Setup path 2: LM Studio with an agent framework

LM Studio exposes local models through an OpenAI-compatible API on localhost:1234. It does not host MCP natively as of June 2026. The practical pattern is a thin agent layer that calls both endpoints.

LangChain example

LangChain's MultiServerMCPClient connects to Trends MCP while ChatOpenAI points at LM Studio:

from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="http://localhost:1234/v1",
    api_key="lm-studio",
    model="local-model"
)

mcp_client = MultiServerMCPClient({
    "trends-mcp": {
        "url": "https://api.trendsmcp.ai/mcp",
        "transport": "streamable_http",
        "headers": {"Authorization": "Bearer YOUR_API_KEY"}
    }
})

The LLM runs locally. Tool execution fetches live data. See LangChain Trends MCP for the full agent loop.

Setup path 3: Claude Desktop with a local model (hybrid)

Some teams run Claude Desktop for MCP tooling while experimenting with local models in parallel sessions. Claude Desktop's mcp-remote bridge also works with remote MCP servers:

"trends-mcp": {
  "command": "npx",
  "args": ["-y", "mcp-remote", "https://api.trendsmcp.ai/mcp", "--header", "Authorization:${AUTH_HEADER}"],
  "env": { "AUTH_HEADER": "Bearer YOUR_API_KEY" }
}

This path is not fully local (Claude Desktop inference runs on Anthropic's stack), but the mcp-remote pattern is the same bridge local-only stacks replicate.

Request budgeting for local agent loops

Local agents tempt tight polling loops. A ReAct agent checking five keywords across three sources can burn 15 requests per reasoning cycle. On the 100-request free tier, that leaves fewer than seven full cycles per month.

Practical limits for local workflows:

Pattern Requests per cycle Free tier cycles per month
Single keyword, one source 1 100
Five keywords, one source each 5 20
One live feed pull (get_top_trends) 1 100
Five keywords, three sources each 15 6

Cache trend responses in a local SQLite or JSON file when the agent revisits the same keyword within a session. Use get_growth with multiple percent_growth periods in one call instead of separate get_trends pulls for each window.

For read-only agent patterns that minimize write risk, see read-only trend data MCP.

Example tool calls local agents use most

Live breakout scan (no keyword needed)

get_top_trends(type="Google Trends", limit=10)

Returns the current Google trending leaderboard. One request.

Keyword momentum check

get_growth(source="google search", keyword="GLP-1", percent_growth=["3M", "12M", "YTD"])

Returns growth percentages for three windows in one request.

Cross-platform signal

Run three separate calls for google search, tiktok, and reddit on the same keyword. Three requests total. The normalized 0-100 scale makes cross-source comparison possible without custom parsers.

When local LLM plus Trends MCP fits

This stack fits teams with data residency requirements for customer conversations but a legitimate need for external market signals. Financial research pods, healthcare analytics groups, and legal practices often block cloud LLM uploads while still tracking public trend data.

It fits less well when the workload needs sub-minute polling across ten live feeds. The 100-request free tier and monthly paid caps reward batch research, not high-frequency trading-style refresh rates. Upgrade to Starter ($19, 1,000 requests) when local agent prototypes move to daily production use.

For workflow patterns that apply regardless of hosting, see LLM-native trend research workflow.

Common questions

The model runs locally, but Trends MCP queries go to api.trendsmcp.ai over HTTPS. Prompt text and model outputs stay on-device when using Ollama or LM Studio. Only the structured tool call (source, keyword, or feed type) and the JSON response cross the network. No prompt content is required in the API request.
Continue for VS Code supports MCP servers with local Ollama models. Claude Desktop and Cursor support MCP natively and can run alongside local models in some setups. Open WebUI added MCP server support in 2025. LM Studio exposes local models via OpenAI-compatible endpoints; pair it with a separate MCP client or an agent framework like LangChain that calls both.
Trends MCP's free tier includes 100 requests per month with no credit card. One get_trends call with one source and one keyword equals one request. One get_top_trends call for a single live feed also equals one request. Local agents in tight loops should batch keywords or cache responses locally to avoid exhausting the monthly pool in a single session.
Install Ollama, pull a model, install Continue in VS Code, add Trends MCP as an HTTP MCP server with a Bearer API key, and prompt the model to call get_top_trends for live breakouts or get_growth for keyword momentum. The full config fits in one JSON block and one API key from trendsmcp.ai/account.