MCP Directory

How to add MotherDuck / DuckDB MCP Server to Claude Desktop

Query local DuckDB files, in-memory DBs, S3, or MotherDuck cloud with read/write SQL. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 15, 2026 ยท 800โ˜… ยท stdio ยท apikey ยท official

Claude Desktop config for MotherDuck / DuckDB MCP Server

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

Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the MotherDuck / DuckDB MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm MotherDuck / DuckDB MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • Python with the `uv`/`uvx` package manager installed (`pip install uv` or `brew install uv`)
  • A DuckDB target: nothing for `:memory:`, a path to a local `.duckdb` file, an S3 URL, or `md:` for MotherDuck
  • For MotherDuck connections: a MotherDuck access token from your MotherDuck account (app.motherduck.com), set as `MOTHERDUCK_TOKEN`
  • For S3 access: AWS credentials (access key / secret key, optional session token and region)

What MotherDuck / DuckDB MCP Server can do in Claude Desktop

execute_query

Run a SQL query in the DuckDB dialect against the active database (read-only unless --read-write is set)

list_databases

Enumerate all attached/available databases

list_tables

List tables and views, optionally scoped to a database/schema

list_columns

Show the columns of a given table or view

switch_database_connection

Change the active database connection at runtime (requires --allow-switch-databases)

Security

The server is read-only by default; only add --read-write when the agent genuinely needs to mutate data. The motherduck_token grants access to your cloud data, so keep it in env vars rather than command-line args.

MotherDuck / DuckDB MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the MotherDuck / DuckDB MCP Server config there under the "mcpServers" key and restart the client.

Is MotherDuck / DuckDB MCP Server safe to use with Claude Desktop?

The server is read-only by default; only add --read-write when the agent genuinely needs to mutate data. The motherduck_token grants access to your cloud data, so keep it in env vars rather than command-line args.

Is it read-only by default?

Yes. The server runs in read-only mode unless you explicitly pass the `--read-write` flag, which then permits INSERT/UPDATE/DDL and other write operations.

How do I connect to MotherDuck instead of a local file?

Set `--db-path md:` and provide a `MOTHERDUCK_TOKEN` (env var or `--motherduck-token`). You can get the token from your MotherDuck account settings.

Can it query files in S3?

Yes. Point `--db-path` at an S3 URL (or attach one in SQL) and supply AWS credentials; DuckDB reads Parquet/CSV/JSON directly from the bucket.

View repo Full MotherDuck / DuckDB MCP Server page