MotherDuck

v1.0.6Databasesstable

SQL analytics and data engineering for AI Assistants and IDEs

aiduckdbmotherduck
Share:
483
Stars
0
Downloads
0
Weekly
0/5

What is MotherDuck?

MotherDuck is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to sql analytics and data engineering for ai assistants and ides

SQL analytics and data engineering for AI Assistants and IDEs

This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • SQL analytics and data engineering for AI Assistants and IDE

Use Cases

SQL analytics for AI
DuckDB integration
Data engineering tasks
motherduckdb

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.6
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-server-motherduck

PIP

pip install mcp-server-motherduck

Manual Installation

npx -y mcp-server-motherduck

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MotherDuck

The MotherDuck MCP server connects AI assistants and coding tools directly to DuckDB and MotherDuck's cloud analytics platform, exposing SQL execution and schema inspection as first-class MCP tools. It lets you query in-memory databases, local DuckDB files, cloud MotherDuck databases, and S3-hosted data without leaving your AI workflow. Data engineers and analysts use it to run ad-hoc SQL analytics, explore schemas, and prototype data pipelines through natural-language prompts in Claude, Cursor, VS Code, or any MCP-compatible IDE.

Prerequisites

  • Python 3.10+ and uv or pip installed (uvx is the recommended runner)
  • A MotherDuck account and token if connecting to cloud databases (free tier available at motherduck.com)
  • AWS credentials if querying databases hosted on S3
  • An MCP-compatible client such as Claude Desktop, Cursor, or VS Code Copilot
1

Install the server package

Install mcp-server-motherduck using pip or uv. The uvx runner can also execute it directly without a persistent install.

pip install mcp-server-motherduck
# Or run without installing:
uvx mcp-server-motherduck --db-path :memory:
2

Set your MotherDuck token (if using cloud)

Export your MotherDuck authentication token as an environment variable. You can find this token in the MotherDuck console under Settings → Access Tokens. Skip this step if using only local DuckDB files.

export motherduck_token=your_motherduck_token_here
3

Add the server to Claude Code CLI

Use the Claude Code CLI to register the MCP server for your user. Adjust --db-path to point at a local file, md: for MotherDuck, or an S3 URL.

claude mcp add --scope user duckdb --transport stdio -- uvx mcp-server-motherduck --db-path :memory: --read-write --allow-switch-databases
4

Configure Claude Desktop manually

Alternatively, add the server directly to your Claude Desktop configuration file. Enable --read-write only if you need write operations; omit it for read-only analytics.

5

Verify the connection

Once configured, open your MCP client and ask it to list available databases or run a simple test query to confirm the server is responding correctly.

MotherDuck Examples

Client configuration

Claude Desktop configuration for connecting to an in-memory DuckDB instance with read-write access. Replace :memory: with a file path or md: for MotherDuck cloud.

{
  "mcpServers": {
    "DuckDB": {
      "command": "uvx",
      "args": [
        "mcp-server-motherduck",
        "--db-path", ":memory:",
        "--read-write",
        "--allow-switch-databases"
      ],
      "env": {
        "motherduck_token": "your_motherduck_token_here"
      }
    }
  }
}

Prompts to try

Use these prompts with your connected AI assistant to run SQL analytics through the MCP server.

- "List all tables in my database"
- "Run a SQL query to find the top 10 rows in the sales table ordered by revenue"
- "What columns does the customers table have?"
- "Switch to my MotherDuck database named analytics and show me its tables"
- "Create a summary table of monthly revenue from the orders table"

Troubleshooting MotherDuck

Authentication error when connecting to MotherDuck cloud

Ensure the motherduck_token environment variable is set correctly. You can also pass it directly via --motherduck-token flag. Retrieve your token from the MotherDuck console under Settings → Access Tokens.

Write queries fail even though --read-write is set

Confirm the --read-write flag is included in your args array and that your MotherDuck token has write permissions for the target database.

S3 database access returns permission errors

Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION environment variables. For temporary credentials also set AWS_SESSION_TOKEN.

Frequently Asked Questions about MotherDuck

What is MotherDuck?

MotherDuck is a Model Context Protocol (MCP) server that sql analytics and data engineering for ai assistants and ides It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MotherDuck?

Install via npm with the command: npx -y mcp-server-motherduck. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with MotherDuck?

MotherDuck works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MotherDuck free to use?

Yes, MotherDuck is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Databases MCP Servers

Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "motherduck": { "command": "npx", "args": ["-y", "mcp-server-motherduck"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MotherDuck?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides