StreamAI, ML and LLMsMotherDuck FeaturesSQLBI & VisualizationTutorial

The MCP Sessions - Vol 2: Supply Chain Analytics

2026/01/21

TL;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:

  1. Open Claude Desktop → Settings → Connectors
  2. Browse connectors → Search "data warehouse"
  3. 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:

  1. search_catalog: Finds tables matching your query ("shipments")
  2. get_table_schema: Returns columns and data types
  3. 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

ModeLate RateNotes
First Class100%Only "on-time" orders were cancellations
Same DayHighStructurally broken
Second ClassWorse than Standard
Standard38%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 ApproachMCP Approach
Write SQL manuallyNatural language prompts
Query → analyze → query20+ queries in minutes
Pre-built dashboardsOpen-ended exploration
Black box BI toolsSee 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

" The MCP Sessions Vol. 1: Sports Analytics" video thumbnail

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

"Building a Serverless Lakehouse with DuckLake" video thumbnail

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

"Watch Me Deploy a DuckLake to Production with MotherDuck!" video thumbnail

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