Skip to main content
mcpSource-backedReview first Safety Privacy

MotherDuck MCP Server for Claude

Connect Claude to MotherDuck and DuckDB — run SQL queries and explore databases, tables, and columns — with the official MotherDuck Model Context Protocol server.

HarnessClaude CodeCodexCursorClaude Desktop
Review first review before installing

Open the source and read safety notes before installing.

Safety notes

  • The server is read-only by default; --read-write enables writes, and --allow-switch-databases enables switching — enable only when needed.
  • execute_query runs arbitrary SQL against the connected database; scope the token and database accordingly.

Privacy notes

  • Query results and schema metadata enter the MCP client context and the model's prompt.
  • The motherduck_token is a secret — keep it in the client config or environment, never in shared repositories.

Prerequisites

  • A MotherDuck account and token (motherduck_token) for cloud databases, or a local DuckDB file / :memory:.
  • uv (uvx) to run mcp-server-motherduck.
  • An MCP client such as Claude Code or Claude Desktop.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
5 minutes
Difficulty
intermediate
Tool listing metadata
Full copyable content
{
  "mcpServers": {
    "motherduck": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", "md:"],
      "env": {
        "motherduck_token": "<your-token>"
      }
    }
  }
}

About this resource

Overview

The MotherDuck MCP Server is the official Model Context Protocol server for MotherDuck and DuckDB. It lets Claude run SQL analytics and explore schemas in natural language — against a cloud MotherDuck database (md:), a local DuckDB file, an in-memory database, or data in S3. It runs over stdio or HTTP via uvx mcp-server-motherduck and is licensed under MIT.

Key capabilities

  • execute_query — run a SQL query against the connected database.
  • list_databases — list available databases.
  • list_tables — list tables and views.
  • list_columns — describe a table's columns.
  • switch_database_connection — switch databases (requires --allow-switch-databases).

How it compares

Several analytics-database MCP servers let Claude run SQL over columnar data; they differ in where the data lives:

MCP server Engine Data location Notable
MotherDuck MCP DuckDB / MotherDuck Local file, in-memory, S3, or MotherDuck cloud Same engine local and in the cloud
DuckDB MCP DuckDB Local / in-process Embedded analytics, no server
ClickHouse MCP ClickHouse ClickHouse server / Cloud Large-scale columnar analytics

Choose MotherDuck when you want DuckDB ergonomics that scale from a laptop to the cloud; the DuckDB and ClickHouse servers cover purely-embedded and large-scale-server analytics respectively.

Installation

Claude Code

# MotherDuck cloud:
claude mcp add motherduck -e motherduck_token=<your-token> -- uvx mcp-server-motherduck --db-path md:

# Local DuckDB file (read-only by default):
claude mcp add duckdb -- uvx mcp-server-motherduck --db-path /path/to/data.duckdb

Claude Desktop

{
  "mcpServers": {
    "motherduck": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", "md:"],
      "env": {
        "motherduck_token": "<your-token>"
      }
    }
  }
}

Requirements

  • A MotherDuck token for cloud databases, or a local DuckDB file / :memory:.
  • uv (uvx) and an MCP client (Claude Code or Claude Desktop).

Security

  • The server defaults to read-only; add --read-write only when Claude needs to write.
  • execute_query runs arbitrary SQL — scope the token and the connected database.
  • Treat motherduck_token as a secret.

Source Verification Notes

Verified on 2026-06-17:

  • The official repository github.com/motherduckdb/mcp-server-motherduck (MIT) documents uvx mcp-server-motherduck, the --db-path/--read-write/--allow-switch-databases flags, stdio and HTTP transports, the motherduck_token requirement, and the five tools above.
  • MotherDuck's and DuckDB's documentation describe the underlying SQL engine.
  • Claude Code's MCP documentation describes the connector setup pattern used here.

Source citations

Add this badge to your README

Show that MotherDuck MCP Server for Claude is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/mcp/motherduck-mcp-server.svg)](https://heyclau.de/entry/mcp/motherduck-mcp-server)

How it compares

MotherDuck MCP Server for Claude side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

FieldMotherDuck MCP Server for Claude

Connect Claude to MotherDuck and DuckDB — run SQL queries and explore databases, tables, and columns — with the official MotherDuck Model Context Protocol server.

Open dossier
DuckDB MCP Server

MCP server for querying a local DuckDB database file from Claude through a single SQL query tool, with optional DuckDB-native read-only mode.

Open dossier
Elasticsearch MCP Server for Claude

Connect Claude to your Elasticsearch cluster — search indices, inspect mappings, run ES|QL, and check shard health — with Elastic's official Model Context Protocol server.

Open dossier
Weights & Biases MCP Server for Claude

Connect Claude to Weights & Biases — query runs, metrics, and experiments, analyze Weave traces, inspect registries and artifacts, and create reports — with the official W&B MCP server.

Open dossier
Trust
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Categorymcpmcpmcpmcp
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorMotherDuckktanaka101ElasticWeights & Biases
Added2026-06-172026-06-062026-06-172026-06-17
Platforms
Claude CodeCodexCursorClaude Desktop
Claude CodeClaude Desktop
Claude CodeClaude Desktop
Claude CodeClaude Desktop
Source repo
Safety notesThe server is read-only by default; --read-write enables writes, and --allow-switch-databases enables switching — enable only when needed. execute_query runs arbitrary SQL against the connected database; scope the token and database accordingly.The server exposes a single `query` tool that can execute any valid DuckDB SQL statement against the configured database. Without `--readonly`, the server can create the database file, create tables, insert data, update rows, delete rows, and mutate database state. With `--readonly`, the server opens DuckDB with native read-only protection and fails to start if the database file or parent directory is missing. The `--keep-connection` option can hold a persistent DuckDB connection and file lock for the server lifetime. Treat SQL generated by a model as executable code; review queries before running them on important data.Search, ES|QL, and shard tools run live read queries against the configured cluster; a broad or expensive query can add load. Scope the Elasticsearch API key to least privilege (read-only on the indices Claude should see) before connecting.Tools read your W&B runs, traces, and artifacts and can create reports; scope the API key to the projects Claude should access. Logging analysis back to W&B writes to your workspace — review before running it through Claude.
Privacy notesQuery results and schema metadata enter the MCP client context and the model's prompt. The motherduck_token is a secret — keep it in the client config or environment, never in shared repositories.Tool calls and results can expose database paths, table names, schemas, query text, row values, file paths referenced by SQL, and analytical results to the MCP client and model provider. DuckDB can query local files and extensions depending on SQL, configuration, and installed capabilities; keep the server scoped to approved data directories. Do not point writable sessions at production, customer, regulated, or irreplaceable DuckDB files without backups and explicit approval. Query errors can reveal schema names, file paths, and data-shape details.Index data, field mappings, and query results enter the MCP client context and the model's prompt. ES_URL and ES_API_KEY are secrets — store them in the client config or environment, never in shared repositories.Run metrics, experiment configs, Weave traces, and artifact metadata enter the MCP client context and the model's prompt. The WANDB_API_KEY is a secret — keep it in the client config or environment, never in shared repositories.
Prerequisites
  • A MotherDuck account and token (motherduck_token) for cloud databases, or a local DuckDB file / :memory:.
  • uv (uvx) to run mcp-server-motherduck.
  • An MCP client such as Claude Code or Claude Desktop.
  • Python and `uvx` available to the MCP client runtime.
  • Existing DuckDB database file when using `--readonly`.
  • Path to a DuckDB database file that Claude is allowed to query.
  • Decision on whether the server should run in read-only mode before connecting it to an agent.
  • Docker installed (the server is distributed as the docker.elastic.co/mcp/elasticsearch image).
  • An Elasticsearch cluster URL (ES_URL) you can reach.
  • An Elasticsearch API key (ES_API_KEY) or username/password (ES_USERNAME + ES_PASSWORD).
  • An MCP client such as Claude Code or Claude Desktop.
  • A Weights & Biases account and API key (WANDB_API_KEY).
  • For the local server: uv (uvx). For the hosted server: no install, use https://mcp.withwandb.com/mcp.
  • An MCP client such as Claude Code or Claude Desktop.
Install
claude mcp add motherduck -e motherduck_token=<your-token> -- uvx mcp-server-motherduck --db-path md:
uvx mcp-server-duckdb --db-path ./data.duckdb --readonly
claude mcp add elasticsearch -- docker run -i --rm -e ES_URL=<your-cluster-url> -e ES_API_KEY=<your-api-key> docker.elastic.co/mcp/elasticsearch stdio
claude mcp add --transport http wandb https://mcp.withwandb.com/mcp --header "Authorization: Bearer <your-api-key>"
Config
{
  "mcpServers": {
    "motherduck": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", "md:"],
      "env": {
        "motherduck_token": "<your-token>"
      }
    }
  }
}
{
  "mcpServers": {
    "duckdb": {
      "command": "uvx",
      "args": ["mcp-server-duckdb", "--db-path", "./data.duckdb", "--readonly"]
    }
  }
}
{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "ES_URL", "-e", "ES_API_KEY",
        "docker.elastic.co/mcp/elasticsearch", "stdio"
      ],
      "env": {
        "ES_URL": "<elasticsearch-cluster-url>",
        "ES_API_KEY": "<elasticsearch-api-key>"
      }
    }
  }
}
{
  "mcpServers": {
    "wandb": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/wandb/wandb-mcp-server", "wandb_mcp_server"],
      "env": {
        "WANDB_API_KEY": "<your-api-key>"
      }
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.