The MCP Sessions - Vol 2: Supply Chain Analytics
2026/01/21TL;DR: Watch Claude explore a 180,000-row e-commerce shipments dataset using the MotherDuck MCP—running 20+ SQL queries automatically to uncover that first-class shipping is 100% late, 19% of orders lose money, and late deliveries don't actually hurt customer retention.
Setting Up the MotherDuck MCP
The MotherDuck MCP is remotely hosted—no local setup required:
- Open Claude Desktop → Settings → Connectors
- Browse connectors → Search "data warehouse"
- Add MotherDuck (now in Anthropic's approved marketplace)
Works with Claude, Claude Code, ChatGPT, Cursor, and other MCP-compatible tools.
Loading Data from Hugging Face
The demo loads a shipments dataset directly from Hugging Face into MotherDuck by selecting from a Parquet URL. MotherDuck can load directly from Hugging Face, S3, Google Cloud, Azure, or any public URL.
MCP Tools in Action
When you ask Claude to analyze the data, it uses specialized MCP tools:
- search_catalog: Finds tables matching your query ("shipments")
- get_table_schema: Returns columns and data types
- run_query: Executes SQL and returns results
Claude writes SQL automatically—and includes its reasoning as comments in the generated queries, so you can see exactly what it's thinking.
Key Findings from Automated Analysis
Shipping Mode Problems
| Mode | Late Rate | Notes |
|---|---|---|
| First Class | 100% | Only "on-time" orders were cancellations |
| Same Day | High | Structurally broken |
| Second Class | Worse than Standard | |
| Standard | 38% | Best performing |
Insight: "First class deliveries are 100% late. The 5% showing on-time are actually cancelled orders."
Profitability Anomalies
- 19% of orders lose money
- Some orders have -275% profit margin (losing $300 per order)
- Late deliveries have slightly lower margins, but the gap is minor
Surprising Discovery: Late Delivery ≠ Churn
"Customers whose first order was late show nearly identical retention to those with on-time first orders."
Claude asked this question unprompted—demonstrating genuine analytical curiosity.
Data Quality Flags
- Actual shipping times don't vary by market, product, segment, or season (suspiciously consistent)
- All fraud cases are transfer payments
- All customers in US/Puerto Rico, but shipping to 100+ countries
Interactive Visualization
The demo uses a charting library, mviz, built for Claude that generates interactive HTML dashboards with conditional formatting, automatic bucketing of continuous variables, and floating metrics.
Why MCP Changes Data Analysis
| Traditional Approach | MCP Approach |
|---|---|
| Write SQL manually | Natural language prompts |
| Query → analyze → query | 20+ queries in minutes |
| Pre-built dashboards | Open-ended exploration |
| Black box BI tools | See every SQL query generated |
Key insight: SQL is verbose but has 50 years of training data. AI doesn't mind verbosity—it writes faster than humans can type.
Related Videos
2026-01-13
The MCP Sessions Vol. 1: Sports Analytics
Watch us dive into NFL playoff odds and PGA Tour stats using using MotherDuck's MCP server with Claude. See how to analyze data, build visualizations, and iterate on insights in real-time using natural language queries and DuckDB.
AI, ML and LLMs
SQL
MotherDuck Features
Tutorial
BI & Visualization
Ecosystem

2025-12-26
Building a Serverless Lakehouse with DuckLake
In this hands-on workshop, Jacob Matson walks through building a serverless lakehouse from scratch using DuckLake.
Webinar
Tutorial

2025-12-10
Watch Me Deploy a DuckLake to Production with MotherDuck!
In this video, Hoyt Emerson will show you the fastest way to get DuckLake into production using MotherDuck's beta implementation. If you've been following his DuckLake series, this is the next step you've been waiting for!
YouTube
Data Pipelines
Tutorial
MotherDuck Features
SQL
Ecosystem

