Skip to main content

Snowflake Cortex Agents

Snowflake connects to the Timbr MCP server by creating an External MCP Server object - a first-class SQL object backed by an API INTEGRATION that handles authentication - then attaching it to a Cortex Agent used through Snowflake CoWork.

Use Case: Loan Covenant Monitoring​

A lender keeps loans and payments in Snowflake, customer profiles in MongoDB, and signed loan agreements as PDF files (read with GraphRAG Extract). Timbr maps all three into one ontology. A Cortex Agent connected to Timbr over MCP can then answer questions across them without moving any data into Snowflake.

Architecture diagram: a credit risk analyst asks a Cortex Agent in Snowflake CoWork. The Cortex Agent calls the Timbr Data Agent over MCP with the ask_question tool. The Timbr Data Agent generates semantic SQL, which runs through the ontology and virtualization against Snowflake, MongoDB and loan agreement files. The answer returns to the Cortex Agent.

How It Works​

  1. A credit risk analyst asks the Cortex Agent a question in Snowflake CoWork.
  2. The Cortex Agent sends the question to Timbr with the ask_question tool of the External MCP Server.
  3. The Timbr data agent turns the question into semantic SQL, and Timbr runs it across the sources through the ontology and virtualization.
  4. Timbr returns the answer to the Cortex Agent, which shows it to the analyst.

Example​

The analyst asks:

Which borrowers with more than $250,000 outstanding missed a payment in the last 60 days, and what does their loan agreement say about it?

Payments and balances come from Snowflake, industry from MongoDB, and default terms from the loan agreement PDFs. An illustrative answer, with fictional borrowers and amounts:

BorrowerIndustryOutstandingDays past dueDefault threshold
Elm Street Dental GroupHealthcare$298,5004730 days
Harbor Lane Bakery LLCFood service$412,0003430 days
Northgate Machine WorksManufacturing$1,180,0002145 days

Two of the three are already past the default threshold in their loan agreements.

Pick the Timbr data agent

Name the data agent in the tool call with the agent_name parameter, for example by adding Always pass agent_name: credit_risk_agent when you call Timbr tools to the Cortex Agent's instructions.

Setup​

Snowflake's external_mcp integration only supports OAuth (no x-api-key/header-based auth option), so setup means choosing between:

  • Dynamic Client Registration (DCR) - each Snowflake user signs in with their own identity and gets their own Timbr permissions
  • Static Token Authentication - a fixed Timbr access token shared by everyone, no per-user sign-in
Full setup guide

For the complete SQL, step-by-step setup, callback URL requirements, and troubleshooting for both methods, see the Snowflake section of the OAuth guide.

For Snowflake's own reference documentation on external MCP connectors, see Snowflake's Cortex Agents MCP Connectors documentation.