Table of contents

When you ask Codex to write an ETL transformation or a JSON flattening function, you usually paste a rough description of the table into the task.
That description can get column names slightly wrong, omit the nullability of a field, and guess at what a VARIANT column actually holds.
The real schema lives in Snowflake, not in the paragraph you wrote. So Codex generates a transformation against a column that doesn't exist, a parser that assumes the wrong nesting, or validation logic that misses half the enum values production actually contains.
To give Codex direct access to Snowflake as it works through your coding tasks, we'll show you how to connect Snowflake with Merge Agent Handler's Snowflake MCP server.
Merge Agent Handler connects Codex to the Snowflake API through the Merge CLI. You install the CLI, authenticate once, and run a single setup command from your project root.
That command writes a Merge CLI section to your project's AGENTS.md file, which tells Codex when to call merge search-tools and merge execute-tool to reach Snowflake.
Once connected, Merge handles credential storage and key rotation on your behalf, so you never put a Snowflake key pair or warehouse password in your repo.
Related: How to use the Snowflake MCP in Claude Code
Before getting started, you'll need the following:
pipx --version to confirm, or install via pip install pipx)If you want to connect Merge Agent Handler's Snowflake MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Install the Merge CLI with pipx: pipx install merge-api
Verify the install: merge --version
Run this to authenticate the CLI against your Merge Agent Handler account:
merge login
This links the CLI to your Merge account and stores your session credentials locally.
From the root of the project where you want Codex to reach Snowflake, run:
This writes a Merge CLI section to your project's AGENTS.md file so Codex knows to use the CLI when a task needs Snowflake data. The command is idempotent, safe to re-run if you need to reset the configuration.
Commit the updated AGENTS.md so the configuration travels with the repo.
Related: A guide to integrating the Snowflake MCP with Cursor
Create a Codex task that needs live Snowflake data. This can be something like: "Read the schema and a sample of rows from the ORDERS table and write a dbt model that aggregates daily revenue by region."
The first time Codex invokes a Snowflake tool, a Magic Link will appear to complete connector authentication.

Once authenticated, Codex can reach your Snowflake account through Merge for every later task in this project.
{{this-blog-only-cta}}
In case you have more questions on setting up and using the Snowflake MCP with Codex, we've addressed several more commonly-asked questions below.
With Snowflake connected, Codex can:
You can build your own MCP server against Snowflake. For a single developer pointing at one warehouse, it's a reasonable afternoon: create a user, manage a key pair, and write tool schemas for the queries your tasks run.
It gets harder once more than one person uses it or tasks run in CI.
Each user needs scoped credentials, key rotation, and a warehouse role that limits what they can touch, and you need a way to keep a runaway query from a Codex task off your production warehouse. Without central control, a single broad grant gives an agent more reach than anyone intended.
A self-hosted server doesn't solve that. You still own credential management and role scoping, and now you maintain the server too. Snowflake doesn't ship an official MCP server, so community builds come with no guarantees on coverage or upkeep.
Merge Agent Handler handles credential storage and rotation, and lets you scope exactly which Snowflake operations a Codex task can call. Every call is also logged with identity, timestamp, and the query that ran.
Snowflake holds the schemas, semi-structured columns, view definitions, and real value distributions that pipeline and analytics code has to match exactly.
Codex tasks that write transformations, parsers, dbt models, or validation logic need that ground truth to produce code that compiles and runs.
The alternative is describing the schema in the prompt, and those descriptions are always a little wrong. A misremembered column name, an omitted nullable field, or an out-of-date enum set is enough to make Codex generate code that fails against the real warehouse.
Connecting Snowflake lets Codex read the schema and sample the data when a task needs it. The column types before an ETL job, the VARIANT shape before a flattening function, the distinct values before validation logic: Codex works from the warehouse itself, not a stale description of it.
Yes, Merge for Workforce is built to help organizations provision, secure, and govern how employees connect AI tools like Codex to data systems like Snowflake.
Common patterns include:
Taken together, employees can use the Snowflake MCP to generate transformations against real schemas, write parsers grounded in actual column structure, and build validation logic from production values, and more, while IT keeps centralized control over which databases and operations each agent can reach.
Use Merge Agent Handler’s 150+ connectors (including Snowflake) to power reliable, secure, and powerful agents.