mcp-server-motherduck
io.github.motherduckdb/mcp-server-motherduck
About mcp-server-motherduck
mcp-server-motherduck is an MCP server published by the GitHub account motherduckdb. SQL analytics and data engineering for AI Assistants and IDEs
It runs on your own machine: your AI client starts it from the PyPI package mcp-server-motherduck at version 1.1.0.
It asks for 5 secrets: motherduck_token, MOTHERDUCK_TOKEN, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN. Give it a key with the least access that still works.
Version 1.1.0 was published on 7 October 2026, and the source code is public, so you can read it before installing.
Written from the registry entry. 9 automated checks on the registry entry and the package code: 7 pass, 1 warn, 0 fail, 1 info. How we check.
What it asks for
| Variable | Required | Secret | Description |
|---|---|---|---|
motherduck_token | No | Yes | Access token for MotherDuck connections (alternative to --motherduck-token) |
MOTHERDUCK_TOKEN | No | Yes | Access token for MotherDuck connections (alternative to --motherduck-token) |
HOME | No | No | Used by DuckDB for extensions and config. Override with --home-dir if not set. |
AWS_ACCESS_KEY_ID | No | Yes | AWS access key for S3 database connections |
AWS_SECRET_ACCESS_KEY | No | Yes | AWS secret access key for S3 database connections |
AWS_SESSION_TOKEN | No | Yes | AWS session token for temporary credentials |
AWS_DEFAULT_REGION | No | No | AWS region for S3 database connections |
AWS_ENDPOINT | No | No | AWS endpoint for S3 database connections |
Checks
| Check | Result | Detail |
|---|---|---|
| Source repository linked | Pass | https://github.com/motherduckdb/mcp-server-motherduck |
| Version pinned | Pass | Every package has an explicit version |
| Secrets requested | Warn | Asks for 5 secrets: motherduck_token, MOTHERDUCK_TOKEN, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN |
| Known package registry | Pass | All packages come from npm, PyPI, OCI, NuGet or MCPB |
| Namespace ownership | Info | Name verified via GitHub account motherduckdb |
| Registry text aimed at the AI | Pass | Description and settings contain no hidden characters or instructions to the AI |
| Install scripts | Pass | mcp-server-motherduck 1.1.0 has no setup.py; nothing runs at install |
| Code red flags | Pass | Read 39 files in mcp-server-motherduck 1.1.0: no obfuscation, encoded execution, credential reads or data-collection endpoints found |
| Text aimed at the AI | Pass | No hidden characters or instructions to the AI in 39 files, including comments and the README |
Code review: Pass, with notes
We read all 1,716 lines in 11 files of mcp-server-motherduck 1.1.0 on 2026-10-31, without running it.
Lets an AI run SQL on a local DuckDB file, an S3-hosted DuckDB file or your MotherDuck cloud databases. It only contacts MotherDuck or S3 when you configure them, and it has no telemetry. Read-only is the default for real databases, but DuckDB SQL can still read other files on your computer and fetch web addresses. The optional database-switching tool can escape read-only mode, so leave it off unless you need it.
What we found
- Note execute_query runs any SQL the model writes. Read-only mode (the default for files and MotherDuck) protects the database itself, but DuckDB's external access is left on, so a query can read any local file the user can read (e.g. read_text('C:/Users/.../secrets')) or fetch remote URLs. This creates a data-exfiltration path if the model is prompt-injected. SaaS mode (--motherduck-saas-mode) restricts this for MotherDuck.
mcp_server_motherduck/database.py:313-337 - Note The default :memory: database needs --read-write and is fully writable. In that mode SQL can ATTACH any local DuckDB file read-write and COPY data to files on disk.
mcp_server_motherduck/__init__.py:201-208 - Note If --allow-switch-databases is on (it is off by default), switching to ':memory:' always produces a writable connection, even when the server runs read-only. That bypasses read-only mode, for example by then ATTACHing local files. The tool reports this only as a warning.
mcp_server_motherduck/tools/switch_database_connection.py:97-102 - Note The MotherDuck token is embedded in the connection string. The code takes care not to return or log it (user_db_path is surfaced instead), but DuckDB error messages returned to the model were not checked for whether they could echo the connection string.
mcp_server_motherduck/database.py:261-302 - Info AWS credentials from env are formatted into a CREATE SECRET statement without escaping. This is env-controlled, not reachable from tool input; a quote in a secret would only break the statement.
mcp_server_motherduck/database.py:151-179 - Info --init-sql (file or SQL string from the operator) is executed on every new connection, including each ephemeral one.
mcp_server_motherduck/database.py:238-259,331,449 - Info The server icon file (assets/duck_feet_square.png) is not among the reviewed code files; it is only loaded as an image data URI if present.
mcp_server_motherduck/server.py:28-30 - Info pyproject.toml was not among the reviewed files; dependencies listed come from imports. Line counts use the manifest convention (newline count + 1 per file, i.e. the empty segment after a final newline is counted); every line of every file was read with the Read tool.
(package)
| Talks to | MotherDuck cloud (reached by DuckDB's motherduck extension): the MotherDuck token, SQL queries, custom_user_agent mcp-server-motherduck/1.1.0, session_hint=mcp (only when --db-path is md:..., lazily on the first tool call) Amazon S3 or AWS_ENDPOINT: AWS credentials from env (as a DuckDB secret) and S3 reads (only when --db-path is s3://..., on first connection) DuckDB extension repository (extensions.duckdb.org): extension download request (DuckDB dependency behaviour) (INSTALL httpfs for s3:// paths (database.py:137), or DuckDB extension autoload) any URL named in a SQL query: HTTP requests chosen by the query (if the model's SQL uses DuckDB's http/https/s3 reading functions) |
|---|---|
| Keys and settings | motherduck_token / MOTHERDUCK_TOKEN (or --motherduck-token): MotherDuckAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_DEFAULT_REGION, AWS_ENDPOINT: Amazon S3 / the configured S3 endpoint (s3:// paths only)MCP_PORT, MCP_HOST, MCP_TRANSPORT, MCP_STATELESS_HTTP, MCP_DB_PATH, MCP_SAAS_MODE, MCP_READ_WRITE, MCP_EPHEMERAL_CONNECTIONS, MCP_MAX_ROWS, MCP_MAX_CHARS, MCP_QUERY_TIMEOUT, MCP_INIT_SQL, MCP_ALLOW_SWITCH_DATABASES, MCP_MOTHERDUCK_CONNECTION_PARAMETERS: not sent; local settings |
| Files on your machine | Opens the DuckDB file given by --db-path (read-only by default). Reads --init-sql if it is a file path (database.py:245-248). Can override HOME (database.py:80-81). switch_database_connection (opt-in) can open or create any absolute-path DuckDB file. DuckDB SQL from execute_query can also read arbitrary local files (read_csv, read_text, etc.) and, on a writable connection, write files (COPY ... TO) or ATTACH other database files; the package does not set enable_external_access=false. |
| Runs programs | None by the package. SQL is executed by DuckDB as designed; no shell, eval or dynamic imports. |
| Telemetry | None in the package. MotherDuck receives a user agent (mcp-server-motherduck/1.1.0) and session_hint=mcp identifying the connection as coming from this server. |
| Tools | execute_query, list_databases, list_tables, list_columns, switch_database_connection (only with --allow-switch-databases) |
| Tool descriptions | clean (descriptions and the server instructions are accurate DuckDB guidance; tool annotations correctly mark execute_query destructive when read-write; no hidden or invisible text) |
This covers the package's own code only, not the 4 packages it depends on (fastmcp, mcp, duckdb, click). A new version drops this review until we read it again.
Popularity & health: 78 / 100
Worked out from public numbers and our own checks, not from user reviews or ratings. It says how used and how looked-after a server is, not whether it is safe.
90 forks, 41 merged pull requests. Sources: GitHub, npm, PyPI (pypistats.org) and Hacker News (Algolia), fetched 2026-10-31.
What people say
No Hacker News threads link to its source code.
Look further: search Reddit, search Hacker News, read its GitHub issues. These are not reviews we checked.
Facts
| Registry name | io.github.motherduckdb/mcp-server-motherduck |
|---|---|
| Publisher | GitHub account motherduckdb |
| How the name is verified | Name verified via GitHub account motherduckdb. The registry ties the name prefix to that account or domain; it does not check the code. |
| Type | Local: runs on your machine from a package |
| Packages | pypi mcp-server-motherduck 1.1.0 (stdio) |
| Version | 1.1.0 |
| Published | |
| Last updated | |
| Source repository | https://github.com/motherduckdb/mcp-server-motherduck |
| Website | None linked |
| Category | Databases & data (assigned by keyword rule, not by hand) |
Related servers in Databases & data
- mcp8/8Connect your AI assistants to Keboola and expose your data,…
- Snowflake MCP Server7/8A Snowflake MCP server — SQL queries, schema exploration, and data…
- SqlAugur4/4MCP server providing AI assistants with safe, read-only SQL Server…
- Vitrus analytics3/3Read-only analytics for all your apps: users, AI traffic, revenue,…
FlowLeap Patent AI3/3EPO/USPTO search, citations, OCR, plus PATSTAT Portfolio Analytics,…- fabric-dw4/4MCP server for Microsoft Fabric Data Warehouses and SQL Analytics…