MotherDuck MCP Server

AI Database MCP Server Cloud Analytics

Contact us to host your MCP Server in FlowHunt

FlowHunt provides an additional security layer between your internal systems and AI tools, giving you granular control over which tools are accessible from your MCP servers. MCP servers hosted in our infrastructure can be seamlessly integrated with FlowHunt's chatbot as well as popular AI platforms like ChatGPT, Claude, and various AI editors.

What does “MotherDuck” MCP Server do?

MotherDuck MCP Server is an implementation of the Model Context Protocol (MCP) that bridges AI assistants and IDEs with DuckDB and MotherDuck databases. It enables users to perform powerful SQL analytics by providing a standardized interface for querying both local DuckDB files and cloud-based MotherDuck databases. The server supports hybrid execution, allowing seamless data access from both local and cloud storage, including Amazon S3 via MotherDuck’s integrations. By exposing database interaction as a tool to AI systems, it makes it easy for developers and AI agents to perform database queries, manage data, and streamline data workflows without manual configuration or server management. This serverless approach accelerates analytics, data sharing, and data pipeline development directly from AI-powered environments.

List of Prompts

  • duckdb-motherduck-initial-prompt: A prompt template to initialize a connection to DuckDB or MotherDuck and start working with the database.
Logo

Ready to grow your business?

Start your free trial today and see results within days.

List of Resources

List of Tools

  • query: Executes a SQL query on either the DuckDB or MotherDuck database.
    • Inputs:
      • query (string, required): The SQL statement to execute.

Use Cases of this MCP Server

  • SQL Analytics in AI Assistants: Enables LLMs or coding assistants to run SQL queries directly against DuckDB or MotherDuck, turning natural language instructions into actionable analytics.
  • Data Pipeline Development: Facilitates faster development and prototyping of data pipelines by allowing AI systems to interact with both local and cloud data sources.
  • Hybrid Local & Cloud Querying: Supports scenarios where developers need to query both on-premises (DuckDB) and cloud (MotherDuck) data seamlessly, increasing workflow flexibility.
  • Cloud Storage Integration: AI agents can access and analyze data stored in Amazon S3 or other integrated cloud storage via MotherDuck connections.
  • Serverless Data Exploration: Eliminates the need to manage compute infrastructure, enabling rapid, on-demand analytics for users and AI systems.

How to set it up

Windsurf

  1. Ensure you have Node.js and Windsurf installed.

  2. Open your Windsurf configuration file (commonly windsurf.config.json).

  3. Add the MotherDuck MCP Server to the mcpServers section:

    {
      "mcpServers": {
        "motherduck": {
          "command": "uvx",
          "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"]
        }
      }
    }
    
  4. Save the configuration and restart Windsurf.

  5. Verify in Windsurf that the MotherDuck MCP Server is running and accessible.

Securing API Keys

Use environment variables to provide sensitive credentials like your MotherDuck token:

{
  "mcpServers": {
    "motherduck": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"],
      "env": {
        "motherduck_token": "${MOTHERDUCK_TOKEN}"
      }
    }
  }
}

Claude

  1. Install Claude and ensure Node.js is set up.

  2. Locate the Claude configuration file (typically claude.config.json).

  3. Add the following to your mcpServers:

    {
      "mcpServers": {
        "motherduck": {
          "command": "uvx",
          "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"]
        }
      }
    }
    
  4. Restart Claude and confirm that the server appears in the UI.

  5. Use environment variables as shown above to secure API keys.

Cursor

  1. Ensure you have Cursor installed and updated.

  2. Open the Cursor settings (cursor.config.json).

  3. Insert the following under mcpServers:

    {
      "mcpServers": {
        "motherduck": {
          "command": "uvx",
          "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"]
        }
      }
    }
    
  4. Save and restart Cursor.

  5. Set sensitive tokens via environment variables.

Cline

  1. Install Cline and required dependencies.

  2. Edit cline.config.json to include:

    {
      "mcpServers": {
        "motherduck": {
          "command": "uvx",
          "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"]
        }
      }
    }
    
  3. Save the config and restart Cline.

  4. Ensure motherduck_token is set as an environment variable for security.

How to use this MCP inside flows

Using MCP in FlowHunt

To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

FlowHunt MCP flow

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:

{
  "motherduck": {
    "transport": "streamable_http",
    "url": "https://yourmcpserver.example/pathtothemcp/url"
  }
}

Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change "motherduck" to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.


Overview

SectionAvailabilityDetails/Notes
OverviewFound in README.md
List of Promptsduckdb-motherduck-initial-prompt
List of ResourcesTwo resources (blog post, YouTube video) listed in README.md
List of Toolsquery tool
Securing API KeysUses motherduck_token as environment variable (README.md)
Sampling Support (less important in evaluation)Not mentioned

Between these two tables, the MotherDuck MCP Server is well-documented with clear prompts, tool support, resources, and security practices, but lacks explicit mention of Roots and Sampling support. Overall, it’s a solid, practical implementation for database analytics with an MCP interface.


MCP Score

Has a LICENSE✅ (MIT)
Has at least one tool
Number of Forks23
Number of Stars205

Frequently asked questions

Try MotherDuck MCP Server in FlowHunt

Accelerate data analytics and streamline your workflows by integrating the MotherDuck MCP Server with FlowHunt. Experience hybrid, serverless SQL at your fingertips.

Learn more

MotherDuck MCP Integration
MotherDuck MCP Integration

MotherDuck MCP Integration

Integrate FlowHunt with MotherDuck’s DuckDB MCP Server to enable secure, scalable, and serverless SQL analytics for your AI assistants and IDEs. Effortlessly co...

4 min read
AI MotherDuck +6
MCP Database Server
MCP Database Server

MCP Database Server

The MCP Database Server enables secure, programmatic access to popular databases like SQLite, SQL Server, PostgreSQL, and MySQL for AI assistants and automation...

5 min read
AI Database +4
DataHub MCP Server Integration
DataHub MCP Server Integration

DataHub MCP Server Integration

The DataHub MCP Server bridges FlowHunt AI agents with the DataHub metadata platform, enabling advanced data discovery, lineage analysis, automated metadata ret...

4 min read
AI Metadata +6