1:02Hey there, everyone. Welcome to our live stream on Agents That Build Tables, Not Just Query Them. We'll be talking about MotherDuck's new MCP feature where you can both read and write to MotherDuck. I'm joined by Jacob Mattson, DevRel at MotherDuck.
1:55MotherDuck is building infrastructure for answers. We're a cloud data warehouse that lets you ask questions and get answers in whatever way you want — whether you are a human or an agent — using SQL or natural language. MotherDuck is built on DuckDB, giving you fast analytics in a serverless cloud setup.
3:35All right. We're going to do this demo in Claude Web. I'm going to use Claude Web with the MotherDuck connector. This works on desktop, works anywhere. There's an MCP. You can use Cursor. It really just depends on what your favorite tool is.
4:53I'm using a dataset called WineList. I'm going to give Claude a prompt to look at the data in mydb.me.winelist. It's smart enough to know that's a request to look into the MotherDuck MCP.
6:00It runs some queries, lists the tables, finds the wine list. A thousand rows. Not too big, but we can do some fun stuff with it.
7:20What I want to do first is enrich this with AI-generated descriptions. I'll use MotherDuck's prompt() function to write a product description for each wine using country, region, producer, name, vintage, and score as context.
8:30It's already doing some data quality analysis — flagging the non-vintage edge case, vintage year 1000, using coalesce. That's a nice catch. Let's use GPT 5.0 as the model. It's testing the query syntax before running the full table, which is smart.
10:40We serve these models via Azure using the secure Azure model serving layer with OpenAI. So you can use OpenAI models inside Claude, which is pretty cool. Now it's running with the query_rw tool — you'll notice there are two query tools when you use the MCP. One is called query, one is called query_rw.
13:50Now let's create another new table that adds embeddings for each description — 512-dimension vectors so we can do cosine similarity search later. Claude knows to check the MotherDuck docs for the embeddings syntax. Done. It worked.
15:00Elegant Burgundy Pinot Noirs with aging potential — using cosine similarity. Here are the recommendations. A 97-score wine that nobody knows about. That is extremely funny. So we've basically built a recommendation engine on the fly in SQL inside Claude on MotherDuck.
19:30Let me pop into the MotherDuck UI to show what we built. We've got unit size, bottle size, scores, quantities, prices, descriptions, and embeddings all in one table. The varchars are now integers. Pretty cool.
22:50So what just happened? We took a dataset, enriched it, cleaned it up, and found some bottles of wine. Now let me talk about what architecturally makes this possible.
23:50Four things make MotherDuck well-suited for this type of agentic workflow. First: zero-copy cloning. If you're working on a warehouse owned by someone else, they can share it to you without duplicating data. You make local modifications. Production is untouched.
24:50Second: time travel. We have snapshotting now. If you drop a table with your agent, you can undrop it. So even for sensitive datasets that are expensive to rebuild, we have those safety features.
25:40Third: hyper-tenancy. Every user gets their own database and doesn't share by default. If your agent writes a bad query, it only affects your instance, not your neighbors'.
26:30Fourth: we split query and query_rw into two separate tools. If you want to enable the MCP but not writes, you can turn that off. Claude and Anthropic have a built-in feature to disable specific tools inside specific MCPs.
28:05Q&A. On how the workflow has changed: a lot of Excel work has just been replaced. AI and SQL have basically replaced spreadsheets for me. I'm someone who used Excel my whole career and was pretty good at it.
29:52On runaway costs: MotherDuck isn't like Snowflake or BigQuery — you can't run queries for 24 hours or use 40,000 slots. That constraint naturally limits cost blowout.
36:03On the local DuckDB MCP vs remote MotherDuck MCP: the local MCP runs on your machine and is free. The remote MCP runs on MotherDuck's servers and handles authentication. The tool sets are similar but not identical. Those are two separate pathways.
35:15For people new to MotherDuck today: start with a real problem you have. DuckDB is free, open source, MIT licensed, runs anywhere. MotherDuck fits in when you need to persist and share data. We have a free trial and a free plan for personal use.
38:14All right. With that, we'll end it here. We'll share the recording link and put it on our website. Thank you, everyone.