Before you start
Before connecting, review security to see whether DataFrey fits your requirements, how to scope access, and how we protect credentials and data.
- Privileges: run setup as
ACCOUNTADMINorSYSADMIN. DataFrey itself runsSELECTonly. - Auth: Programmatic Access Token (PAT).
- Scope: the generated SQL grants read on the whole database. Narrow it via Restrict access.
Setup
datafrey runs setup on first launch. To re-run it later:
Database & warehouse
Enter the target database and the warehouse DataFrey should run queries on.
The CLI collects both upfront to template the setup SQL.Every query issued through the MCP server runs on this warehouse, so size it for your expected MCP query load and complexity.
Run setup SQL
The CLI fills in the SQL below. Edit the grants now if you’re scoping to specific schemas or tables (see Restrict access).
SQL Setup Code Example
SQL Setup Code Example
Paste credentials
Back in the CLI, paste:
To get the account identifier, run in Snowflake:
| Field | Value |
|---|---|
| Access token | The PAT from the last SQL result |
| Account identifier | orgname-accountname (see below) |
| Username | DATAFREY_USER (default) |
| Role | DATAFREY_ROLE (default) |
Verify
DataFrey verifies the connection after you paste credentials. Confirm the result:Expect
connected. On error, run datafrey db drop and restart datafrey db connect.Index
The CLI then offers to index your database — it explores your data to power the plan tool. Check the security page to see what the index holds and whether that’s acceptable for you.
Troubleshooting
Connection test fails with authentication error
Connection test fails with authentication error
Confirm the network policy is attached:
SHOW PARAMETERS LIKE 'NETWORK_POLICY' FOR USER DATAFREY_USER; should return DATAFREY_NETWORK_POLICY, and that policy must include 3.229.236.29 in its ALLOWED_IP_LIST.Account identifier format is wrong
Account identifier format is wrong
Format:
orgname-accountname, lowercase, no .snowflakecomputing.com suffix. To get it:Rotate PAT
Rotate PAT
PATs expire after 180 days. Rotate in Snowflake, then reconnect the CLI:
Next steps
Connect Claude Code
Install DataFrey as a Claude Code plugin.
Connect another AI client
Install DataFrey for Cursor or another MCP client.