MCP server · Data + databases

OfficialSource ValidatedLocal executionMITUpdated August 2026

DuckDB / MotherDuck MCP

Query local DuckDB files or MotherDuck through MCP, with read-only defaults and optional write-enabled SQL.

Quick verdict

It pairs DuckDB's low-friction embedded analytics with a small official tool set, needs no cloud credentials for local files, and can reach MotherDuck later without changing servers.

  • MaintainerMotherDuck (official)
  • Security scopeLocal execution
  • Transportsstdio, streamable-http
  • Install channelpypi · mcp-server-motherduck
  • EvidenceSource Validated
  • LicenseMIT · Open source

MotherDuck's official server for browsing catalogs and running DuckDB SQL across in-memory databases, local files, S3 objects and MotherDuck itself. One canonical open-source implementation covers both names; the configuration published here opens a single local DuckDB file in the upstream's default read-only mode. Write access and database switching exist but must be turned on explicitly.

MCP security best practices

Install DuckDB / MotherDuck MCP

uvx mcp-server-motherduck --db-path

Config entry (mcpServers)
{
  "mcpServers": {
    "duckdb": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", "<ABSOLUTE_PATH_TO_DATABASE>"]
    }
  }
}

Runs with uvx (uv); the CLI names its HTTP transport `http`. The published configuration deliberately omits --read-write and --allow-switch-databases. A self-hosted HTTP container is also documented upstream.

Credentials

NameRequiredWhat it is for
motherduck_tokenOptionalMotherDuck token, needed only for md: connections. The local DuckDB configuration published here does not use it.
AWS_ACCESS_KEY_IDOptionalOptional AWS access key for S3-backed databases.
AWS_SECRET_ACCESS_KEYOptionalOptional AWS secret key for S3-backed databases.
AWS_SESSION_TOKENOptionalOptional session token for temporary AWS credentials.

Verified configurations

Not run by us yet. This profile is Source Validated: the install channel, config entry, credentials and license were checked against the source and upstream metadata, but no configuration has been installed, discovered and executed in a recorded environment. When one is, it appears here with the eight scope dimensions below.

Best for

Local analytics and data-engineering work where an agent needs SQL over a controlled DuckDB file without standing up a database server.

Why use it

It pairs DuckDB's low-friction embedded analytics with a small official tool set, needs no cloud credentials for local files, and can reach MotherDuck later without changing servers.

Tradeoffs

This is local SQL execution, not a read-only API, and upstream states plainly that read-only mode is not a complete sandbox — it does not prevent local filesystem access or DuckDB setting changes. That is why the security scope here is local-execution rather than read-only. Enabling --read-write or --allow-switch-databases widens the blast radius considerably, and S3 or MotherDuck modes add credentials and cost. Point it at one controlled database file.

Upstream state

pypi package published · repository active · in the official MCP Registry (active). Lifecycle is derived from a committed upstream snapshot at build time, never authored by hand.

Official MCP Registry name: io.github.motherduckdb/mcp-server-motherduck

Editorial review

Reviewed byOpenSourcesAI EditorialLast updatedAugust 2026SourcesOfficial DuckDB / MotherDuck MCP repository — quick start, parameters, production-security guidance; MotherDuck MCP licence; PyPI: mcp-server-motherduck

Grade B — Source Validated. Re-review is due by 2027-02-15. Config entries, credential names and package status can change upstream; verify against the source repository before granting an agent access.

Sources

Related guides

All MCP servers →