
mcp-server-motherduck
MCP server for DuckDB and MotherDuck
Stars: 321

The mcp-server-motherduck repository is a server-side application that provides a centralized platform for managing and monitoring multiple Minecraft servers. It allows server administrators to easily control various aspects of their Minecraft servers, such as player management, world backups, and server performance monitoring. The application is designed to streamline server management tasks and enhance the overall gaming experience for both server administrators and players.
README:
An MCP server implementation that interacts with DuckDB and MotherDuck databases, providing SQL analytics capabilities to AI Assistants and IDEs.
- Close the Loop: Faster Data Pipelines with MCP, DuckDB & AI (Blogpost)
- Faster Data Pipelines development with MCP and DuckDB (YouTube)
- Hybrid execution: query data from local DuckDB or/and cloud-based MotherDuck databases
- Cloud storage integration: access data stored in Amazon S3 or other cloud storage thanks to MotherDuck's integrations
- Data sharing: create and share databases
- SQL analytics: use DuckDB's SQL dialect to query any size of data directly from your AI Assistant or IDE
- Serverless architecture: run analytics without needing to configure instances or clusters
The server provides one prompt:
-
duckdb-motherduck-initial-prompt
: A prompt to initialize a connection to DuckDB or MotherDuck and start working with it
The server offers one tool:
-
query
: Execute a SQL query on the DuckDB or MotherDuck database-
Inputs:
-
query
(string, required): The SQL query to execute
-
-
Inputs:
All interactions with both DuckDB and MotherDuck are done through writing SQL queries.
The MCP server supports the following parameters:
Parameter | Type | Default | Description |
---|---|---|---|
--transport |
Choice | stdio |
Transport type. Options: stdio , sse , stream
|
--port |
Integer | 8000 |
Port to listen on for sse and stream transport mode |
--db-path |
String | md: |
Path to local DuckDB database file or MotherDuck database |
--motherduck-token |
String | None |
Access token to use for MotherDuck database connections (uses motherduck_token env var by default) |
--read-only |
Flag | False |
Flag for connecting to DuckDB or MotherDuck in read-only mode. For DuckDB it uses short-lived connections to enable concurrent access |
--home-dir |
String | None |
Home directory for DuckDB (uses HOME env var by default) |
--saas-mode |
Flag | False |
Flag for connecting to MotherDuck in SaaS mode. (disables filesystem and write permissions for local DuckDB) |
--json-response |
Flag | False |
Enable JSON responses for HTTP stream. Only supported for stream transport |
# Connect to local DuckDB file in read-only mode with stream transport mode
uvx mcp-server-motherduck --transport stream --db-path /path/to/local.db --read-only
# Connect to MotherDuck with token with stream transport mode
uvx mcp-server-motherduck --transport stream --db-path md: --motherduck-token YOUR_TOKEN
# Connect to local DuckDB file in read-only mode with stream transport mode
uvx mcp-server-motherduck --transport stream --db-path /path/to/local.db --read-only
# Connect to MotherDuck in SaaS mode for enhanced security with stream transport mode
uvx mcp-server-motherduck --transport stream --db-path md: --motherduck-token YOUR_TOKEN --saas-mode
-
uv
installed, you can install it usingpip install uv
orbrew install uv
If you plan to use the MCP with Claude Desktop or any other MCP comptabile client, the client need to be installed.
- No prerequisites. The MCP server can create an in-memory database on-the-fly
- Or connect to an existing local DuckDB database file , or one stored on remote object storage (e.g., AWS S3).
- Sign up for a MotherDuck account
- Generate an access token via the MotherDuck UI
- Store the token securely for use in the configuration
-
Install Cursor from cursor.com/downloads if you haven't already
-
Open Cursor:
- To set it up globally for the first time, go to Settings->MCP and click on "+ Add new global MCP server".
- This will open a
mcp.json
file to which you add the following configuration:
{
"mcpServers": {
"mcp-server-motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"md:",
"--motherduck-token",
"<YOUR_MOTHERDUCK_TOKEN_HERE>"
]
}
}
}
For the quickest installation, click one of the "Install with UV" buttons at the top.
Add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open User Settings (JSON)
.
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "motherduck_token",
"description": "MotherDuck Token",
"password": true
}
],
"servers": {
"motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"md:",
"--motherduck-token",
"${input:motherduck_token}"
]
}
}
}
}
Optionally, you can add it to a file called .vscode/mcp.json
in your workspace. This will allow you to share the configuration with others.
{
"inputs": [
{
"type": "promptString",
"id": "motherduck_token",
"description": "MotherDuck Token",
"password": true
}
],
"servers": {
"motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"md:",
"--motherduck-token",
"${input:motherduck_token}"
]
}
}
}
-
Install Claude Desktop from claude.ai/download if you haven't already
-
Open the Claude Desktop configuration file:
- To quickly access it or create it the first time, open the Claude Desktop app, select Settings, and click on the "Developer" tab, finally click on the "Edit Config" button.
- Add the following configuration to your
claude_desktop_config.json
:
{
"mcpServers": {
"mcp-server-motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"md:",
"--motherduck-token",
"<YOUR_MOTHERDUCK_TOKEN_HERE>"
]
}
}
}
Important Notes:
- Replace
YOUR_MOTHERDUCK_TOKEN_HERE
with your actual MotherDuck token
Claude Code supports MCP servers through CLI commands or JSON configuration. Here are two ways to set it up:
Add the MotherDuck MCP server directly using the Claude Code CLI:
claude mcp add mcp-server-motherduck uvx mcp-server-motherduck -- --db-path md: --motherduck-token <YOUR_MOTHERDUCK_TOKEN_HERE>
Add the server using a JSON configuration:
claude mcp add-json mcp-server-motherduck '{
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"md:",
"--motherduck-token",
"<YOUR_MOTHERDUCK_TOKEN_HERE>"
]
}'
Scoping Options:
- Use
--local
(default) for project-specific configuration - Use
--project
to share the configuration with your team via.mcp.json
- Use
--user
to make the server available across all your projects
Important Notes:
- Replace
YOUR_MOTHERDUCK_TOKEN_HERE
with your actual MotherDuck token - Claude Code also supports environment variable expansion, so you can use
${MOTHERDUCK_TOKEN}
if you've set the environment variable
If the MCP server is exposed to third parties and should only have read access to data, we recommend using a read scaling token and running the MCP server in SaaS mode.
Read Scaling Tokens are special access tokens that enable scalable read operations by allowing up to 4 concurrent read replicas, improving performance for multiple end users while restricting write capabilities. Refer to the Read Scaling documentation to learn how to create a read-scaling token.
SaaS Mode in MotherDuck enhances security by restricting it's access to local files, databases, extensions, and configurations, making it ideal for third-party tools that require stricter environment protection. Learn more about it in the SaaS Mode documentation.
Secure Configuration
{
"mcpServers": {
"mcp-server-motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"md:",
"--motherduck-token",
"<YOUR_READ_SCALING_TOKEN_HERE>",
"--saas-mode"
]
}
}
}
To connect to a local DuckDB, instead of using the MotherDuck token, specify the path to your local DuckDB database file or use :memory:
for an in-memory database.
In-memory database:
{
"mcpServers": {
"mcp-server-motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
":memory:"
]
}
}
}
Local DuckDB file:
{
"mcpServers": {
"mcp-server-motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"/path/to/your/local.db"
]
}
}
}
Local DuckDB file in readonly mode:
{
"mcpServers": {
"mcp-server-motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"/path/to/your/local.db",
"--read-only"
]
}
}
}
Note: readonly mode for local file-backed DuckDB connections also makes use of short lived connections. Each time the query MCP tool is used a temporary, reaodnly connection is created + query is executed + connection is closed. This feature was motivated by a workflow where DBT was for modeling data within duckdb and then an MCP client (Windsurf/Cline/Claude/Cursor) was used for exploring the database. The short lived connections allow each tool to run and then release their connection, allowing the next tool to connect.
Once configured, you can e.g. ask Claude to run queries like:
- "Create a new database and table in MotherDuck"
- "Query data from my local CSV file"
- "Join data from my local DuckDB database with a table in MotherDuck"
- "Analyze data stored in Amazon S3"
The server can run in SSE mode in two ways:
Run the server directly in SSE mode using the --transport sse
flag:
uvx mcp-server-motherduck --transport sse --port 8000 --db-path md: --motherduck-token <your_motherduck_token>
This will start the server listening on the specified port (default 8000) and you can point your clients directly to this endpoint.
Alternatively, you can run SSE mode using supergateway
:
npx -y supergateway --stdio "uvx mcp-server-motherduck --db-path md: --motherduck-token <your_motherduck_token>"
Both methods allow you to point your clients such as Claude Desktop, Cursor to the SSE endpoint.
To run the server from a local development environment, use the following configuration:
{
"mcpServers": {
"mcp-server-motherduck": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/local/mcp-server-motherduck",
"run",
"mcp-server-motherduck",
"--db-path",
"md:",
"--motherduck-token",
"<YOUR_MOTHERDUCK_TOKEN_HERE>"
]
}
}
}
- If you encounter connection issues, verify your MotherDuck token is correct
- For local file access problems, ensure the
--home-dir
parameter is set correctly - Check that the
uvx
command is available in your PATH - If you encounter
spawn uvx ENOENT
errors, try specifying the full path touvx
(output ofwhich uvx
) - In version previous for v0.4.0 we used environment variables, now we use parameters
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for mcp-server-motherduck
Similar Open Source Tools

mcp-server-motherduck
The mcp-server-motherduck repository is a server-side application that provides a centralized platform for managing and monitoring multiple Minecraft servers. It allows server administrators to easily control various aspects of their Minecraft servers, such as player management, world backups, and server performance monitoring. The application is designed to streamline server management tasks and enhance the overall gaming experience for both server administrators and players.

docs-mcp-server
The docs-mcp-server repository contains the server-side code for the documentation management system. It provides functionalities for managing, storing, and retrieving documentation files. Users can upload, update, and delete documents through the server. The server also supports user authentication and authorization to ensure secure access to the documentation system. Additionally, the server includes APIs for integrating with other systems and tools, making it a versatile solution for managing documentation in various projects and organizations.

fastapi-admin
智元 Fast API is a one-stop API management system that unifies various LLM APIs in terms of format, standards, and management to achieve the ultimate in functionality, performance, and user experience. It includes features such as model management with intelligent and regex matching, backup model functionality, key management, proxy management, company management, user management, and chat management for both admin and user ends. The project supports cluster deployment, multi-site deployment, and cross-region deployment. It also provides a public API site for registration with a contact to the author for a 10 million quota. The tool offers a comprehensive dashboard, model management, application management, key management, and chat management functionalities for users.

mcp-server-mysql
The MCP Server for MySQL based on NodeJS is a Model Context Protocol server that provides access to MySQL databases. It enables users to inspect database schemas and execute SQL queries. The server offers tools for executing SQL queries, providing comprehensive database information, security features like SQL injection prevention, performance optimizations, monitoring, and debugging capabilities. Users can configure the server using environment variables and advanced options. The server supports multi-DB mode, schema-specific permissions, and includes troubleshooting guidelines for common issues. Contributions are welcome, and the project roadmap includes enhancing query capabilities, security features, performance optimizations, monitoring, and expanding schema information.

hyper-mcp
hyper-mcp is a fast and secure MCP server that enables adding AI capabilities to applications through WebAssembly plugins. It supports writing plugins in various languages, distributing them via standard OCI registries, and running them in resource-constrained environments. The tool offers sandboxing with WASM for limiting access, cross-platform compatibility, and deployment flexibility. Security features include sandboxed plugins, memory-safe execution, secure plugin distribution, and fine-grained access control. Users can configure the tool for global or project-specific use, start the server with different transport options, and utilize available plugins for tasks like time calculations, QR code generation, hash generation, IP retrieval, and webpage fetching.

llms
LLMs is a universal LLM API transformation server designed to standardize requests and responses between different LLM providers such as Anthropic, Gemini, and Deepseek. It uses a modular transformer system to handle provider-specific API formats, supporting real-time streaming responses and converting data into standardized formats. The server transforms requests and responses to and from unified formats, enabling seamless communication between various LLM providers.

verl-tool
The verl-tool is a versatile command-line utility designed to streamline various tasks related to version control and code management. It provides a simple yet powerful interface for managing branches, merging changes, resolving conflicts, and more. With verl-tool, users can easily track changes, collaborate with team members, and ensure code quality throughout the development process. Whether you are a beginner or an experienced developer, verl-tool offers a seamless experience for version control operations.

Memento
Memento is a lightweight and user-friendly version control tool designed for small to medium-sized projects. It provides a simple and intuitive interface for managing project versions and collaborating with team members. With Memento, users can easily track changes, revert to previous versions, and merge different branches. The tool is suitable for developers, designers, content creators, and other professionals who need a streamlined version control solution. Memento simplifies the process of managing project history and ensures that team members are always working on the latest version of the project.

aigne-hub
AIGNE Hub is a unified AI gateway that manages connections to multiple LLM and AIGC providers, eliminating the complexity of handling API keys, usage tracking, and billing across different AI services. It provides self-hosting capabilities, multi-provider management, unified security, usage analytics, flexible billing, and seamless integration with the AIGNE framework. The tool supports various AI providers and deployment scenarios, catering to both enterprise self-hosting and service provider modes. Users can easily deploy and configure AI providers, enable billing, and utilize core capabilities such as chat completions, image generation, embeddings, and RESTful APIs. AIGNE Hub ensures secure access, encrypted API key management, user permissions, and audit logging. Built with modern technologies like AIGNE Framework, Node.js, TypeScript, React, SQLite, and Blocklet for cloud-native deployment.

ai-manus
AI Manus is a general-purpose AI Agent system that supports running various tools and operations in a sandbox environment. It offers deployment with minimal dependencies, supports multiple tools like Terminal, Browser, File, Web Search, and messaging tools, allocates separate sandboxes for tasks, manages session history, supports stopping and interrupting conversations, file upload and download, and is multilingual. The system also provides user login and authentication. The project primarily relies on Docker for development and deployment, with model capability requirements and recommended Deepseek and GPT models.

aiounifi
Aiounifi is a Python library that provides a simple interface for interacting with the Unifi Controller API. It allows users to easily manage their Unifi network devices, such as access points, switches, and gateways, through automated scripts or applications. With Aiounifi, users can retrieve device information, perform configuration changes, monitor network performance, and more, all through a convenient and efficient API wrapper. This library simplifies the process of integrating Unifi network management into custom solutions, making it ideal for network administrators, developers, and enthusiasts looking to automate and streamline their network operations.

context-portal
Context-portal is a versatile tool for managing and visualizing data in a collaborative environment. It provides a user-friendly interface for organizing and sharing information, making it easy for teams to work together on projects. With features such as customizable dashboards, real-time updates, and seamless integration with popular data sources, Context-portal streamlines the data management process and enhances productivity. Whether you are a data analyst, project manager, or team leader, Context-portal offers a comprehensive solution for optimizing workflows and driving better decision-making.

mcp-fundamentals
The mcp-fundamentals repository is a collection of fundamental concepts and examples related to microservices, cloud computing, and DevOps. It covers topics such as containerization, orchestration, CI/CD pipelines, and infrastructure as code. The repository provides hands-on exercises and code samples to help users understand and apply these concepts in real-world scenarios. Whether you are a beginner looking to learn the basics or an experienced professional seeking to refresh your knowledge, mcp-fundamentals has something for everyone.

mcp-unity
MCP Unity is an implementation of the Model Context Protocol for Unity Editor, enabling AI assistants like Claude, Windsurf, and Cursor to interact with Unity projects. It provides tools to execute Unity menu items, select game objects, manage packages, run tests, and display messages in the Unity Editor. The package bridges Unity with a Node.js server implementing the MCP protocol, offering resources to retrieve menu items, game objects, console logs, packages, assets, and tests. Requirements include Unity 2022.3 or later, Node.js 18 or later for the server, and npm 9 or later for building. Installation involves adding the Unity MCP Server package via Unity Package Manager and installing Node.js. Configuration settings for AI clients like Cursor IDE, Claude Desktop, and Windsurf IDE are provided. Running the server requires starting the Node.js server and Unity Editor MCP Server. Debugging and troubleshooting guidelines are included for server issues. Contributions are welcome under the MIT license.

tiledesk-dashboard
Tiledesk is an open-source live chat platform with integrated chatbots written in Node.js and Express. It is designed to be a multi-channel platform for web, Android, and iOS, and it can be used to increase sales or provide post-sales customer service. Tiledesk's chatbot technology allows for automation of conversations, and it also provides APIs and webhooks for connecting external applications. Additionally, it offers a marketplace for apps and features such as CRM, ticketing, and data export.

web-bench
Web-bench is a simple tool for benchmarking web servers. It is designed to generate a large number of requests to a web server and measure the performance of the server under load. The tool allows users to specify the number of requests, concurrency level, and other parameters to simulate different traffic scenarios. Web-bench provides detailed statistics on response times, throughput, and errors encountered during the benchmarking process. It is a useful tool for web developers, system administrators, and anyone interested in evaluating the performance of web servers.
For similar tasks

mcp-server-motherduck
The mcp-server-motherduck repository is a server-side application that provides a centralized platform for managing and monitoring multiple Minecraft servers. It allows server administrators to easily control various aspects of their Minecraft servers, such as player management, world backups, and server performance monitoring. The application is designed to streamline server management tasks and enhance the overall gaming experience for both server administrators and players.
For similar jobs

mcp-server-motherduck
The mcp-server-motherduck repository is a server-side application that provides a centralized platform for managing and monitoring multiple Minecraft servers. It allows server administrators to easily control various aspects of their Minecraft servers, such as player management, world backups, and server performance monitoring. The application is designed to streamline server management tasks and enhance the overall gaming experience for both server administrators and players.