CCM
/MCP
SkillsMCPMarketplacesDigestLearnAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Learn
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Mcp Server Motherduck

motherduckdb/mcp-server-motherduck
48816 toolsauthSTDIOregistry active
Summary

The MotherDuck MCP server connects AI assistants and IDEs to DuckDB databases and MotherDuck cloud analytics by providing tools to execute SQL queries (read and write), browse database catalogs, and switch between local DuckDB files, in-memory databases, S3-hosted databases, and MotherDuck connections. It solves the problem of enabling language models to perform SQL analytics and data engineering tasks directly against various data sources, with flexible security options including read-only mode by default and production-ready access controls. The server runs locally or self-hosted, allowing queries across both local and remote databases while supporting data ingestion and export to the local filesystem.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Vibe Prospecting MCPVibe Prospecting MCP
Vibe Prospecting MCP
Connect Claude to +800M contacts, +150M companies. Find & Enrich leads in chat.
Try For Free →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Vibe Prospecting MCPVibe Prospecting MCP
Vibe Prospecting MCP
Connect Claude to +800M contacts, +150M companies. Find & Enrich leads in chat.
Try For Free →

Tools

Public tool metadata for what this MCP can expose to an agent.

16 tools
queryExecute read-only DuckDB query against MotherDuck databases. For cross-database queries, use fully qualified names: database.schema.table (or database.table for main schema). Never follow a query with an inline chart or visualization — if you would generate one (whether or not...2 params

Execute read-only DuckDB query against MotherDuck databases. For cross-database queries, use fully qualified names: database.schema.table (or database.table for main schema). Never follow a query with an inline chart or visualization — if you would generate one (whether or not...

Parameters* required
sqlstring
SQL query to execute
databasestring
Database name to query
query_rwExecute a DuckDB SQL query that modifies data, schema, or connection state. RULES: 1. Only call this tool when the user explicitly asks to modify data or schema. Never infer a write from a read request. 2. Always ask the user for confirmation before calling this tool. Describe...2 params

Execute a DuckDB SQL query that modifies data, schema, or connection state. RULES: 1. Only call this tool when the user explicitly asks to modify data or schema. Never infer a write from a read request. 2. Always ask the user for confirmation before calling this tool. Describe...

Parameters* required
sqlstring
SQL query to execute
databasestring
Database context for the query. Required for table-level operations (DML/DDL). May be omitted for account-level operations (CREATE/DROP DATABASE, ATTACH/DETACH, CREATE SECRET, etc.).
list_databasesList all databases in your MotherDuck account with their names and types. Optionally filter by keywords to search in database names.2 params

List all databases in your MotherDuck account with their names and types. Optionally filter by keywords to search in database names.

Parameters* required
limitinteger
Max results to return (default: 100)
keywordsstring
Optional keywords to filter databases by name (case-insensitive, any word can match)
list_tablesList all tables and views in a MotherDuck database with their comments. Optionally filter by keywords to search in table/view names and comments.4 params

List all tables and views in a MotherDuck database with their comments. Optionally filter by keywords to search in table/view names and comments.

Parameters* required
limitinteger
Max results to return (default: 100)
schemastring
Schema name (optional, defaults to all schemas)
databasestring
Database name to list tables from
keywordsstring
Optional keywords to filter tables/views by name or comment (case-insensitive, any word can match)
list_columnsList all columns of a table or view with their types and comments.4 params

List all columns of a table or view with their types and comments.

Parameters* required
limitinteger
Max results to return (default: 100)
tablestring
Table or view name
schemastring
Schema name (optional, defaults to 'main')
databasestring
Database name
search_catalogSearch the catalog for databases, schemas, tables, columns, shares using fuzzy matching. Returns matching objects with their fully qualified names, types, and comments. Useful for discovering available data when you don't know exact names.2 params

Search the catalog for databases, schemas, tables, columns, shares using fuzzy matching. Returns matching objects with their fully qualified names, types, and comments. Useful for discovering available data when you don't know exact names.

Parameters* required
querystring
Search term to find in object names (supports partial matching, underscores, dots)
object_typesarray
Optional filter to limit results to specific object types
ask_docs_questionAsk a question about DuckDB or MotherDuck. Returns answers from official documentation.1 params

Ask a question about DuckDB or MotherDuck. Returns answers from official documentation.

Parameters* required
questionstring
Question about DuckDB or MotherDuck
list_sharesList all database shares that have been shared with you. Returns share names and URLs. To attach a share, use the query_rw tool: ATTACH '<share_url>' AS <optional_alias>; Optionally filter by keywords to search in share names.2 params

List all database shares that have been shared with you. Returns share names and URLs. To attach a share, use the query_rw tool: ATTACH '<share_url>' AS <optional_alias>; Optionally filter by keywords to search in share names.

Parameters* required
limitinteger
Max results to return (default: 100)
keywordsstring
Optional keywords to filter shares by name (case-insensitive, any word can match)
list_divesList all dives in MotherDuck. Dives are interactive React data apps that query live data. Returns metadata including current_version (the latest version number, 1-indexed) for each dive. Use read_dive with the optional version parameter to retrieve a specific historical versio...2 params

List all dives in MotherDuck. Dives are interactive React data apps that query live data. Returns metadata including current_version (the latest version number, 1-indexed) for each dive. Use read_dive with the optional version parameter to retrieve a specific historical versio...

Parameters* required
limitinteger
Max results to return (default: 100)
keywordsstring
Optional keywords to filter dives by title or description (case-insensitive, all words must match)
save_diveSave a new dive to MotherDuck. Returns a URL the user can click to view the dive. Call get_dive_guide first and iterate with the user on the design thoroughly before suggesting to save. Never save without previous confirmation that iteration is done.3 params

Save a new dive to MotherDuck. Returns a URL the user can click to view the dive. Call get_dive_guide first and iterate with the user on the design thoroughly before suggesting to save. Never save without previous confirmation that iteration is done.

Parameters* required
titlestring
The title of the dive
contentstring
The JSX/React component code for the dive
descriptionstring
A brief description of the dive
update_diveUpdate an existing dive's title, description, or content. Returns a URL the user can click to view the updated dive. At least one field must be provided.4 params

Update an existing dive's title, description, or content. Returns a URL the user can click to view the updated dive. At least one field must be provided.

Parameters* required
idstring
The unique identifier (UUID) of the dive to update
titlestring
New title for the dive
contentstring
New JSX/React component code
descriptionstring
New description for the dive
read_diveRead a specific dive by ID, including its full JSX/React component code. Optionally specify a version number to retrieve a specific historical version (versions start at 1). If no version is specified, the latest version is returned.2 params

Read a specific dive by ID, including its full JSX/React component code. Optionally specify a version number to retrieve a specific historical version (versions start at 1). If no version is specified, the latest version is returned.

Parameters* required
idstring
The unique identifier of the dive to read
versioninteger
Optional version number to retrieve (1-indexed). If not specified, returns the latest version.
delete_diveDelete a dive by ID. This action is permanent and cannot be undone.1 params

Delete a dive by ID. This action is permanent and cannot be undone.

Parameters* required
idstring
The unique identifier of the dive to delete
get_dive_guideLoad instructions for creating MotherDuck dives. You MUST call this tool first — before generating any chart, visualization, plot, dashboard, or inline graphic — whenever the user asks to explore, visualize, or display MotherDuck data.1 params

Load instructions for creating MotherDuck dives. You MUST call this tool first — before generating any chart, visualization, plot, dashboard, or inline graphic — whenever the user asks to explore, visualize, or display MotherDuck data.

Parameters* required
clientstring
The client environment requesting the guide. Use 'claude' for Claude web/desktop Chat, 'chatgpt' for ChatGPT, 'claude_cowork' for Claude Cowork, 'claude_code' for Cursor/IDE integrations with local filesystem access, or 'other' for other MCP clients.one of claude · chatgpt · claude_cowork · claude_code · other
share_dive_dataShare the data for a dive with your organization. Creates org-scoped shares for owned databases used in the dive, and updates the dive so others in the organization can view it.1 params

Share the data for a dive with your organization. Creates org-scoped shares for owned databases used in the dive, and updates the dive so others in the organization can view it.

Parameters* required
diveIdstring
The unique identifier (UUID) of the dive
edit_dive_contentEdit a dive's content by applying one or more text replacements, then save to MotherDuck. Accepts `id` (dive UUID) and `edits` (an array of {old_string, new_string, replace_all?} objects). Reads the current content from MotherDuck, applies edits in sequence, validates, and per...2 params

Edit a dive's content by applying one or more text replacements, then save to MotherDuck. Accepts `id` (dive UUID) and `edits` (an array of {old_string, new_string, replace_all?} objects). Reads the current content from MotherDuck, applies edits in sequence, validates, and per...

Parameters* required
idstring
The unique identifier (UUID) of the dive to edit
editsarray
List of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.

MotherDuck / DuckDB Local MCP Server

DuckDB / MotherDuck Local MCP Server

SQL analytics and data engineering for AI Assistants and IDEs.


Connect AI assistants to your data using DuckDB's powerful analytical SQL engine. Supports connecting to local DuckDB files, in-memory databases, S3-hosted databases, and MotherDuck. Allows executing SQL read- and write-queries, browsing database catalogs, and switching between different database connections on-the-fly.

Looking for a fully-managed remote MCP server for MotherDuck? → Go to the MotherDuck Remote MCP docs

Remote vs Local MCP

Remote MCPLocal MCP (this repo)
HostingHosted by MotherDuckRuns locally/self-hosted
SetupZero-setupRequires local installation
AccessRead-write supportedRead-write supported
Local filesystem-Query across local and remote databases, ingest data from / export data to local filesystem

📝 Migrating from v0.x?

  • Read-only by default: The server now runs in read-only mode by default. Add --read-write to enable write access. See Securing for Production.
  • Default database changed: --db-path default changed from md: to :memory:. Add --db-path md: explicitly for MotherDuck.
  • MotherDuck read-only requires read-scaling token: MotherDuck connections in read-only mode require a read-scaling token. Regular tokens require --read-write.

Quick Start

Prerequisites: Install uv via pip install uv or brew install uv

Connecting to In-Memory DuckDB (Dev Mode)

{
  "mcpServers": {
    "DuckDB (in-memory, r/w)": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", ":memory:", "--read-write", "--allow-switch-databases"]
    }
  }
}

Full flexibility with no guardrails — read-write access and the ability to switch to any database (local files, S3, or MotherDuck) at runtime.

Connecting to a Local DuckDB File in Read-Only Mode

{
  "mcpServers": {
    "DuckDB (read-only)": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", "/absolute/path/to/your.duckdb"]
    }
  }
}

Connects to a specific DuckDB file in read-only mode. Won't hold on to the file lock, so convenient to use alongside a write connection to the same DuckDB file. You can also connect to remote DuckDB files on S3 using s3://bucket/path.duckdb — see Environment Variables for S3 authentication. If you're considering third-party access to the MCP, see Securing for Production.

Connecting to MotherDuck in Read-Write Mode

{
  "mcpServers": {
    "MotherDuck (local, r/w)": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", "md:", "--read-write"],
      "env": {
        "motherduck_token": "<YOUR_MOTHERDUCK_TOKEN>"
      }
    }
  }
}

See Command Line Parameters for more options, Securing for Production for deployment guidance, and Troubleshooting if you encounter issues.

Client Setup

ClientConfig LocationOne-Click Install
Claude DesktopSettings → Developer → Edit Config.mcpb (MCP Bundle)
Claude CodeUse CLI commands below-
Codex CLIUse CLI commands below or ~/.codex/config.toml-
Gemini CLIUse CLI commands below or ~/.gemini/settings.json-
CursorSettings → MCP → Add new global MCP serverInstall in Cursor
VS CodeCtrl+Shift+P → "Preferences: Open User Settings (JSON)"Install with UV in VS Code
Kiro~/.kiro/settings/mcp.json (global) or .kiro/settings/mcp.json (project)Add to Kiro

Any MCP-compatible client can use this server. Add the JSON configuration from Quick Start to your client's MCP config file. Consult your client's documentation for the config file location.

Claude Code CLI commands

In-Memory DuckDB (Dev Mode):

claude mcp add --scope user duckdb --transport stdio -- uvx mcp-server-motherduck --db-path :memory: --read-write --allow-switch-databases

Local DuckDB (Read-Only):

claude mcp add --scope user duckdb --transport stdio -- uvx mcp-server-motherduck --db-path /absolute/path/to/db.duckdb

MotherDuck (Read-Write):

claude mcp add --scope user motherduck --transport stdio --env motherduck_token=YOUR_TOKEN -- uvx mcp-server-motherduck --db-path md: --read-write
Codex CLI commands

In-Memory DuckDB (Dev Mode):

codex mcp add duckdb -- uvx mcp-server-motherduck --db-path :memory: --read-write --allow-switch-databases

Local DuckDB (Read-Only):

codex mcp add duckdb -- uvx mcp-server-motherduck --db-path /absolute/path/to/db.duckdb

MotherDuck (Read-Write):

codex mcp add motherduck --env motherduck_token=YOUR_TOKEN -- uvx mcp-server-motherduck --db-path md: --read-write
Gemini CLI commands

In-Memory DuckDB (Dev Mode):

gemini mcp add -s user duckdb uvx mcp-server-motherduck --db-path :memory: --read-write --allow-switch-databases

Local DuckDB (Read-Only):

gemini mcp add -s user duckdb uvx mcp-server-motherduck --db-path /absolute/path/to/db.duckdb

MotherDuck (Read-Write):

gemini mcp add -s user -e motherduck_token=YOUR_TOKEN motherduck uvx mcp-server-motherduck --db-path md: --read-write
Kiro manual JSON config

Add the following to your Kiro MCP config file (~/.kiro/settings/mcp.json for global, or .kiro/settings/mcp.json for project-scoped). See the Kiro MCP documentation for more details.

In-Memory DuckDB (Dev Mode):

{
  "mcpServers": {
    "DuckDB (in-memory, r/w)": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", ":memory:", "--read-write", "--allow-switch-databases"]
    }
  }
}

MotherDuck (Read-Write):

{
  "mcpServers": {
    "MotherDuck (local, r/w)": {
      "command": "uvx",
      "args": ["mcp-server-motherduck", "--db-path", "md:", "--read-write"],
      "env": {
        "motherduck_token": "<YOUR_MOTHERDUCK_TOKEN>"
      }
    }
  }
}

Tools

ToolDescriptionRequired InputsOptional Inputs
execute_queryExecute SQL query (DuckDB dialect)sql-
list_databasesList all databases (useful for MotherDuck or multiple attached DBs)--
list_tablesList tables and views-database, schema
list_columnsList columns of a table/viewtabledatabase, schema
switch_database_connection*Switch to different databasepathcreate_if_not_exists

*Requires --allow-switch-databases flag

All tools return JSON. Results are limited to 1024 rows / 50,000 chars by default (configurable via --max-rows, --max-chars).

Securing for Production

When giving third parties access to a self-hosted MCP server, read-only mode alone is not sufficient — it still allows access to the local filesystem, changing DuckDB settings, and other potentially sensitive operations.

For production deployments with third-party access, we recommend MotherDuck Remote MCP — zero-setup, read-write capable, and hosted by MotherDuck.

Self-hosting MotherDuck MCP: Fork this repo and customize as needed. Use a service account with read-scaling tokens and enable SaaS mode to restrict local file access.

Self-hosting DuckDB MCP: Use --init-sql to apply security settings. See the Securing DuckDB guide for available options.

Command Line Parameters

ParameterDefaultDescription
--db-path:memory:Database path: local file (absolute), md: (MotherDuck), or s3:// URL
--motherduck-tokenmotherduck_token env varMotherDuck access token
--read-writeFalseEnable write access
--motherduck-saas-modeFalseMotherDuck SaaS mode (restricts local access)
--allow-switch-databasesFalseEnable switch_database_connection tool
--max-rows1024Max rows returned
--max-chars50000Max characters returned
--query-timeout-1Query timeout in seconds (-1 = disabled)
--init-sqlNoneSQL to execute on startup
--motherduck-connection-parameterssession_hint=mcp&
dbinstance_inactivity_ttl=0s
Additional MotherDuck connection string parameters (key=value pairs separated by &)
--ephemeral-connectionsTrueUse temporary connections for read-only local files
--transportstdioTransport type: stdio or http
--stateless-httpFalseFor protocol compatibility only (e.g. with AWS Bedrock AgentCore Runtime). Server still maintains global state via the shared DatabaseClient.
--port8000Port for HTTP transport
--host127.0.0.1Host for HTTP transport

Environment Variables

VariableDescription
motherduck_token or MOTHERDUCK_TOKENMotherDuck access token (alternative to --motherduck-token)
HOMEUsed by DuckDB for extensions and config. Override with --home-dir if not set.
AWS_ACCESS_KEY_IDAWS access key for S3 database connections
AWS_SECRET_ACCESS_KEYAWS secret key for S3 database connections
AWS_SESSION_TOKENAWS session token for temporary credentials (IAM roles, SSO, EC2 instance profiles)
AWS_DEFAULT_REGIONAWS region for S3 connections
AWS_ENDPOINTAWS endpoint for S3 connections

Troubleshooting

  • spawn uvx ENOENT: Specify full path to uvx (run which uvx to find it)
  • File locked: Make sure --ephemeral-connections is turned on (default: true) and that you're not connected in read-write mode

Resources

  • MotherDuck MCP Documentation
  • Close the Loop: Faster Data Pipelines with MCP, DuckDB & AI (Blog)
  • Faster Data Pipelines with MCP and DuckDB (YouTube)

Development

To run from source:

{
  "mcpServers": {
    "Local DuckDB (Dev)": {
      "command": "uv",
      "args": ["--directory", "/path/to/mcp-server-motherduck", "run", "mcp-server-motherduck", "--db-path", "md:"],
      "env": {
        "motherduck_token": "<YOUR_MOTHERDUCK_TOKEN>"
      }
    }
  }
}

Release Process

  1. Run the Release New Version GitHub Action
  2. Enter version in MAJOR.MINOR.PATCH format
  3. The workflow bumps version, publishes to PyPI/MCP registry, and creates the GitHub release with MCPB package

License

MIT License - see LICENSE file.

mcp-name: io.github.motherduckdb/mcp-server-motherduck

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Vibe Prospecting MCPVibe Prospecting MCP
Vibe Prospecting MCP
Connect Claude to +800M contacts, +150M companies. Find & Enrich leads in chat.
Try For Free →

Configuration

motherduck_tokensecret

Access token for MotherDuck connections (alternative to --motherduck-token)

MOTHERDUCK_TOKENsecret

Access token for MotherDuck connections (alternative to --motherduck-token)

HOME

Used by DuckDB for extensions and config. Override with --home-dir if not set.

AWS_ACCESS_KEY_IDsecret

AWS access key for S3 database connections

AWS_SECRET_ACCESS_KEYsecret

AWS secret access key for S3 database connections

AWS_SESSION_TOKENsecret

AWS session token for temporary credentials

AWS_DEFAULT_REGION

AWS region for S3 database connections

AWS_ENDPOINT

AWS endpoint for S3 database connections

Categories
DatabasesMonitoring & ObservabilityData & Analytics
Registryactive
Packagemcp-server-motherduck
TransportSTDIO
AuthRequired
UpdatedJun 9, 2026
View on GitHub

Related Databases MCP Servers

View all →
Postgres

ai.waystation/postgres

Connect to your PostgreSQL database to query data and schemas.
54
Read Only Local Postgres Mcp Server

hovecapital/read-only-local-postgres-mcp-server

MCP server for read-only PostgreSQL database queries in Claude Desktop
2
Database Mcp

cocaxcode/database-mcp

MCP server for database connectivity. Multi-DB (PostgreSQL, MySQL, SQLite), 19 tools.
1
Mcp Mysql

io.github.infoinlet-marketplace/mcp-mysql

Read-only MySQL/MariaDB for AI agents — query, list/describe tables, health. SQL-guarded.
Database Admin

io.github.cybeleri/database-admin

Database admin MCP: schema inspection, query optimization for PostgreSQL and MySQL
Postgres Secured (Aegis Zero-Trust)

io.github.yash-0620/postgres-mcp-secured

Enterprise PostgreSQL MCP secured by Aegis Zero-Trust to block unauthorized SQL injections.