Skip to directory

DuckDB / MotherDuck Local MCP

MotherDuck

stdio and Streamable HTTP5 documented tools11

About DuckDB / MotherDuck Local MCP

Local MCP server for running DuckDB SQL against in-memory or local databases, S3-hosted databases, and MotherDuck.

What you can use it for

  • Run DuckDB SQL
  • Inspect databases, tables and columns
  • Connect to local, S3, or MotherDuck databases
Connection and setup
Hosting
local or self-hosted HTTP
Transport
stdio and Streamable HTTP
Endpoint
Local process; no hosted endpoint documented
Authentication
MotherDuck connections require a MotherDuck token via motherduck_token or MOTHERDUCK_TOKEN. Local DuckDB can run without this token.

Requirements

  • uv/uvx for documented quickstart
  • MotherDuck token for MotherDuck databases; optional AWS credentials for S3

Setup steps

  1. Install uv, then configure command uvx with args [mcp-server-motherduck, --db-path, <database-path>].
  2. Read-only is default; add --read-write only when write access is intended.
  3. For MotherDuck use --db-path md: and env motherduck_token=<YOUR_MOTHERDUCK_TOKEN>.
  4. For Docker HTTP, build image, publish port 8000, and use http://localhost:8000/mcp.
Tools 5

The repository README lists five tools. switch_database_connection is conditional on --allow-switch-databases; default operation is read-only.

  • execute_query

    See official README. switch_database_connection requires --allow-switch-databases.

    01
  • list_databases

    See official README. switch_database_connection requires --allow-switch-databases.

    02
  • list_tables

    See official README. switch_database_connection requires --allow-switch-databases.

    03
  • list_columns

    See official README. switch_database_connection requires --allow-switch-databases.

    04
  • switch_database_connection

    See official README. switch_database_connection requires --allow-switch-databases.

    05
Limitations and notes
  • Read-only by default.
  • Read-only mode alone is not sufficient isolation for untrusted third-party access; README recommends security settings.
  • Tool results have documented row and character limits.
Original sources
  • official repository readme

    Current maintainer README lists five tools, notes switch_database_connection requires --allow-switch-databases, documents stdio/HTTP setup and read-only default.

Documentation checked 2026-10-28T13:31:11.000Z. Connection has not been runtime tested.