---
sidebar_position: 4
title: Talk to Your Data with AI
sidebar_label: AI Data Analysis
description: Get started with the MotherDuck MCP Server to analyze your data using natural language with Claude, ChatGPT, and other AI assistants
---

import VideoPlayer from '@site/src/components/VideoPlayer';

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](/key-tasks/ai-and-motherduck/dives) with a single prompt.

:::note
This guide covers the **remote MCP server** (fully managed by MotherDuck). If you need to work with local DuckDB files or want full control over the server, see the [local MCP server](/key-tasks/ai-and-motherduck/mcp-setup/#remote-vs-local-mcp-server).
:::

In this guide, you'll connect the MCP server in Claude Desktop, query your data, and create a Dive visualization, all in under 5 minutes.

## What you'll learn

- Connect the MotherDuck MCP Server to Claude Desktop
- List your databases
- Ask analytical questions about your data
- Create an interactive Dive visualization from your analysis

## Prerequisites

- A MotherDuck account ([sign up free](https://app.motherduck.com))
- Claude Desktop installed ([download](https://claude.ai/download))

:::tip 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 [full setup guide](/key-tasks/ai-and-motherduck/mcp-setup/) 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 Desktop** → **Settings** → **Connectors**
2. Click **Browse Connectors** and search for "MotherDuck"
3. Click **Add** to install the MotherDuck connector
4. A browser window opens for authentication with your MotherDuck account

<VideoPlayer
  playbackId="qvtgkAxQO900VlLsWeeUtqOLcyL3O02mAs16ed9JQXttE"
  title="Setting up MCP Server in Claude Desktop"
/>

## Step 2: Verify the connection and permissions

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

1. Open **Claude Desktop** → **Settings** → **Connectors**
2. Select **MotherDuck** and click on **Configure**

You should see tools like `query`, `list_databases`, and `ask_docs_question` available. You can configure tool permissions to control how Claude uses each tool. See [Configuring tool permissions](/key-tasks/ai-and-motherduck/mcp-setup/#configuring-tool-permissions) for details.

<VideoPlayer
  playbackId="xxbUNT2i00H602rJQqhXSsJAES01liomBLw81Z9500mxZ9g"
  title="Checking MCP configuration in Claude"
/>

## Step 3: List your databases

Test the connection by asking Claude to list your databases:

**Try this prompt:**

```text
List all my databases on MotherDuck.
```

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

<VideoPlayer
  playbackId="1Un101av02HjqhfMMnPUAgCH1f0202xL5axLDbMxj4wq00ZI"
  title="Listing databases with MCP"
/>

## 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:**

```text
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](/key-tasks/ai-and-motherduck/mcp-workflows/).

<VideoPlayer
  playbackId="lTPe0246XJ02H26r5J7EXgtNen4ZFjO7ZO6rUkHQoG6fc"
  title="Running analytics with MCP"
/>

<br />

:::info Sample databases
The `hacker_news` database is one of several sample datasets available. See [Sample Data & Queries](/getting-started/sample-data-queries/datasets) 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](/key-tasks/ai-and-motherduck/dives) are shareable visualizations that live in your MotherDuck workspace and stay up to date with your data.

**Try this prompt:**

```text
Create a Dive based on these insights.
```

Claude renders the Dive inline in the conversation with the Dive Viewer MCP App, using the same components as the MotherDuck UI and running against live data. Iterate conversationally: *"add a filter for the last 30 days"*, *"switch to a bar chart"*. Each edit saves as a separate version.

```text
Save it to MotherDuck.
```

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

<VideoPlayer
  playbackId="r100zSyc7Z02AQPFTSSZfNFzq64VI6cZaVIFNHDlbA02T00"
  title="Creating and saving a Dive to MotherDuck"
/>

## Next steps

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

- **[MCP Workflows Guide](/key-tasks/ai-and-motherduck/mcp-workflows/)**: Best practices and workflow patterns, including [how it works under the hood](/key-tasks/ai-and-motherduck/mcp-workflows/#how-it-works)
- **[Creating Visualizations with Dives](/key-tasks/ai-and-motherduck/dives/)**: Go deeper into Dives by iterating on visualizations, sharing with your team, and managing version history
- **[Connect to MCP Server](/key-tasks/ai-and-motherduck/mcp-setup/)**: Setup instructions for ChatGPT, Cursor, Claude Code, and other clients
- **[MCP Server Reference](/sql-reference/mcp/)**: Server capabilities, available tools, and regional availability
- **[Building Analytics Agents](/key-tasks/ai-and-motherduck/building-analytics-agents/)**: Build custom AI agents that programmatically query your data

