Feedback

MotherDuck & DuckDB MCP Server Verified

@motherduckdb Claim

Basic information

Runtime
Python
Version
1.0.0
Category
License
MIT
Transports
stdio
Author
motherduckdb
Submitted by
Community
Quality
65
Stars
498

About MotherDuck & DuckDB MCP Server

Integrates MotherDuck and local DuckDB for flexible querying and analysis of structured data in MCP-compatible environments.

MotherDuck & DuckDB is a MCP server in the Databases category listed in the AddMCP.net directory, published by motherduckdb. It exposes 1 tool, including query. Supported transport: stdio. Runtime: Python. License: MIT. The repository has 498 GitHub stars. Source code is hosted on github.com. Related topics: ai, analytics-data, databases, duckdb, motherduck.

Setup

{
    "mcpServers": {
        "mcp-server-motherduck": {
            "command": "uvx",
            "args": [
                "mcp-server-motherduck",
                "--db-path",
                ":memory:"
            ]
        }
    }
}

MotherDuck & DuckDB MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "mcp-server-motherduck": {
            "command": "uvx",
            "args": [
                "mcp-server-motherduck",
                "--db-path",
                ":memory:"
            ]
        }
    }
}

MotherDuck & DuckDB MCP Server tools

  • query — Use this to execute a query on the MotherDuck or DuckDB database

Overview

What is MotherDuck & DuckDB?

An MCP server that connects AI assistants and IDEs to DuckDB's analytical SQL engine. It supports local DuckDB files, in-memory databases, S3-hosted databases, and MotherDuck. Users can execute SQL queries, browse database catalogs, and switch between connections at runtime.

How to use MotherDuck & DuckDB?

Install uv via pip install uv or brew install uv, then add a JSON configuration to your MCP client’s config file. Use the command uvx mcp-server-motherduck with args like --db-path :memory: for in-memory, --db-path /path/to/file.duckdb for local files, or --db-path md: for MotherDuck. Additional flags control read-write access, database switching, and security.

Key features of MotherDuck & DuckDB

  • Execute SQL queries in DuckDB dialect.
  • List databases, tables, and columns.
  • Switch database connections at runtime (requires --allow-switch-databases).
  • Read-only mode by default for safety.
  • Supports local, S3, and MotherDuck databases.
  • Configurable row and character limits for results.

Use cases of MotherDuck & DuckDB

  • Analyze local DuckDB files from an AI assistant.
  • Query an in-memory database for development and testing.
  • Connect to MotherDuck for cloud-based analytics.
  • Ingest or export data between remote databases and local filesystem.

Frequently asked questions

1 What is the difference between the local and remote MCP server?

The local server runs on your machine and requires installation; the remote server is hosted by MotherDuck with zero setup. Both support read-write, but only the local server can access the local filesystem.

2 How do I enable write access?

Add the --read-write flag. Without it, the server runs in read-only mode by default.

3 What are the default settings for database path and access?

The default --db-path is :memory: (in-memory). The server starts in read-only mode unless --read-write is set.

4 How do I connect to MotherDuck?

Set --db-path md: and provide a MotherDuck token via the motherduck_token environment variable or --motherduck-token flag. Use a read-scaling token for read-only access.

5 How do I secure the server for production?

Read-only mode is not sufficient when giving third parties access. Consider using MotherDuck Remote MCP, or self-host with service accounts, read-scaling tokens, SaaS mode (--motherduck-saas-mode), and --init-sql to apply security settings.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬