DuckDB / MotherDuck MCP Server

DuckDB / MotherDuck Local MCP Server

An MCP server for SQL analytics on DuckDB: local files, in-memory databases, S3-hosted databases and MotherDuck

  • 536 ★ on the repository
  • Last commit
  • MIT
MCP serverOfficial

Extended access

Why this level

  • Runs SQL with access to the local filesystem
  • Can modify and delete data in read-write mode
All reasons and checks

motherduckdb/mcp-server-motherduck

Install

Manual install

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

In-memory database with writes and database switching.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Runs SQL with access to the local filesystem
  • Can modify and delete data in read-write mode

This is third-party code. Review the repository files before installing.

What it does

The server gives an agent DuckDB's analytical SQL engine. The agent runs DuckDB-dialect queries, lists databases, tables and columns, and with a flag switches databases on the fly. It connects to an in-memory database, a DuckDB file on disk, a file on S3 or cloud MotherDuck. It is read-only by default, --read-write enables writes, and results are capped by rows and characters.

Who it is for. For analysts and data engineers who want to explore CSV, Parquet and DuckDB databases through an agent.

Good fit when

  • You need quick numbers from local CSV or Parquet without standing up a database
  • You want the agent to access data in MotherDuck
  • You are debugging a DuckDB data pipeline with an agent

Not a fit when

  • Third parties need access: read-only mode still exposes the filesystem
  • Your data lives in PostgreSQL or ClickHouse and should stay there

Example request

Load sales.csv from this folder and compute revenue by month

MCP

Transport
stdio, http
Authentication
not required

Environment variables

motherduck_token secret
MotherDuck token, needed only for md:
AWS_ACCESS_KEY_ID secret
Access key for S3 databases
AWS_SECRET_ACCESS_KEY secret
Secret key for S3 databases

Limitations

Requires uv. MotherDuck needs a token, and read-only mode needs a read-scaling token. Read-only mode does not block access to the local filesystem or DuckDB settings; for outside users the authors recommend MotherDuck's remote MCP. Local files need no external services; MotherDuck availability from Russia is unverified.

How to disable. Run claude mcp remove duckdb or remove the server block from your client config.

FAQ

How does this differ from MotherDuck's remote MCP?

The remote one is hosted by MotherDuck and needs no install but cannot see local files. This server runs on your machine and can read and export data on disk.

What changed after 0.x?

The server became read-only by default, and the default database changed from MotherDuck to in-memory.

Discussion

No questions or reviews yet.

Official

The MCP server of the Duckle platform: an agent builds, checks and runs DuckDB ETL pipelines on your machine

MCP serverBroad access1.5KRepository stars
Official

A desktop SQL workspace with a built-in MCP server: the agent reads the schema and runs queries in the same client you already use

MCP serverBroad access5.3KRepository stars

MCP server for Apple Health data: an agent answers questions about sleep, workouts and heart rate with SQL

MCP serverExtended access575Repository stars
Editors’ pick

A token-lean MCP server for PostgreSQL, MySQL, MariaDB, SQL Server and SQLite with a read-only mode

MCP serverBroad access3.8KRepository stars

DB MCP Server

db-mcp-server

An MCP server for several databases with protection: a read-only mode per database and a row limit. Written in Go, launched in Docker

MCP serverBroad access474Repository stars
Official

A lightweight database workspace with an MCP server: the agent reads the schema, runs queries and explores data in PostgreSQL, MySQL and more

MCP serverBroad access5KRepository stars

README in short

The README compares the local server with MotherDuck's remote MCP and gives three configs: in-memory, a read-only local file and read-write MotherDuck. It includes commands for Claude Code, Codex and Gemini CLI, an MCPB bundle for Claude Desktop and install buttons for Cursor, VS Code and Kiro. It covers tools, Docker over HTTP, CLI flags and security advice. MIT licensed.

README badge

Report a problem

Foxx AIDuckDB / MotherDuck MCP Server
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.