mcp-server-motherduck
MCP server by motherduckdb Community
mcp-server-motherduck connects AI assistants and IDEs to DuckDB and MotherDuck so they can run SQL queries and browse database catalogs. It supports local DuckDB files, in-memory databases, S3-hosted databases and MotherDuck.
Install mcp-server-motherduck
Built from the published package, never by AI.
claude mcp add mcp-server-motherduck -- uvx mcp-server-motherduckRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"mcp-server-motherduck": {
"args": [
"mcp-server-motherduck"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
Step-by-step: install mcp-server-motherduck in Claude Desktop
{
"mcpServers": {
"mcp-server-motherduck": {
"args": [
"mcp-server-motherduck"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"mcp-server-motherduck": {
"args": [
"mcp-server-motherduck"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add mcp-server-motherduck -- uvx mcp-server-motherduck{
"mcpServers": {
"mcp-server-motherduck": {
"args": [
"mcp-server-motherduck"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install mcp-server-motherduck in Antigravity CLI
gemini mcp add mcp-server-motherduck uvx mcp-server-motherduckGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mcp-server-motherduck block.
About
mcp-server-motherduck is a local MCP server from MotherDuck that lets AI assistants work with DuckDB databases through SQL. It can connect to local DuckDB files, in-memory databases, S3-hosted databases and MotherDuck. The assistant can run read and write SQL queries, browse catalogs of tables, views and columns, and switch between database connections at runtime when that option is enabled.
The server runs locally or on your own infrastructure and is started with uvx from a client's MCP config. Read-only mode is the default, and write access needs the --read-write flag. The source says it is for people who want an assistant to query and manage their DuckDB or MotherDuck data from a client such as Claude Desktop, Claude Code, Cursor or VS Code. For a fully hosted option, the source points to MotherDuck's Remote MCP service.
Written from the project's README and checked against it.
Tools it gives your assistant
execute_queryExecutes a SQL query using the DuckDB dialect.list_databasesLists all databases, useful for MotherDuck or multiple attached databases.list_tablesLists tables and views, optionally filtered by database or schema.list_columnsLists the columns of a table or view, optionally filtered by database or schema.switch_database_connectionSwitches to a different database. Requires the --allow-switch-databases flag.
What you need
- uv installed through pip or Homebrew
- MotherDuck access token for MotherDuck connections
- AWS credentials for S3 database connections
- Docker, optional, for the container build
| Setting | Needed | What it is |
|---|---|---|
motherduck_Environment variable, secret | Optional | Access token for MotherDuck connections (alternative to --motherduck-token) |
MOTHERDUCK_Environment variable, secret | Optional | Access token for MotherDuck connections (alternative to --motherduck-token) |
HOMEEnvironment variable | Optional | Used by DuckDB for extensions and config. Override with --home-dir if not set. |
AWS_Environment variable, secret | Optional | AWS access key for S3 database connections |
AWS_Environment variable, secret | Optional | AWS secret access key for S3 database connections |
AWS_Environment variable, secret | Optional | AWS session token for temporary credentials |
AWS_Environment variable | Optional | AWS region for S3 database connections |
AWS_Environment variable | Optional | AWS endpoint for S3 database connections |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Run a SQL query against my local DuckDB file and summarize the results
- List the tables and columns in my MotherDuck database
- Switch to the S3-hosted DuckDB database and list its tables
Good to know
- Read-only mode alone is not enough for third-party access to a self-hosted server.
- Results are limited to 1024 rows and 50,000 characters by default.
- The switch_database_connection tool is only available with the --allow-switch-databases flag.
- Local files can be locked if the server is connected in read-write mode, unless --ephemeral-connections is on.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to mcp-server-motherduck
All alternatives →Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.
ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.
Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.
MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.
Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.
MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.
Compare with Supabase, ArcadeDB MCP Server or DBHub
mcp-server-motherduck: common questions
Can I use mcp-server-motherduck with MotherDuck?
Yes. Start the server with --db-path md: and pass a MotherDuck token through the motherduck_token environment variable or the --motherduck-token flag.
Is it safe to give other people access to this server?
The source says read-only mode alone is not sufficient for third-party access because it still allows local filesystem access and changes to DuckDB settings. It recommends MotherDuck Remote MCP or a self-hosted setup with a service account, read-scaling tokens and SaaS mode.
Can it query data stored on S3?
Yes. You can point --db-path at an s3:// URL and set AWS environment variables such as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for authentication.
How do I install mcp-server-motherduck?
In Claude Code run claude mcp add mcp-server-motherduck -- uvx mcp-server-motherduck. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is mcp-server-motherduck the official server?
mcp-server-motherduck is a community project by motherduckdb, not verified by a company domain.
Is mcp-server-motherduck free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is mcp-server-motherduck safe to use?
It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to mcp-server-motherduck?
Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.
Does mcp-server-motherduck work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
