MotherDuck

MotherDuck is an MCP server that connects AI assistants and development environments to local DuckDB instances, in-memory databases, S3-hosted DuckDB files, and MotherDuck cloud data warehouses. Designed for data analysts, data engineers, and developers, this server enables AI models to interact directly with analytical datasets using standard DuckDB SQL dialect. Users can execute analytical SQL queries for both read and optional write operations, inspect database catalogs, explore schemas, and list table definitions or column types. The server allows switching across multiple database connections on the fly, enabling users to bridge local data exploration with cloud-scale analytics in MotherDuck. Output size controls such as row limits and character caps ensure that data returned to the language model stays within prompt token budgets. By exposing database introspection tools, it allows assistants to autonomously construct queries based on accurate schema definitions, ingest or export local file formats, and run complex aggregations across persistent files or transient in-memory tables.

Category: Data & Analytics

Tags: analytics, data-warehousing, duckdb, motherduck, SQL

Visit MotherDuck

How to install and configure MotherDuck

  1. Ensure uv is installed on your system using pip install uv or brew install uv. 2. In Claude Desktop, open Settings > Developer > Edit Config to edit your configuration JSON file. 3. Add the server entry using uvx mcp-server-motherduck. For an in-memory DuckDB instance with read-write access, use: json { "mcpServers": { "duckdb": { "command": "uvx", "args": ["mcp-server-motherduck", "--db-path", ":memory:", "--read-write", "--allow-switch-databases"] } } } 4. To connect to MotherDuck cloud storage, pass --db-path md: in the args array, specify --read-write, and set the motherduck_token environment variable inside the env object. 5. If using Claude Code CLI, add the server directly by running: claude mcp add --scope user duckdb --transport stdio -- uvx mcp-server-motherduck --db-path :memory: --read-write --allow-switch-databases

What you can do with MotherDuck

  • Querying local DuckDB databases: Run complex analytical SQL queries directly against local .duckdb files in read-only mode to prevent file locking during concurrent analytical workloads. - Developing with transient in-memory datasets: Spin up temporary in-memory DuckDB instances to test SQL queries, create transient staging tables, and validate transformations via AI prompts. - Cloud data warehousing with MotherDuck: Execute cloud analytics across distributed datasets by connecting to MotherDuck databases using authentication tokens and inspecting remote catalogs. - Catalog and schema exploration: Allow AI assistants to examine schemas, discover tables, and check column data types before generating accurate SQL queries. - Querying remote S3 data files: Connect directly to remote DuckDB files stored in Amazon S3 buckets to run analytical queries without manual local downloads.

Key facts

  • https://github.com/motherduckdb/mcp-server-motherduck
  • Data & Analytics, Databases & Data Stores
  • analytics, data-warehousing, duckdb, motherduck, SQL

Part of MCP Servers

Related MCP servers

  • MCP KQL Server — MCP KQL Server is an MCP server that connects AI assistants to Azure Data Explorer clusters using Azure CLI authentication.…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP Memory Keeper — MCP Memory Keeper is an MCP server that provides persistent context management and memory storage for Claude AI coding assistants.…
  • MCP Notes — MCP Notes is an MCP server that provides note-taking and note-management capabilities to AI models using Amazon Web Services DynamoDB…
  • MCP Neo4j Server — MCP Neo4j Server is an MCP server that provides an integration between the Neo4j graph database and Model Context Protocol…
  • MCP Mempool — MCP Mempool is an MCP server that exposes the mempool.space WebSocket and REST APIs to AI agents, LLM assistants, and…

How do I install MotherDuck?

You can run MotherDuck MCP without manual cloning using the uv package manager. First, install uv with brew or pip. Then, configure your MCP client such as Claude Desktop, Cursor, or VS Code by pointing the command to uvx mcp-server-motherduck. Pass parameters like db-path to select between in-memory DuckDB, a local file path, or MotherDuck cloud databases.

What can MotherDuck do?

The server provides tools to execute DuckDB SQL queries, list available databases, inspect database schemas, and list table columns. It supports running analytical queries on local DuckDB files, in-memory databases, S3 buckets, and MotherDuck cloud warehouses. Additionally, when enabled, it provides tools to switch active database connections dynamically during conversational AI sessions.

Which MCP clients work with MotherDuck?

The server works with any MCP-compliant client. Supported clients documented by the project include Claude Desktop, Claude Code CLI, Cursor, VS Code, Codex CLI, Gemini CLI, and Kiro. You can configure it either via standard JSON configuration files or using dedicated CLI integration commands provided by tools like Claude Code and Gemini CLI.

How do I connect MotherDuck to the cloud?

To connect directly to the MotherDuck cloud service, set the database path parameter to md: using the db-path md: flag. You must also supply your MotherDuck authentication token through the motherduck_token environment variable in your MCP client configuration, along with the read-write flag for standard tokens.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories