Cursor + Rig
The easiest way to query your warehouse data in Cursor
Cursor is an AI-native code editor that connects to external tools and data sources over MCP.
What Rig gives Cursor
Once connected, Cursor can reason over your governed data through Rig:
- Warehouse tables and views
- Metric definitions
- Join paths
- dbt lineage
- Role-based access
- Sandbox-validated SQL
How Cursor connects to Rig
Add Rig as an MCP server in Cursor. The editor's agent can then query your warehouse with governed SQL, so the code it writes and the answers it gives are grounded in your real, validated data.
Write data-aware code in Cursor
With Rig connected, Cursor's agent reads your actual schema and metric definitions while it codes. It builds queries and components against real tables and correct joins instead of inventing column names.
- Build an API endpoint that returns weekly active users
- Generate the SQL for revenue by cohort and wire it in
- What columns does the orders table have?
Answer data questions without leaving the editor
Cursor can run ad-hoc data questions through Rig inline, returning validated numbers. You keep your flow in the editor rather than jumping to a separate analytics tool.
- How many signups did we get this week?
- Show a sample of the subscriptions table
- Find the join from accounts to invoices
Keep Cursor's queries governed and safe
Rig validates each query in a sandbox and runs read-only, so the editor's agent cannot touch production or run away with an unbounded scan. Answers use agreed metric definitions.
- Validate this query before running it
- Recompute using the official active-user metric
- Add a limit and re-run that against the warehouse
Prototype on real numbers, ship with confidence
Because the data Cursor sees is the governed warehouse, prototypes line up with production reporting. The metric in your prototype is the same metric the business uses.
- Mock this dashboard with live revenue numbers
- Compare my calculation to the official metric
- Explain how lifetime value is defined here
Frequently asked questions
- How do I connect Cursor to my warehouse?
- Add Rig as an MCP server in Cursor. Rig builds the context layer over your warehouse and Cursor's agent can then query it with governed SQL.
- Can Cursor write code against my real schema?
- Yes. With Rig connected, Cursor reads your actual tables, joins and metric definitions and builds against them.
- Is warehouse access read-only in Cursor?
- Yes. Rig connects read-only and sandbox-validates each query before it runs.
- Which warehouses work with Cursor through Rig?
- Snowflake, BigQuery, Redshift, Postgres and DuckDB/MotherDuck, plus SaaS sources synced by Rig Ingest.
Related integrations
Connect your warehouse to Cursor
Rig builds a governed context layer over your data so every team, and every AI tool, asks questions and gets answers they can trust.