Use case
A data analyst on Slack, on your warehouse
Connect your warehouse via MCP, encode the schema and conventions as rules, ask plain-English questions in Slack. The agent writes the SQL, runs it, posts the answer with the table and the query. Postgres, Snowflake, BigQuery, anything with an MCP server.
What this looks like
Most ad-hoc data requests are the same shape. Someone in marketing or product asks a question that's a 30-second SQL query for anyone fluent and a one-day turnaround for everyone else. Half the data team's week disappears into answering them.
Nairi sits in the analyst channel and answers from your actual warehouse. Postgres, Snowflake, BigQuery, all wired up as MCP configs with the DB credentials sealed inside. A schema cheat-sheet rule tells the agent which table holds what; metric-definition rules tell it which canonical version to use. The agent writes the SQL, runs it, replies with the one-sentence answer, a small table, and the collapsed query.
Safe by construction. The DB user has SELECT only, no write grants. The MCP runs in restricted access mode. Query-safety rules cap unbounded selects and require date filters on time-series tables. The data team writes the schema rules and keeps owning the warehouse; the agent handles the questions that would otherwise interrupt them.
What the agent does
Ad-hoc questions, scheduled digests, real anomaly diagnosis.
Ask in plain English, get SQL + answer back
Mention @Nairi in the analyst channel: "how were sign-ups last week vs the week before?". The agent writes the SQL, runs it against the warehouse, replies with a one-sentence answer, a small table, and the SQL collapsed in a code block. Anyone on the team can ask, not just the SQL fluent.
Schema-aware, not table-guessing
A schema-cheat-sheet rule tells the agent which table holds what and which canonical metric definition is the right one. First SQL is usually correct instead of three rounds of "actually the column is called user_id not userid".
Safe by construction
Read-only DB credentials, MCP access-mode restricted, query-safety rules ("default date filter on time-series tables, LIMIT 1000 on unbounded selects, never cross-joins, ask before scanning >100 GB"). The two layers stack: even if the agent tries something dumb, the DB user can't do damage.
Anomaly diagnosis, not just numbers
When the question is about a change ("why are conversion rates down this week?"), the agent reports the number and the likely cause from what's in the data: a deploy correlation, a segment shift, a date-range mismatch.
Multiple warehouses, one agent
Attach Postgres + Snowflake + BigQuery to the same agent. A rule tells the agent which warehouse holds what (clickstream in BQ, transactions in Postgres, marketing data in Snowflake) so it picks the right one without asking.
Recurring digests on a schedule
Turn an ad-hoc question into a scheduled job that posts the same answer every Monday morning. Same agent, same SQL, no new wiring. Useful for KPI dashboards in chat instead of in BI tools.
Three scenarios teams use it for
Ad-hoc questions, recurring digests, anomaly diagnosis.
01
Ad-hoc question from a non-SQL teammate
Marketing lead asks in the analyst channel: "how many new signups from the Slack ad last week vs the LinkedIn ad?". The agent writes the SQL (joining the ad_campaigns table to the signups table on attribution_id), runs it, replies with the two-number answer, the table, and the collapsed SQL. The marketing lead got the answer in 30 seconds without anyone in data having to context-switch.
02
Weekly KPI digest, automated
The data lead writes the prompt once: "every Monday at 9am, post sign-ups, conversion rate, revenue, and the WoW delta for each. Add a one-paragraph diagnosis if any metric moved more than 15%". Wire it as a scheduled job. Every Monday the message lands in #weekly-kpis with the same shape, automatically. No new wiring; same agent, same SQL.
03
Real anomaly investigation
Engineering pings the analyst agent: "wait times spiked yesterday on payments, why?". The agent pulls the wait_time data, checks for a deploy correlation, looks at segment breakdowns by region and payment method, finds the issue isolated to a specific provider, posts the diagnosis with the SQL that found it. Saves the data team an hour of dashboard hunting.
How it works
Warehouse via MCP, schema as rules, safety in three layers.
- 1
Wire the warehouse as a custom MCP
Postgres, Snowflake, BigQuery, or anything else with an MCP server. Configure as a sensitive MCP config with the DB connection string in the env block. Pass --access-mode=restricted (or equivalent) to lock to read-only. The credentials sit inside the MCP config; the agent only sees the MCP's tool surface.
- 2
Encode the schema and conventions as rules
Schema cheat-sheet (which table holds what, which columns matter), metric definitions ("revenue means sum(fare) on completed rows, not all rows"), output format ("lead with one-sentence answer, then table, then collapsed SQL"). Without these the agent guesses table names and burns tool calls. With them, first SQL is usually right.
- 3
Bind the agent to the analyst channel
#data, #analyst, #metrics, your call. The agent listens for mentions, reads the conversation context, and posts results back in the thread. Multi-person by default. Anyone in the channel can ask.
- 4
Add safety nets, ship it
Query-safety rules ("default 7-day filter on time-series tables, LIMIT 1000 on unbounded selects, never cross-joins, ask before scanning >100 GB"). The DB user has SELECT only, no write grants. The MCP is restricted-mode. Three layers of safety so a wrong query is annoying, not catastrophic.
Put a data analyst in your analyst channel
Wire the warehouse, encode the schema, ask in plain English. Read-only by construction, three layers of safety, self-host the runtime if the data can't leave your infra.
Questions about data-analyst use
What data teams ask before they connect the warehouse.