← all repositories
motherduckdb/mcp-server-motherduck

DuckDB inside your AI assistant, with guardrails attached

This local MCP server lets AI assistants query DuckDB and MotherDuck via SQL without shipping your data to a hosted API.

504 stars Python Coding AssistantsData Tooling
mcp-server-motherduck
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

This is a local MCP server that hands your AI assistant a SQL interface over DuckDB. It can execute queries, list tables and columns, and jump between local files, in-memory databases, S3-hosted files, or MotherDuck on the fly. Think of it as giving your IDE’s chatbot a read-only (by default) database client.

The interesting bit

The maintainers are unusually upfront about security: read-only mode still exposes your local filesystem and DuckDB settings, so they actively steer production use with third parties toward their hosted Remote MCP. That honesty is either refreshing corporate transparency or a very polite upsell. Either way, the on-the-fly database switching tool is genuinely useful for multi-source analysis.

Key highlights

  • Runs fully local via stdio or HTTP; no mandatory cloud dependency.
  • Supports local DuckDB files, in-memory stores, S3-hosted databases, and MotherDuck.
  • Ships read-only by default; writes require an explicit --read-write flag.
  • Query results are capped at 1,024 rows and 50,000 characters by default.
  • Includes a switch_database_connection tool for hopping between data sources mid-conversation.

Caveats

  • The README explicitly warns that read-only mode is not a sandbox: self-hosted instances still risk exposing local files and settings to connected AI clients.
  • MotherDuck read-only connections now require a read-scaling token; regular tokens force you into read-write mode.
  • The default database changed from MotherDuck (md:) to in-memory (:memory:) in v1.x, which will break existing configs that assumed otherwise.

Verdict

Worth a look if you want your AI assistant to explore or analyze DuckDB data without uploading it to a remote service. Look elsewhere if you need a zero-setup, externally facing production endpoint — the documentation itself recommends MotherDuck Remote MCP for that scenario.

Frequently asked

What is motherduckdb/mcp-server-motherduck?
This local MCP server lets AI assistants query DuckDB and MotherDuck via SQL without shipping your data to a hosted API.
Is mcp-server-motherduck open source?
Yes — motherduckdb/mcp-server-motherduck is open source, released under the MIT license.
What language is mcp-server-motherduck written in?
motherduckdb/mcp-server-motherduck is primarily written in Python.
How popular is mcp-server-motherduck?
motherduckdb/mcp-server-motherduck has 504 stars on GitHub.
Where can I find mcp-server-motherduck?
motherduckdb/mcp-server-motherduck is on GitHub at https://github.com/motherduckdb/mcp-server-motherduck.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.