Connect Snowflake Cortex Agents (MCP)
Yuki exposes its optimization layer as an MCP (Model Context Protocol) server. Once connected, Snowflake Cortex Agents can call Yuki directly.
What Is an MCP Connection?
Each MCP connection represents one warehouse-user pair: the Snowflake warehouse used to run the agent's query, and the Snowflake user it authenticates as when running that query. If you want an agent to be able to query through more than one warehouse, or to run as more than one user, Yuki creates a separate connection for each pair you select.
A Cortex Agent can be attached to multiple MCP servers, but we recommend attaching only one Yuki MCP server per agent. Add every warehouse-user pair that agent needs as connections on that single Yuki MCP, rather than creating multiple Yuki MCPs for the same agent.
Step 1 - Connect Cortex Agents to Yuki
In the Yuki platform, go to the Integrations tab, search for Cortex Agent, and click Connect. This opens the Connect Cortex Agents wizard, which walks you through four stages: Connections, Key-pair users, MCP Credentials, and Authorize.
1. Connections
Search for and select the warehouses you want Cortex Agents to be able to query through Yuki.

Expand a warehouse to choose which Snowflake users can query through it. Each warehouse-user pair you check becomes its own MCP connection - for example, selecting ML_USER and CORTEX_USER under CORTEX_WH creates two connections, one per user. Use Select all to grant every user access to a warehouse, then click Review.

Review the connections that will be created and click Next.

2. Key-pair users
If key pair is a user's authentication method, Yuki needs that key pair to optimize their queries. Choose which of your selected users authenticate this way - you'll provide their credentials in the next step as part of the proxy deployment.
Queries from users not added here will continue running on their original warehouses and won't be optimized by Yuki.

3. MCP Credentials
Enter the Snowflake role that should be granted usage on the new connections, then copy the generated script and run it in a Snowflake worksheet. It registers the Yuki MCP endpoint and creates all of the connections in one step.

Running the script requires the ACCOUNTADMIN role in Snowflake.
4. Authorize
Click the Connect {n} connections button to have Yuki authorize every connection with Snowflake automatically. If a connection doesn't authorize, use Open a ticket for help, then click Done.

Step 2 - Add the connector to a Cortex Agent
Go to AI & ML → Agents and select the agent you want to connect to the MCP. Under Configuration → MCP, click Add to agent next to the Yuki connector.

If the agent has other tools connected besides the Yuki MCP, add an instruction telling it to use Yuki for database queries, for example: "Always run any database query through the yuki-query tool in the Yuki MCP. Never query the database any other way." Otherwise the agent may query Snowflake directly through another tool, bypassing Yuki's optimization.
What Happens Next
Your Yuki MCP connector is now connected to the Cortex Agent. The agent can call Yuki's optimization layer as a tool whenever it runs queries against your Snowflake account.