DuckDB & MotherDuck
Local and cloud analytical SQL engine for DuckDB files, in-memory databases, S3 data lakes, and MotherDuck.
About this Server
The official DuckDB and MotherDuck Model Context Protocol (MCP) server connects AI assistants to DuckDB fast columnar analytical SQL engine. It enables querying in-memory tables, local .duckdb files, remote Parquet data on Amazon S3, and cloud-hosted MotherDuck databases. Agents can execute queries, inspect catalogs, list schemas and columns, and switch active database connections dynamically.
Direct low-latency RPC protocol communication with structured JSON schemas.
Restricted capability bounds to prevent accidental modifications or leakage.
Security & Best Practices
When to Use (and When Not To)
- •Fast OLAP analytical queries, aggregation rollups, and summary metrics over large datasets
- •Querying local Parquet, CSV, and JSON files directly without provisioning heavyweight database servers
- •Connecting AI agents to serverless MotherDuck cloud data warehouses
- •High-frequency transactional OLTP row writes and ACID bank transactions (use DBHub with PostgreSQL instead)
- •Document collections and Atlas stream pipelines (use MongoDB MCP instead)
- •Vector embedding cosine similarity searches (use Chroma MCP instead)
Install & Setup
claude mcp add motherduck -- uvx mcp-server-motherduck --db-path md: --read-writeExposed Tools & Endpoints
5 toolsFunctions your AI agent can invoke via this Model Context Protocol server
Executes SQL analytical queries using DuckDB dialect against connected local or cloud databases.
Lists all accessible databases attached to the current DuckDB or MotherDuck session.
Lists tables and views in a specified database and schema.
Retrieves column names, data types, and nullability for a table or view.
Dynamically switches the active database connection to another file, S3 path, or MotherDuck.