Building an Analytics Chatbot for your SaaS app in 1 dayLivestream March 11

Skip to main content

Talk to Your Data with AI

The MotherDuck remote MCP Server lets you analyze your data using natural language and generate interactive visualizations—all without writing SQL. Connect your favorite AI assistant—Claude, ChatGPT, Cursor, or others—and start asking questions about your databases, then turn insights into shareable Dives with a single prompt. (For self-hosted, read-write access, use the local MCP server instead.)

In this guide, you'll set up the remote MCP server in Claude Desktop, verify the connection, run your first AI-powered data analysis, and create a Dive visualization—all in under 5 minutes.

What you'll learn

  • Install and configure the MotherDuck remote MCP Server in Claude Desktop
  • Verify the connection and permissions
  • List your databases
  • Ask analytical questions about your data
  • Create an interactive Dive visualization from your analysis

Prerequisites

Using a different AI client?

This guide uses Claude Desktop, but the remote MCP Server works with ChatGPT, Cursor, Claude Code, and other MCP-compatible clients. See the MCP Server setup page for instructions for your preferred client.

Step 1: Add the MCP Server to Claude Desktop

Open Claude Desktop settings and add the MotherDuck remote MCP Server:

  1. Open Claude DesktopSettingsConnectors
  2. Click Browse Connectors and search for "MotherDuck"
  3. Click Add to install the MotherDuck connector
  4. A browser window opens—authenticate with your MotherDuck account

Step 2: Verify tools and permissions

After adding the connector, confirm Claude has access to the MotherDuck tools:

  1. Open Claude DesktopSettingsConnectors
  2. Select MotherDuck and click on Configure

You should see tools like query, list_databases, and ask_docs_question available.

Each tool has a permission setting that controls how Claude can use it:

PermissionBehavior
Always allowClaude uses the tool automatically without asking. Faster iteration when errors occur, but no human confirmation before each action.
Needs approvalClaude asks for your confirmation before each tool use. Gives you visibility into every action.
BlockedClaude cannot use this tool.
tip

The MCP Server provides both read-only (query) and read-write (query_rw) tools. For exploratory analysis, setting read-only tools to "Always allow" enables faster back-and-forth when Claude needs to retry or refine queries. You can keep query_rw on "Needs approval" or block it if you only need read access. See Securing read-only access for more options.

Step 3: List your databases

Test the connection by asking Claude to list your databases:

Try this prompt:

List all my databases on MotherDuck.

Claude will use the MCP tools to connect to MotherDuck and return your database list.

Step 4: Analyze your data

Now let's run an actual analysis. If you don't have data yet, you can attach the sample Hacker News database:

Attach the sample database:

Attach this db 'md:_share/hacker_news/de11a0e3-9d68-48d2-ac44-40e07a1d496b' give me some analytics.

The hacker_news database contains Hacker News stories, comments, and metadata from 2016 to 2025. You'll see that even with a minimal prompt, you get great results for a first data exploration. For more tips on effective prompting and workflow patterns, check out the MCP Workflows Guide.


Sample databases

The hacker_news database is one of several sample datasets available. You can also attach it manually with SQL:

ATTACH 'md:_share/hacker_news/de11a0e3-9d68-48d2-ac44-40e07a1d496b' AS hacker_news;

See Sample Data & Queries for more datasets to explore.

Step 5: Create visualizations with Dives

Now that you've explored your data, turn your insights into a persistent, interactive visualization. Dives are shareable visualizations that live in your MotherDuck workspace and stay up to date with your data.

Try this prompt:

Create a Dive based on these insights.

Claude will generate a preview of the visualization directly in the conversation. Once you're happy with it, ask Claude to save it:

Save it to MotherDuck.

The Dive is now saved to your workspace. You can open it in the MotherDuck UI, share it with your team, and it will always query live data.

What's happening under the hood

When you ask Claude a question about your data:

  1. Schema exploration: Claude examines your database structure to understand available tables and columns
  2. Query generation: Based on your question, Claude writes DuckDB SQL
  3. Query execution: The remote MCP Server runs the query on MotherDuck
  4. Results interpretation: Claude explains the results in natural language

You can also inspect which SQL query the MCP executed by expanding the tool call in the conversation:

Inspecting the query executed by MCP

When you create a Dive:

  1. Data analysis: The AI agent queries your database to understand the data relevant to your request
  2. Visualization generation: The agent generates an interactive React component with the SQL queries and chart configuration
  3. Local preview: A preview of the Dive renders directly in the conversation so you can iterate before saving
  4. Save to MotherDuck: Once saved, the Dive is stored in your workspace and queries live data—no stale snapshots. You can find it in the MotherDuck UI under the Object Explorer or SettingsDives
  5. Share with your team: The agent can share the underlying data with your organization so others can view and interact with the Dive

Next steps

You're now ready to analyze your data and create visualizations with AI. Here are some ways to go deeper:

  • Sample Datasets — Explore sample data including Hacker News, NYC 311, and more