MO

MotherDuck

Created 6 months ago

An MCP server implementation that interacts with DuckDB and MotherDuck databases, providing SQL analytics capabilities to AI Assistants and IDEs.

development location documentation public SQL analytics

What is MotherDuck?

Query and analyze data with MotherDuck and local DuckDB

Documentation

MotherDuck's DuckDB MCP Server

Resources

Features

  • Hybrid execution: query data from local DuckDB or/and cloud-based MotherDuck databases
  • Cloud storage integration: access data stored in Amazon S3 or other cloud storage thanks to MotherDuck's integrations
  • Data sharing: create and share databases
  • SQL analytics: use DuckDB's SQL dialect to query any size of data directly from your AI Assistant or IDE
  • Serverless architecture: run analytics without needing to configure instances or clusters

Components# Prompts

The server provides one prompt:

  • duckdb-motherduck-initial-prompt: A prompt to initialize a connection to DuckDB or MotherDuck and start working with it

Tools

The server offers one tool:

  • query: Execute a SQL query on the DuckDB or MotherDuck database

Command Line Parameters

The MCP server supports the following parameters:

Parameter Type Default Description
--transport Choice stdio Transport type. Options: stdio, sse, stream
--port Integer 8000 Port to listen on for sse and stream transport mode
--db-path String md: Path to local DuckDB database file or MotherDuck database
--motherduck-token String None Access token to use for MotherDuck database connections (uses motherduck_token env var by default)
--read-only Flag False Flag for connecting to DuckDB or MotherDuck in read-only mode. For DuckDB it uses short-lived connections to enable concurrent access
--home-dir String None Home directory for DuckDB (uses HOME env var by default)
--saas-mode Flag False Flag for connecting to MotherDuck in SaaS mode. (disables filesystem and write permissions for local DuckDB)
--json-response Flag False Enable JSON responses for HTTP stream. Only supported for stream transport

Getting Started# General Prerequisites

  • uv installed, you can install it using pip install uv or brew install uv

Prerequisites for DuckDB

  • No prerequisites. The MCP server can create an in-memory database on-the-fly or connect to an existing local DuckDB database file, or one stored on remote object storage (e.g., AWS S3).

Prerequisites for MotherDuck

Usage with Cursor

  1. Install Cursor from cursor.com/downloads if you haven't already
  2. Open Cursor:
  • To set it up globally for the first time, go to Settings->MCP and click on "+ Add new global MCP server".
  • This will open a mcp.json file to which you add the following configuration:
{
  "mcpServers": {
    "mcp-server-motherduck": {
      "command": "uvx",
      "args": [
        "mcp-server-motherduck",
        "--db-path",
        "md:",
        "--motherduck-token",
        ""
      ]
    }
  }
}

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Server Config

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

Links & Status

Repository: github.com
Hosted: No
Global: Yes
Official: Yes

Project Info

Hosted Featured
Created At: May 23, 2025
Updated At: Aug 07, 2025
Author: MotherDuck Team
Category: official
License: MIT License
Tags:
development location documentation