Skip to main content

Snowflake Cortex Code

Cortex Code MCP server for live trend data

TrendsAGI is a hosted, read-only MCP server you can add to Snowflake Cortex Code — the CoCo CLI, Cortex Code Desktop and CoCo in Snowsight — with one command. Your agent gets measured trend volume, velocity, growth, AI insights and evidence-backed recommendations instead of guessing at demand.

Add it to CoCo

cortex mcp add trendsagi https://api.trendsagi.com/mcp --type http

Or install the plugin

cortex plugin install github:TrendsAGI/TrendsAGI/plugins/trendsagi
Streamable HTTP transport
OAuth 2.1, dynamic client registration
Read-only tools

Two ways in, both without an application.

Cortex Code has no public MCP directory to submit to. You configure the server yourself, or you install a plugin that declares it. Neither path needs Snowflake to review anything.

Direct add

One command against the hosted server. Best for an individual analyst or a developer trying it today.

cortex mcp add trendsagi https://api.trendsagi.com/mcp --type http

CoCo plugin

Ships the MCP server plus a skill that teaches Cortex Code when trend data is the right answer.

cortex plugin install github:TrendsAGI/TrendsAGI/plugins/trendsagi

Set it up in six steps.

The whole path is a command, one browser approval and a check in the session. Nothing to deploy, nothing to host, no API key to paste.

cortex mcp list     # trendsagi is listed as http
cortex mcp start    # connects and reports the tool count
# inside a session
/mcp                # shows trendsagi, connected, 13 tools
  1. 01

    Check the CLI and your connection

    Run cortex --version, then confirm a Snowflake connection exists in ~/.snowflake/connections.toml (snow connection add creates one). Cortex Code needs the connection even though the TrendsAGI tools are remote.

  2. 02

    Register the server

    One command adds TrendsAGI to ~/.snowflake/cortex/mcp.json. Use --type http; the endpoint is Streamable HTTP, not stdio and not legacy SSE.

  3. 03

    Confirm it connects

    cortex mcp start connects every configured server and reports connected and failed counts. A healthy entry shows trendsagi with 13 tools.

  4. 04

    Sign in once

    The first tool call returns 401 with a resource-metadata pointer. Cortex Code registers itself through dynamic client registration, opens your browser, and you approve the connection on the TrendsAGI consent page.

  5. 05

    Check the tool list in a session

    Run /mcp inside a session. You should see trendsagi, its transport, its connection state and its tool count. Toggle it off there without editing any file.

  6. 06

    Revoke from TrendsAGI when you are done

    Each connection becomes its own key under Profile > API Keys. Deleting the key disconnects that Cortex Code install immediately.

Team rollout config

Put the same entry in ~/.snowflake/cortex/mcp.json to skip the command, or ship it in a connection profile so every user of that profile gets it.

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

Cortex Code expands ${VAR} in every field, and migrates credentials out of the file into the OS keychain on first connection. Never commit a token here.

If the browser flow is blocked

Add the OAuth block explicitly. Cortex Code reads the authorization server from the server's metadata; the redirect stays on loopback, which TrendsAGI allows.

{
  "mcpServers": {
    "trendsagi": {
      "type": "http",
      "url": "https://api.trendsagi.com/mcp",
      "oauth": {
        "client_name": "Cortex Code",
        "redirect_port": 8585,
        "scope": "trends:read"
      }
    }
  }
}

To reset the credential, run cortex mcp remove trendsagi and add the server again.

What CoCo can call.

Tools are namespaced as mcp__trendsagi__<tool>, so they never collide with a Snowflake tool of the same name.

Plan gating applies inside tools/list: a tool your plan does not include is not advertised, so the agent does not waste a turn on a call that would fail.

list_trends
Trending topics with measured volume, velocity and growth; filter by category or phrase.
search_trend_insights
Find trends by theme and see why they are moving.
get_trend_analytics
A trend's volume over 24h, 7d or 30d, to judge rising versus fading.
get_trend_ai_insights
Summary, themes, sentiment, audience and marketing angles for a trend.
list_recommendations
Prioritised recommendations with evidence completeness, not invented odds.
list_crisis_events
Reputation risks on your monitored topics before you scale spend.
read_data_schema · execute_sql
Read-only SQL over trends, readings, insights, watchlist and recommendations.
get_trend · list_trend_categories · list_watchlist · get_api_usage
Supporting lookups.
find_capability
Whether TrendsAGI can do a task, and which tool or app page does it.

For Snowflake administrators.

Cortex Code has no public MCP marketplace, but it does have administrator controls. These are the five that decide whether TrendsAGI can reach your users.

Curated Tools catalog
Snowflake's AI Gateway catalog lists first-party and partner MCP servers such as GitHub, Atlassian, Slack and Salesforce. Getting into that catalog is a Snowflake partnership conversation, not a form. TrendsAGI is not listed there today.
Custom server, no partnership needed
Any ACCOUNTADMIN can add an MCP server that is not in the catalog by URL under AI & ML > AI Gateway > MCP & Tools. That is the path for a Snowflake customer who wants TrendsAGI available to every CoCo user in the account.
User MCP servers can be switched off
When an administrator sets areUserMcpServersAllowed to false, Cortex Code ignores ~/.snowflake/cortex/mcp.json entirely and skips plugin-declared servers too. Only administrator and connection-profile servers load, so the custom-server route is required in that mode.
URL allowlists apply after merging
Administrators can restrict which MCP endpoint URLs are permitted. A server whose URL is not allowed is removed silently after configuration is merged, which looks like a connection failure to the user.
Skills and plugins catalog is account-scoped
Snowflake's snow:// skill_catalog sharing works inside one Snowflake account only; cross-account sharing is not supported. It is useful for a customer's internal rollout, not for public distribution.

For the procurement path — pilot, security review, AI Gateway registration and enterprise agreement — see the contact page or email [email protected].

What advertising teams ask it

“Which topics in our category are accelerating fastest right now?”

A ranked list with measured volume, velocity and growth.

“Is this keyword's demand rising or fading before we raise the budget?”

The trend's 7-day and 30-day series and its direction.

“Which audiences and angles does the insight suggest for this trend?”

Stored audience segments, sentiment, themes and marketing angles.

“Do we have a reputation risk on any monitored topic?”

Crisis events on plans that include them, before spend scales.

Known limits

  • Read-only. The connection cannot change your account, create or edit campaigns, or spend money.
  • Every tool call counts as one API request against your plan's daily limit.
  • Cortex Code caps a tool result at 50 KB. TrendsAGI already caps lists at 25 trends, 10 recommendations and 200 SQL rows so answers stay inside that budget.
  • TrendsAGI measures trend volume, velocity and growth. It does not report ad spend, conversions or attribution.
  • A recommendation's confidence reflects how complete its evidence is, not the chance that it will work.

Connect it to paid media

MCP is the read path. Campaign changes stay in the separate ads connectors, behind preview and approval. See the MCP server guide for the full tool list and plan limits.

Cortex Code MCP questions

Direct answers about the Cortex Code connection. The same answers are published as FAQPage structured data so assistants can quote them accurately.

What is Cortex Code?

Cortex Code, also called CoCo, is Snowflake's AI coding agent. It runs as a CLI, a desktop app, in Snowsight and inside editors such as VS Code, JetBrains and Neovim. It implements the Model Context Protocol, so any MCP server you add becomes available to the agent in every session.

How do I add an MCP server to Cortex Code?

Run cortex mcp add trendsagi https://api.trendsagi.com/mcp --type http, or add the same entry under mcpServers in ~/.snowflake/cortex/mcp.json. Then run cortex mcp start to connect, and /mcp inside a session to confirm the server and its tool count. Cortex Code stores the configuration in ~/.snowflake/cortex/mcp.json.

Does Cortex Code support remote MCP servers?

Yes. Cortex Code supports stdio, Streamable HTTP and SSE transports. TrendsAGI uses Streamable HTTP at https://api.trendsagi.com/mcp, which is the transport to choose for a hosted service. Use --type http when you add it.

Do I need an API key for Cortex Code?

No. Cortex Code supports OAuth for HTTP MCP servers and performs dynamic client registration when no client_id is configured, so the first tool call opens a browser and you approve the connection on the TrendsAGI consent page. If your organisation blocks the browser flow, create a TrendsAGI API key and send it as a Bearer header instead.

Does this work in Cortex Code Desktop and in Snowsight?

Cortex Code Desktop reads the same MCP configuration and discovers administrator-enabled servers automatically. CoCo in Snowsight supports skills but does not browse plugin catalogs, so use the desktop app or the CLI when you want the full TrendsAGI tool surface.

Can a Snowflake administrator block the TrendsAGI server?

Yes. An administrator can set areUserMcpServersAllowed to false, which disables user and plugin MCP servers entirely, and can restrict allowed endpoint URLs. In those accounts an administrator must add TrendsAGI as a custom MCP server under AI & ML > AI Gateway > MCP & Tools before anyone can connect.

Is there a Cortex Code plugin for TrendsAGI?

Yes. cortex plugin install github:TrendsAGI/TrendsAGI/plugins/trendsagi installs a plugin that declares the hosted MCP server and a skill describing when to reach for trend data. Plugin-declared servers never overwrite a server you configured yourself, so the direct add always wins.

Is the Cortex Code connection read-only?

Yes. Every TrendsAGI MCP tool reads. The agent can list trends, read trajectories, fetch AI insights, review recommendations, inspect a watchlist and run read-only SQL. It cannot change your account, edit a campaign or spend money.

How much does the TrendsAGI MCP server cost for Cortex Code?

An MCP connection uses the same plan as the rest of the API. Starter is $190 a year after a 7-day free trial and includes 100 API calls a day and one API key. Advantage includes 10,000 calls a day and adds insight search; Scale includes 100,000 and adds crisis events; Enterprise includes 500,000 with custom pricing. Every tool call counts as one request.

Add TrendsAGI to Cortex Code.

One command, one browser approval, read-only trend data for every CoCo session.