motherduckdb/mcp-server-motherduck

Local MCP server for DuckDB and MotherDuck

What it solves

This project provides a Model Context Protocol (MCP) server that allows AI assistants and IDEs to interact directly with DuckDB and MotherDuck. It bridges the gap between LLMs and analytical SQL databases, enabling AI agents to perform data engineering and SQL analytics on local files, in-memory databases, S3-hosted databases, or cloud-based MotherDuck instances.

How it works

The server acts as a middleware that exposes DuckDB's SQL engine as a set of tools for an MCP-compatible client (like Claude Desktop, Cursor, or VS Code). It supports multiple connection modes—including read-only and read-write—and can switch between different database connections on-the-fly. It can be deployed locally via uvx or as a Docker container using either stdio or http transport.

Who it’s for

  • Data Engineers and Analysts: Those who want to use AI assistants to query and manage their analytical data.
  • AI Agent Developers: Developers building agents that need the ability to execute SQL and browse database catalogs.
  • IDE Users: Users of AI-powered IDEs (like Cursor or VS Code) who want to integrate their data sources directly into their coding workflow.

Highlights

  • Versatile Connectivity: Supports local DuckDB files, in-memory databases, S3-hosted databases, and MotherDuck.
  • Flexible Access Control: Offers read-only (default) and read-write modes, with specific security configurations for production.
  • Comprehensive Toolset: Includes tools for executing queries, listing databases, tables, and columns, and switching database connections.
  • Broad Client Support: Compatible with a wide range of MCP clients including Claude Desktop, Claude Code, Gemini CLI, and Cursor.

Related

  • Project
  • Project
  • Project
  • Project
  • Project