Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

mcp-server-motherduck

MCP server by motherduckdb Community

mcp-server-motherduck connects AI assistants and IDEs to DuckDB and MotherDuck so they can run SQL queries and browse database catalogs. It supports local DuckDB files, in-memory databases, S3-hosted databases and MotherDuck.

  • Score 85
  • 547 stars
  • MIT
  • Updated

Install mcp-server-motherduck

Built from the published package, never by AI.

claude mcp add mcp-server-motherduck -- uvx mcp-server-motherduck

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install mcp-server-motherduck in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mcp-server-motherduck block.

About

mcp-server-motherduck is a local MCP server from MotherDuck that lets AI assistants work with DuckDB databases through SQL. It can connect to local DuckDB files, in-memory databases, S3-hosted databases and MotherDuck. The assistant can run read and write SQL queries, browse catalogs of tables, views and columns, and switch between database connections at runtime when that option is enabled.

The server runs locally or on your own infrastructure and is started with uvx from a client's MCP config. Read-only mode is the default, and write access needs the --read-write flag. The source says it is for people who want an assistant to query and manage their DuckDB or MotherDuck data from a client such as Claude Desktop, Claude Code, Cursor or VS Code. For a fully hosted option, the source points to MotherDuck's Remote MCP service.

Written from the project's README and checked against it.

Tools it gives your assistant

  • execute_queryExecutes a SQL query using the DuckDB dialect.
  • list_databasesLists all databases, useful for MotherDuck or multiple attached databases.
  • list_tablesLists tables and views, optionally filtered by database or schema.
  • list_columnsLists the columns of a table or view, optionally filtered by database or schema.
  • switch_database_connectionSwitches to a different database. Requires the --allow-switch-databases flag.

What you need

  • uv installed through pip or Homebrew
  • MotherDuck access token for MotherDuck connections
  • AWS credentials for S3 database connections
  • Docker, optional, for the container build
SettingNeededWhat it is
motherduck_tokenEnvironment variable, secretOptionalAccess token for MotherDuck connections (alternative to --motherduck-token)
MOTHERDUCK_TOKENEnvironment variable, secretOptionalAccess token for MotherDuck connections (alternative to --motherduck-token)
HOMEEnvironment variableOptionalUsed by DuckDB for extensions and config. Override with --home-dir if not set.
AWS_ACCESS_KEY_IDEnvironment variable, secretOptionalAWS access key for S3 database connections
AWS_SECRET_ACCESS_KEYEnvironment variable, secretOptionalAWS secret access key for S3 database connections
AWS_SESSION_TOKENEnvironment variable, secretOptionalAWS session token for temporary credentials
AWS_DEFAULT_REGIONEnvironment variableOptionalAWS region for S3 database connections
AWS_ENDPOINTEnvironment variableOptionalAWS endpoint for S3 database connections

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Run a SQL query against my local DuckDB file and summarize the results
  • List the tables and columns in my MotherDuck database
  • Switch to the S3-hosted DuckDB database and list its tables

Good to know

  • Read-only mode alone is not enough for third-party access to a self-hosted server.
  • Results are limited to 1024 rows and 50,000 characters by default.
  • The switch_database_connection tool is only available with the --allow-switch-databases flag.
  • Local files can be locked if the server is connected in read-write mode, unless --ephemeral-connections is on.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to mcp-server-motherduck

All alternatives →
Supabase supabase
97

Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.

AAA Local and remote 172k/wk
ArcadeDB MCP Server ArcadeData
94

ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.

AAA Local 1.3k
DBHubbytebase
94

Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.

AAA Local 343k/wk
MCP Toolbox for Databasesgoogleapis
94

MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.

AAA Local 17k
MCP Toolbox for Databasesgoogleapis
94

Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.

AAA Local 17k
mongodb-mcp-servermongodb-js
94

MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.

AAA Local 203k/wk

Compare with Supabase, ArcadeDB MCP Server or DBHub

mcp-server-motherduck: common questions

Can I use mcp-server-motherduck with MotherDuck?

Yes. Start the server with --db-path md: and pass a MotherDuck token through the motherduck_token environment variable or the --motherduck-token flag.

Is it safe to give other people access to this server?

The source says read-only mode alone is not sufficient for third-party access because it still allows local filesystem access and changes to DuckDB settings. It recommends MotherDuck Remote MCP or a self-hosted setup with a service account, read-scaling tokens and SaaS mode.

Can it query data stored on S3?

Yes. You can point --db-path at an s3:// URL and set AWS environment variables such as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for authentication.

How do I install mcp-server-motherduck?

In Claude Code run claude mcp add mcp-server-motherduck -- uvx mcp-server-motherduck. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is mcp-server-motherduck the official server?

mcp-server-motherduck is a community project by motherduckdb, not verified by a company domain.

Is mcp-server-motherduck free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is mcp-server-motherduck safe to use?

It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to mcp-server-motherduck?

Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.

Does mcp-server-motherduck work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

mcp-server-motherduck Install

Add to stack

Loading.