MotherDuck MCP Server
MotherDuck MCP Server connects AI agents and IDEs with DuckDB and MotherDuck for seamless, serverless SQL analytics and hybrid data workflows in FlowHunt.

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.
List of Resources
- Close the Loop: Faster Data Pipelines with MCP, DuckDB & AI (Blogpost): Blog post covering the integration of MCP, DuckDB, and AI for rapid data pipeline development.
- Faster Data Pipelines development with MCP and DuckDB (YouTube): Video resource demonstrating the use of MCP and DuckDB for data pipelines.
List of Tools
- query: Executes a SQL query on either the DuckDB or MotherDuck database.
- Inputs:
query
(string, required): The SQL statement to execute.
- Inputs:
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
Ensure you have Node.js and Windsurf installed.
Open your Windsurf configuration file (commonly
windsurf.config.json
).Add the MotherDuck MCP Server to the
mcpServers
section:{ "mcpServers": { "motherduck": { "command": "uvx", "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"] } } }
Save the configuration and restart Windsurf.
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
Install Claude and ensure Node.js is set up.
Locate the Claude configuration file (typically
claude.config.json
).Add the following to your
mcpServers
:{ "mcpServers": { "motherduck": { "command": "uvx", "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"] } } }
Restart Claude and confirm that the server appears in the UI.
Use environment variables as shown above to secure API keys.
Cursor
Ensure you have Cursor installed and updated.
Open the Cursor settings (
cursor.config.json
).Insert the following under
mcpServers
:{ "mcpServers": { "motherduck": { "command": "uvx", "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"] } } }
Save and restart Cursor.
Set sensitive tokens via environment variables.
Cline
Install Cline and required dependencies.
Edit
cline.config.json
to include:{ "mcpServers": { "motherduck": { "command": "uvx", "args": ["mcp-server-motherduck", "--transport", "stream", "--db-path", "md:"] } } }
Save the config and restart Cline.
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:

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
Section | Availability | Details/Notes |
---|---|---|
Overview | ✅ | Found in README.md |
List of Prompts | ✅ | duckdb-motherduck-initial-prompt |
List of Resources | ✅ | Two resources (blog post, YouTube video) listed in README.md |
List of Tools | ✅ | query tool |
Securing API Keys | ✅ | Uses 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 Forks | 23 |
Number of Stars | 205 |
Frequently asked questions
- What is the MotherDuck MCP Server?
The MotherDuck MCP Server is an implementation of the Model Context Protocol (MCP) that connects AI assistants and IDEs to DuckDB and MotherDuck databases. It provides a standardized way to run SQL analytics, manage data, and develop data pipelines using both local and cloud storage—all without manual server management.
- What are the main use cases for this MCP server?
MotherDuck MCP Server enables AI assistants and developers to perform SQL analytics, build data pipelines, and access hybrid local/cloud data sources. It supports use cases like serverless data exploration, cloud storage integration (e.g., Amazon S3), and rapid analytics without infrastructure setup.
- How do I secure my MotherDuck API tokens?
You should use environment variables to securely provide your MotherDuck tokens. Set the `motherduck_token` in your configuration as an environment variable (e.g., `${MOTHERDUCK_TOKEN}`) rather than hardcoding credentials.
- Can I use the MotherDuck MCP Server with FlowHunt?
Yes! FlowHunt supports MCP servers. Simply add the MCP component to your flow, configure it with your MotherDuck MCP server details, and your AI agent will be able to interact with DuckDB and MotherDuck databases directly.
- What tools does this server expose?
The main tool exposed is `query`, which allows execution of SQL queries on DuckDB or MotherDuck databases from your AI agent or IDE.
- Where can I learn more?
Check out the [MotherDuck blog post](https://motherduck.com/blog/faster-data-pipelines-with-mcp-duckdb-ai/) and [YouTube video](https://www.youtube.com/watch?v=yG1mv8ZRxcU) for deep dives into MCP, DuckDB, and AI-powered data workflows.
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.