Talk to Your Data with AI
The MotherDuck MCP Server lets you analyze your data using natural language. Connect your favorite AI assistant—Claude, ChatGPT, Cursor, or others—and start asking questions about your databases without writing SQL.
In this guide, you'll set up the MCP server in Claude Desktop, verify the connection, and run your first AI-powered data analysis in under 5 minutes.
What you'll learn
- Install and configure the MotherDuck MCP Server in Claude Desktop
- Verify the connection and permissions
- List your databases
- Ask analytical questions about your data
Prerequisites
- A MotherDuck account (sign up free)
- Claude Desktop installed (download)
This guide uses Claude Desktop, but the 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 MCP Server:
- Open Claude Desktop → Settings → Connectors
- Click Browse Connectors and search for "MotherDuck"
- Click Add to install the MotherDuck connector
- 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:
- Open Claude Desktop → Settings → Connectors
- 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:
| Permission | Behavior |
|---|---|
| Always allow | Claude uses the tool automatically without asking. Faster iteration when errors occur, but no human confirmation before each action. |
| Needs approval | Claude asks for your confirmation before each tool use. Gives you visibility into every action. |
| Blocked | Claude cannot use this tool. |
Since the MCP Server only provides read-only access to your databases, setting tools to "Always allow" is safe and enables faster back-and-forth when Claude needs to retry or refine queries if errors occur.
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.
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.
What's happening under the hood
When you ask Claude a question about your data:
- Schema exploration: Claude examines your database structure to understand available tables and columns
- Query generation: Based on your question, Claude writes DuckDB SQL
- Query execution: The MCP Server runs the query on MotherDuck
- 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:

Next steps
You're now ready to analyze your data with AI. Here are some ways to go deeper:
- MCP Workflows Guide: Best practices for getting accurate results from AI-powered analysis
- MCP Server Reference: Detailed setup for all supported AI clients and available tools
- Building Analytics Agents: Build custom AI agents that programmatically query your data
Related resources
- MCP Server Setup — Setup for Claude, ChatGPT, Cursor, and other clients
- MCP Workflows — Tips and patterns for effective AI-powered analysis
- Sample Datasets — Explore sample data including Hacker News, NYC 311, and more