MotherDuck

MotherDuck

Query and analyze data with MotherDuck and local DuckDB

366
Stars
58
Forks
0
Releases

Overview

MotherDuck's DuckDB MCP Server is an MCP server implementation that interacts with DuckDB and MotherDuck databases, providing SQL analytics capabilities to AI Assistants and IDEs. It supports hybrid execution by querying data from local DuckDB instances and cloud-based MotherDuck databases, and it can access data stored in cloud storage (e.g., Amazon S3) via MotherDuck's integrations. Data sharing is supported by creating and sharing databases. Queries use DuckDB's SQL dialect and can be issued from AI assistants or IDEs; all interactions are performed by writing SQL queries. The server operates in a serverless fashion, removing infrastructure management. It exposes one initialization prompt, 'duckdb-motherduck-initial-prompt', and one tool, 'query', to execute SQL on the active database. Query results are automatically limited to 1024 rows and 50,000 characters by default (configurable via --max-rows and --max-chars); responses may be truncated with a note. The MCP supports connecting to MotherDuck with tokens (including SaaS mode) or to local DuckDB (memory or file) or DuckDB on S3 with credentials loaded from environment variables. It also supports read-only operation and short-lived connections.

Details

Owner
motherduckdb
Language
Python
License
MIT License
Updated
2025-12-07

Features

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.

Prompts-based initialization

Provides a single initialization prompt: 'duckdb-motherduck-initial-prompt' to establish connections.

Query tool

One tool 'query' to execute SQL queries with a required 'query' input.

Result limiting

Automatically limits results to protect context (default 1024 rows, 50,000 chars; configurable).

Audience

AI assistantsEnable SQL analytics by issuing SQL queries from AI assistants and IDEs.
DevelopersIntegrate MCP server within development environments to enable SQL analytics.

Tags

DuckDBMotherDuckMCPSQLhybridcloud storageS3serverlessdata sharingSaaSread-only