MotherDuck MCP Server for Claude
Connect Claude to MotherDuck and DuckDB — run SQL queries and explore databases, tables, and columns — with the official MotherDuck Model Context Protocol server.
Open the source and read safety notes before installing.
Safety notes
- The server is read-only by default; --read-write enables writes, and --allow-switch-databases enables switching — enable only when needed.
- execute_query runs arbitrary SQL against the connected database; scope the token and database accordingly.
Privacy notes
- Query results and schema metadata enter the MCP client context and the model's prompt.
- The motherduck_token is a secret — keep it in the client config or environment, never in shared repositories.
Prerequisites
- A MotherDuck account and token (motherduck_token) for cloud databases, or a local DuckDB file / :memory:.
- uv (uvx) to run mcp-server-motherduck.
- An MCP client such as Claude Code or Claude Desktop.
Schema details
- Install type
- cli
- Troubleshooting
- No
- Scope
- Source repo
- Estimated setup
- 5 minutes
- Difficulty
- intermediate
- Website
- https://motherduck.com
Full copyable content
{
"mcpServers": {
"motherduck": {
"command": "uvx",
"args": ["mcp-server-motherduck", "--db-path", "md:"],
"env": {
"motherduck_token": "<your-token>"
}
}
}
}About this resource
Overview
The MotherDuck MCP Server is the official Model Context Protocol server for MotherDuck and
DuckDB. It lets Claude run SQL analytics and explore schemas in natural language — against a cloud
MotherDuck database (md:), a local DuckDB file, an in-memory database, or data in S3. It runs over
stdio or HTTP via uvx mcp-server-motherduck and is licensed under MIT.
Key capabilities
execute_query— run a SQL query against the connected database.list_databases— list available databases.list_tables— list tables and views.list_columns— describe a table's columns.switch_database_connection— switch databases (requires--allow-switch-databases).
How it compares
Several analytics-database MCP servers let Claude run SQL over columnar data; they differ in where the data lives:
| MCP server | Engine | Data location | Notable |
|---|---|---|---|
| MotherDuck MCP | DuckDB / MotherDuck | Local file, in-memory, S3, or MotherDuck cloud | Same engine local and in the cloud |
| DuckDB MCP | DuckDB | Local / in-process | Embedded analytics, no server |
| ClickHouse MCP | ClickHouse | ClickHouse server / Cloud | Large-scale columnar analytics |
Choose MotherDuck when you want DuckDB ergonomics that scale from a laptop to the cloud; the DuckDB and ClickHouse servers cover purely-embedded and large-scale-server analytics respectively.
Installation
Claude Code
# MotherDuck cloud:
claude mcp add motherduck -e motherduck_token=<your-token> -- uvx mcp-server-motherduck --db-path md:
# Local DuckDB file (read-only by default):
claude mcp add duckdb -- uvx mcp-server-motherduck --db-path /path/to/data.duckdb
Claude Desktop
{
"mcpServers": {
"motherduck": {
"command": "uvx",
"args": ["mcp-server-motherduck", "--db-path", "md:"],
"env": {
"motherduck_token": "<your-token>"
}
}
}
}
Requirements
- A MotherDuck token for cloud databases, or a local DuckDB file /
:memory:. uv(uvx) and an MCP client (Claude Code or Claude Desktop).
Security
- The server defaults to read-only; add
--read-writeonly when Claude needs to write. execute_queryruns arbitrary SQL — scope the token and the connected database.- Treat
motherduck_tokenas a secret.
Source Verification Notes
Verified on 2026-06-17:
- The official repository
github.com/motherduckdb/mcp-server-motherduck(MIT) documentsuvx mcp-server-motherduck, the--db-path/--read-write/--allow-switch-databasesflags, stdio and HTTP transports, themotherduck_tokenrequirement, and the five tools above. - MotherDuck's and DuckDB's documentation describe the underlying SQL engine.
- Claude Code's MCP documentation describes the connector setup pattern used here.
Source citations
Add this badge to your README
How it compares
MotherDuck MCP Server for Claude side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | MotherDuck MCP Server for Claude Connect Claude to MotherDuck and DuckDB — run SQL queries and explore databases, tables, and columns — with the official MotherDuck Model Context Protocol server. Open dossier | DuckDB MCP Server MCP server for querying a local DuckDB database file from Claude through a single SQL query tool, with optional DuckDB-native read-only mode. Open dossier | Elasticsearch MCP Server for Claude Connect Claude to your Elasticsearch cluster — search indices, inspect mappings, run ES|QL, and check shard health — with Elastic's official Model Context Protocol server. Open dossier | Weights & Biases MCP Server for Claude Connect Claude to Weights & Biases — query runs, metrics, and experiments, analyze Weave traces, inspect registries and artifacts, and create reports — with the official W&B MCP server. Open dossier |
|---|---|---|---|---|
| Trust | ||||
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Category | mcp | mcp | mcp | mcp |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | MotherDuck | ktanaka101 | Elastic | Weights & Biases |
| Added | 2026-06-17 | 2026-06-06 | 2026-06-17 | 2026-06-17 |
| Platforms | Claude CodeCodexCursorClaude Desktop | Claude CodeClaude Desktop | Claude CodeClaude Desktop | Claude CodeClaude Desktop |
| Source repo | — | — | — | — |
| Safety notes | ✓The server is read-only by default; --read-write enables writes, and --allow-switch-databases enables switching — enable only when needed. execute_query runs arbitrary SQL against the connected database; scope the token and database accordingly. | ✓The server exposes a single `query` tool that can execute any valid DuckDB SQL statement against the configured database. Without `--readonly`, the server can create the database file, create tables, insert data, update rows, delete rows, and mutate database state. With `--readonly`, the server opens DuckDB with native read-only protection and fails to start if the database file or parent directory is missing. The `--keep-connection` option can hold a persistent DuckDB connection and file lock for the server lifetime. Treat SQL generated by a model as executable code; review queries before running them on important data. | ✓Search, ES|QL, and shard tools run live read queries against the configured cluster; a broad or expensive query can add load. Scope the Elasticsearch API key to least privilege (read-only on the indices Claude should see) before connecting. | ✓Tools read your W&B runs, traces, and artifacts and can create reports; scope the API key to the projects Claude should access. Logging analysis back to W&B writes to your workspace — review before running it through Claude. |
| Privacy notes | ✓Query results and schema metadata enter the MCP client context and the model's prompt. The motherduck_token is a secret — keep it in the client config or environment, never in shared repositories. | ✓Tool calls and results can expose database paths, table names, schemas, query text, row values, file paths referenced by SQL, and analytical results to the MCP client and model provider. DuckDB can query local files and extensions depending on SQL, configuration, and installed capabilities; keep the server scoped to approved data directories. Do not point writable sessions at production, customer, regulated, or irreplaceable DuckDB files without backups and explicit approval. Query errors can reveal schema names, file paths, and data-shape details. | ✓Index data, field mappings, and query results enter the MCP client context and the model's prompt. ES_URL and ES_API_KEY are secrets — store them in the client config or environment, never in shared repositories. | ✓Run metrics, experiment configs, Weave traces, and artifact metadata enter the MCP client context and the model's prompt. The WANDB_API_KEY is a secret — keep it in the client config or environment, never in shared repositories. |
| Prerequisites |
|
|
|
|
| Install | | | | |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Featured in
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.