mcp-server-motherduck

mcp-server-motherduck

MCP.Pizza Chef: motherduckdb

Point it at a data file on your laptop, a scratch in-memory database, or your MotherDuck account, and you can ask for counts, trends and comparisons in plain English. It reads only, unless you deliberately switch write access on. Setup is a short snippet pasted into Claude Desktop, Claude Code, Cursor, VS Code, Kiro, Codex or Gemini CLI, and Claude Desktop also has a one-click bundle. A MotherDuck sign-in key is needed only for MotherDuck-hosted data.

Data
Spreadsheets

Use This MCP server To

Ask for totals and trends from a data file on my laptop Compare two data files side by side in one question Explore a database I have never opened before Summarise a file far too big for a spreadsheet Switch between my local and cloud data mid-conversation

README

MotherDuck / DuckDB Local MCP Server

DuckDB / MotherDuck Local MCP Server

SQL analytics and data engineering for AI Assistants and IDEs.


Connect AI assistants to your data using DuckDB's powerful analytical SQL engine. Supports connecting to local DuckDB files, in-memory databases, S3-hosted databases, and MotherDuck. Allows executing SQL read- and write-queries, browsing database catalogs, and switching between different database connections on-the-fly.

Looking for a fully-managed remote MCP server for MotherDuck?Go to the MotherDuck Remote MCP docs

Remote vs Local MCP

Remote MCP Local MCP (this repo)
Hosting Hosted by MotherDuck Runs locally/self-hosted
Setup Zero-setup Requires local installation
Access Read-write supported Read-write supported
Local filesystem - Query across local and remote databases, ingest data from / export data to local filesystem

📝 Migrating from v0.x?

  • Read-only by default: The server now runs in read-only mode by default. Add --read-write to enable write access. See Securing for Production.
  • Default database changed: --db-path default changed from md: to :memory:. Add --db-path md: explicitly for MotherDuck.
  • MotherDuck read-only requires read-scaling token: MotherDuck connections in read-only mode require a read-scaling token. Regular tokens require --read-write.

Quick Start

Prerequisites: Install uv via pip install uv or brew install uv

Connecting to In-Memory DuckDB (Dev Mode)

{
  "mcpServers": {
    "DuckDB (in-memory, r/w)": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", ":memory:", "--read-write", "--allow-switch-databases"]
    }
  }
}

Full flexibility with no guardrails — read-write access and the ability to switch to any database (local files, S3, or MotherDuck) at runtime.

mcp-server-motherduck FAQ

Is this actively maintained?
Yes. It is MotherDuck's own project and was last updated in July 2026.
Can I use this to analyse a data file on my laptop?
Yes — point it at the file and ask your questions in plain English. Nothing has to leave your machine.
Do I need a MotherDuck account?
Only for data stored in MotherDuck. Local files and a scratch in-memory database work with no account at all.
Which apps does it work in?
Claude Desktop, Claude Code, Cursor, VS Code, Kiro, Codex CLI and Gemini CLI, among others.
Can it change or delete my data?
Not by default. It starts in read-only mode, and write access has to be turned on deliberately.
How hard is setup?
Mostly copy and paste. You install one small helper tool, then paste a short block into your app's settings. Claude Desktop also offers a one-click installer.