Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

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 Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
MCP servers/Databases
motherduckdb avatar

Mcp Server Motherduck

motherduckdb/mcp-server-motherduck

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.

GitHub stars
488
tools
16
last updated
Jun 9, 2026
View on GitHubSave

Tools

16 tools

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

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
databasestring
Database name to query
sqlstring
SQL query to execute
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
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.).
sqlstring
SQL query to execute
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
keywordsstring
Optional keywords to filter databases by name (case-insensitive, any word can match)
limitinteger
Max results to return (default: 100)
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
databasestring
Database name to list tables from
keywordsstring
Optional keywords to filter tables/views by name or comment (case-insensitive, any word can match)
limitinteger
Max results to return (default: 100)
schemastring
Schema name (optional, defaults to all schemas)
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
databasestring
Database name
limitinteger
Max results to return (default: 100)
schemastring
Schema name (optional, defaults to 'main')
tablestring
Table or view 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
object_typesarray
Optional filter to limit results to specific object types
querystring
Search term to find in object names (supports partial matching, underscores, dots)
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
keywordsstring
Optional keywords to filter shares by name (case-insensitive, any word can match)
limitinteger
Max results to return (default: 100)
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
keywordsstring
Optional keywords to filter dives by title or description (case-insensitive, all words must match)
limitinteger
Max results to return (default: 100)
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
contentstring
The JSX/React component code for the dive
descriptionstring
A brief description of the dive
titlestring
The title 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
contentstring
New JSX/React component code
descriptionstring
New description for the dive
idstring
The unique identifier (UUID) of the dive to update
titlestring
New title 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...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
editsarray
List of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.
idstring
The unique identifier (UUID) of the dive to edit

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

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

Readme

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

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.

Docker

Build and run the server with Streamable HTTP on port 8000 (defaults to an in-memory DuckDB):

docker build -t mcp-server-motherduck .
docker run --rm -p 8000:8000 mcp-server-motherduck

Connect to MotherDuck by passing a token and overriding the command:

docker run --rm -p 8000:8000 \
  -e motherduck_token="$MOTHERDUCK_TOKEN" \
  mcp-server-motherduck --transport http --db-path md:

The MCP endpoint is available at http://localhost:8000/mcp. CLI flags and env vars from below still apply.

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

Details

Repository
github.com/motherduckdb/mcp-server-motherduck
Categories
Databases, Monitoring & Observability, Data & Analytics
Package
mcp-server-motherduck
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related Databases MCP servers

View all
1domdomegg avatarAirtabledomdomegg/airtable-mcp-serverRead and write access to Airtable database schemas, tables, and records.447stars
2massive-com avatarMassive.commassive-com/mcp_massiveProvides access to Massive.com data via an MCP server with four composable tools and in-memory DataFrame storage for SQL queries and analytics.332stars
3thomasxm avatarCrowdsentinel Mcp Serverthomasxm/crowdsentinels-ai-mcpAI-powered threat hunting and incident response MCP server for Elasticsearch/OpenSearch0stars
4themotionmachine avatarOmniFocusthemotionmachine/omnifocus-mcpLet LLMs interface with your tasks and projects through the Model Context Protocol. Add, organize, and query your OmniFocus database with natural language comma200stars
5deadletterq avatarOpenNutritiondeadletterq/mcp-opennutritionMCP server providing access to the comprehensive OpenNutrition food database with 300,000+ food items, nutritional data, and barcode lookups181stars
6ktanaka101 avatarDuckDBktanaka101/mcp-server-duckdbA Model Context Protocol (MCP) server implementation for DuckDB, providing database interaction capabilities176stars