MotherDuck MCP
motherduck_mcpExplore MotherDuck database schemas, query data, and manage Dives, Flights, and Guides through MotherDuck’s official hosted MCP server. Includes SQL writes, scheduled Python jobs, sharing, and deletion tools.
Acciones disponibles (45)
Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.
Ask docs questionMOTHERDUCK_MCP_ASK_DOCS_QUESTIONAcciónAsk a question about DuckDB or MotherDuck. Returns answers from official documentation.
MOTHERDUCK_MCP_ASK_DOCS_QUESTIONAcciónAsk a question about DuckDB or MotherDuck. Returns answers from official documentation.
Parámetros de entrada
questionstringObligatorioQuestion about DuckDB or MotherDuck
Parámetros de salida
Sin parámetros.
Cancel flight runMOTHERDUCK_MCP_CANCEL_FLIGHT_RUNAcciónCancel an in-flight run of a flight. Identified by the flight UUID and the sequential run number (from list_flight_runs). Returns `canceled: true` on a successful transition; calling on an already-terminal run or one that doesn't exist returns a tool error.
MOTHERDUCK_MCP_CANCEL_FLIGHT_RUNAcciónCancel an in-flight run of a flight. Identified by the flight UUID and the sequential run number (from list_flight_runs). Returns `canceled: true` on a successful transition; calling on an already-terminal run or one that doesn't exist returns a tool error.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
run_numberintegerObligatorioSequential run number to cancel
Parámetros de salida
Sin parámetros.
Create flightMOTHERDUCK_MCP_CREATE_FLIGHTAcciónCreate a new MotherDuck flight. Read the flight guide before you create your first flight. A flight is a Python entrypoint (`source_code`) plus an optional `requirements_txt` that runs on MotherDuck compute. Optionally provide an `access_token_name` so the flight can connect to MotherDuck at runtime; omit it to use the default MotherDuck Flights access token. Optionally provide a 5-field cron expression to run on a schedule, an optional `max_runtime_sec` to cap how long a run may take, and an optional `instance_type` (F4, F16 or F32) to pick the runner size. Use flights for ELT/ETL pipelines, loading external data into MotherDuck, refreshing materialized views, or any recurring Python job that reads/writes MotherDuck data.
MOTHERDUCK_MCP_CREATE_FLIGHTAcciónCreate a new MotherDuck flight. Read the flight guide before you create your first flight. A flight is a Python entrypoint (`source_code`) plus an optional `requirements_txt` that runs on MotherDuck compute. Optionally provide an `access_token_name` so the flight can connect to MotherDuck at runtime; omit it to use the default MotherDuck Flights access token. Optionally provide a 5-field cron expression to run on a schedule, an optional `max_runtime_sec` to cap how long a run may take, and an optional `instance_type` (F4, F16 or F32) to pick the runner size. Use flights for ELT/ETL pipelines, loading external data into MotherDuck, refreshing materialized views, or any recurring Python job that reads/writes MotherDuck data.
Parámetros de entrada
namestringObligatorioFlight name (used in UI and logs)
configobjectOptional non-secret key/value pairs made available as env vars
source_codestringObligatorioPython source for the flight entrypoint (a single-file script with a top-level `def main(): ...`)
instance_typestringenumOptional runner size, named after its memory in GB: F4, F16 or F32. Omit to use your plan's default. Sizes above your plan's cap are rejected.
F4F16F32schedule_cronstringOptional 5-field cron expression (UTC). Omit to create an on-demand-only flight.
max_runtime_secintegerOptional per-run timeout in seconds; 0 means no timeout. Omit to use your plan's default. Requests above your plan's cap are rejected.
requirements_txtstringOptional `requirements.txt` contents for pip install (one pinned package per line).
access_token_namestringOptional name of a MotherDuck access token label to use at runtime. Omit to use the default MotherDuck Flights access token. Run `SELECT * FROM md_access_tokens()` to list available labels.
flight_secret_namesstring[]Optional list of MotherDuck secret names made available as env vars
Parámetros de salida
Sin parámetros.
Create guideMOTHERDUCK_MCP_CREATE_GUIDEAcciónCreate a new guide — a markdown document that agents read to answer this org's data questions correctly (metric definitions, join/filter conventions, pitfalls). Group related guides with a lowercase kebab-case `topic` (e.g. 'revenue-billing' or 'core/metrics'); omit it for a guide without a topic. Visibility is controlled by `access`: 'user' (private, default) or 'organization' (org-wide, permission-gated). Personal dive/flight style guides belong under topic 'dives' / 'flights' with access 'user'. Attach `references` to the 1–5 objects the guide is authoritative about.
MOTHERDUCK_MCP_CREATE_GUIDEAcciónCreate a new guide — a markdown document that agents read to answer this org's data questions correctly (metric definitions, join/filter conventions, pitfalls). Group related guides with a lowercase kebab-case `topic` (e.g. 'revenue-billing' or 'core/metrics'); omit it for a guide without a topic. Visibility is controlled by `access`: 'user' (private, default) or 'organization' (org-wide, permission-gated). Personal dive/flight style guides belong under topic 'dives' / 'flights' with access 'user'. Attach `references` to the 1–5 objects the guide is authoritative about.
Parámetros de entrada
titlestringObligatorioHuman-readable title.
topicstringSlash-separated grouping label, e.g. 'revenue-billing' or 'core/metrics' (no leading/trailing slash). Omit for no topic.
accessstringenum'user' (private, default) or 'organization' (org-wide, permission-gated).
userorganizationcontentstringObligatorioThe full markdown body.
referencesobject[]Structured references to the objects this guide explains.
descriptionstringShort one-line summary shown in the index.
external_idstringOptional caller-provided id for this version (e.g. a git SHA).
change_commentstringOptional note describing this initial version.
Parámetros de salida
Sin parámetros.
Delete diveMOTHERDUCK_MCP_DELETE_DIVEAcciónDelete a dive by ID. This action is permanent and cannot be undone.
MOTHERDUCK_MCP_DELETE_DIVEAcciónDelete a dive by ID. This action is permanent and cannot be undone.
Parámetros de entrada
idstringObligatoriouuidThe unique identifier of the dive to delete
Parámetros de salida
Sin parámetros.
Delete flightMOTHERDUCK_MCP_DELETE_FLIGHTAcciónPermanently delete a flight, its versions, schedule, and run history. This action cannot be undone.
MOTHERDUCK_MCP_DELETE_FLIGHTAcciónPermanently delete a flight, its versions, schedule, and run history. This action cannot be undone.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
Parámetros de salida
Sin parámetros.
Delete guideMOTHERDUCK_MCP_DELETE_GUIDEAcciónSoft-delete a guide while preserving its version history. Identify it by `uuid`.
MOTHERDUCK_MCP_DELETE_GUIDEAcciónSoft-delete a guide while preserving its version history. Identify it by `uuid`.
Parámetros de entrada
uuidstringObligatorioThe guide's UUID, as returned by list_guides or a previous mutation.
Parámetros de salida
Sin parámetros.
Dive queryMOTHERDUCK_MCP_DIVE_QUERYAcciónExecute a read-only DuckDB query on behalf of a dive. This tool is used by the dive viewer and is not intended for direct use by the AI assistant.
MOTHERDUCK_MCP_DIVE_QUERYAcciónExecute a read-only DuckDB query on behalf of a dive. This tool is used by the dive viewer and is not intended for direct use by the AI assistant.
Parámetros de entrada
sqlstringObligatorioSQL query to execute
dive_idstringuuidDive UUID for fallback query attribution
databasestringDatabase name to query
Parámetros de salida
Sin parámetros.
Edit dive contentMOTHERDUCK_MCP_EDIT_DIVE_CONTENTAcciónEdit 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 persists. Example: {id: '...', edits: [{old_string: 'foo', new_string: 'bar'}]}. old_string must be unique unless replace_all is true. No prior read_dive call is needed.
MOTHERDUCK_MCP_EDIT_DIVE_CONTENTAcciónEdit 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 persists. Example: {id: '...', edits: [{old_string: 'foo', new_string: 'bar'}]}. old_string must be unique unless replace_all is true. No prior read_dive call is needed.
Parámetros de entrada
idstringObligatoriouuidThe unique identifier (UUID) of the dive to edit
editsobject[]ObligatorioList of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.
Parámetros de salida
Sin parámetros.
Edit flight sourceMOTHERDUCK_MCP_EDIT_FLIGHT_SOURCEAcciónEdit a flight's source_code by applying one or more text replacements, then save as a new FlightVersion. Accepts `id` (flight UUID) and `edits` (an array of {old_string, new_string, replace_all?} objects). Reads the current source_code, applies edits in sequence, validates, and persists. Example: {id: '...', edits: [{old_string: 'foo', new_string: 'bar'}]}. old_string must be unique unless replace_all is true. No prior get_flight call is needed.
MOTHERDUCK_MCP_EDIT_FLIGHT_SOURCEAcciónEdit a flight's source_code by applying one or more text replacements, then save as a new FlightVersion. Accepts `id` (flight UUID) and `edits` (an array of {old_string, new_string, replace_all?} objects). Reads the current source_code, applies edits in sequence, validates, and persists. Example: {id: '...', edits: [{old_string: 'foo', new_string: 'bar'}]}. old_string must be unique unless replace_all is true. No prior get_flight call is needed.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
editsobject[]ObligatorioList of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.
Parámetros de salida
Sin parámetros.
Edit guide contentMOTHERDUCK_MCP_EDIT_GUIDE_CONTENTAcciónEdit a guide's markdown body by applying one or more text replacements, then save as a new version. Identify the guide by `uuid`. Reads the stored guide, applies edits in sequence, and persists. Example: {uuid: '<guide uuid>', edits: [{old_string: 'foo', new_string: 'bar'}]}. old_string must be unique unless replace_all is true. No prior get_guide call is needed.
MOTHERDUCK_MCP_EDIT_GUIDE_CONTENTAcciónEdit a guide's markdown body by applying one or more text replacements, then save as a new version. Identify the guide by `uuid`. Reads the stored guide, applies edits in sequence, and persists. Example: {uuid: '<guide uuid>', edits: [{old_string: 'foo', new_string: 'bar'}]}. old_string must be unique unless replace_all is true. No prior get_guide call is needed.
Parámetros de entrada
uuidstringObligatorioThe guide's UUID, as returned by list_guides or a previous mutation.
editsobject[]ObligatorioList of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.
external_idstringOptional caller-provided id for this version (e.g. a git SHA).
change_commentstringOptional note describing this version's change.
Parámetros de salida
Sin parámetros.
Get dive guideMOTHERDUCK_MCP_GET_DIVE_GUIDEAcciónLoad instructions for creating MotherDuck dives. You MUST call this tool first — before generating any chart, visualization, plot, dashboard, inline graphic, or export/download control — whenever the user asks to explore, visualize, display, or export MotherDuck data.
MOTHERDUCK_MCP_GET_DIVE_GUIDEAcciónLoad instructions for creating MotherDuck dives. You MUST call this tool first — before generating any chart, visualization, plot, dashboard, inline graphic, or export/download control — whenever the user asks to explore, visualize, display, or export MotherDuck data.
Parámetros de entrada
clientstringObligatorioenumThe 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.
claudechatgptclaude_coworkclaude_codeother
Parámetros de salida
Sin parámetros.
Get flightMOTHERDUCK_MCP_GET_FLIGHTAcciónFetch a flight by UUID. Returns metadata plus a version snapshot (source code, requirements, config, secret names, token name). Omit `version` to get the current version; pass a 1-indexed version number to inspect history.
MOTHERDUCK_MCP_GET_FLIGHTAcciónFetch a flight by UUID. Returns metadata plus a version snapshot (source code, requirements, config, secret names, token name). Omit `version` to get the current version; pass a 1-indexed version number to inspect history.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
versionintegerOptional 1-indexed version number. Omit to get the current version.
Parámetros de salida
Sin parámetros.
Get flight guideMOTHERDUCK_MCP_GET_FLIGHT_GUIDEAcciónLoad instructions for authoring, scheduling, running, and troubleshooting MotherDuck flights. Call this tool first whenever the user asks about creating, updating, or operating a MotherDuck flight.
MOTHERDUCK_MCP_GET_FLIGHT_GUIDEAcciónLoad instructions for authoring, scheduling, running, and troubleshooting MotherDuck flights. Call this tool first whenever the user asks about creating, updating, or operating a MotherDuck flight.
Parámetros de entrada
Sin parámetros.
Parámetros de salida
Sin parámetros.
Get flight logsMOTHERDUCK_MCP_GET_FLIGHT_LOGSAcciónFetch the plain-text logs (stdout + stderr) of a flight run plus the matching `Run` record (status, exit_code, timing). Returns the last 200 lines by default; page with `limit`, `offset` and `order`. Pass `max_bytes` to cap the response size — the response is truncated to fit and the truncation is reported via `truncated: true`.
MOTHERDUCK_MCP_GET_FLIGHT_LOGSAcciónFetch the plain-text logs (stdout + stderr) of a flight run plus the matching `Run` record (status, exit_code, timing). Returns the last 200 lines by default; page with `limit`, `offset` and `order`. Pass `max_bytes` to cap the response size — the response is truncated to fit and the truncation is reported via `truncated: true`.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
limitintegerMax log lines to return (default: 200)
orderstringenum'asc' reads from the first log line, 'desc' from the last (default: 'desc')
ascdescoffsetintegerNumber of lines to skip, counted from the end `order` reads from
max_bytesintegerOptional max bytes of logs to return; the response is truncated to fit, keeping the end `order` reads from.
run_numberintegerObligatorioSequential run number
Parámetros de salida
Sin parámetros.
Get flight runMOTHERDUCK_MCP_GET_FLIGHT_RUNAcciónFetch a single run of a flight by its sequential run number (from list_flight_runs). Returns the same shape as a list_flight_runs entry: status (PENDING/RUNNING/SUCCEEDED/FAILED/CANCELLED), timing metadata, and the effective `config` the run executed with. Use this to poll one run's status instead of re-listing.
MOTHERDUCK_MCP_GET_FLIGHT_RUNAcciónFetch a single run of a flight by its sequential run number (from list_flight_runs). Returns the same shape as a list_flight_runs entry: status (PENDING/RUNNING/SUCCEEDED/FAILED/CANCELLED), timing metadata, and the effective `config` the run executed with. Use this to poll one run's status instead of re-listing.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
run_numberintegerObligatorioSequential run number to fetch
Parámetros de salida
Sin parámetros.
Get guideMOTHERDUCK_MCP_GET_GUIDEAcciónLoad a guide by uuid. Guides are curated markdown documents about this organization's data (metric definitions, conventions, pitfalls). Find a guide's uuid with `list_guides` or via `get_query_guide` (start there before writing SQL), `get_dive_guide`, or `get_flight_guide`.
MOTHERDUCK_MCP_GET_GUIDEAcciónLoad a guide by uuid. Guides are curated markdown documents about this organization's data (metric definitions, conventions, pitfalls). Find a guide's uuid with `list_guides` or via `get_query_guide` (start there before writing SQL), `get_dive_guide`, or `get_flight_guide`.
Parámetros de entrada
uuidstringObligatorioThe guide's UUID, as returned by list_guides or a previous mutation.
versionintegerOptional version number to read; defaults to the current version.
Parámetros de salida
Sin parámetros.
Get query guideMOTHERDUCK_MCP_GET_QUERY_GUIDEAcciónCall this before writing SQL to answer a data question. Returns this organization's query guidance: what guides exist (curated markdown documents about the data — metric definitions, join/filter conventions, pitfalls), how to navigate them, and an overview of the available guide topics.
MOTHERDUCK_MCP_GET_QUERY_GUIDEAcciónCall this before writing SQL to answer a data question. Returns this organization's query guidance: what guides exist (curated markdown documents about the data — metric definitions, join/filter conventions, pitfalls), how to navigate them, and an overview of the available guide topics.
Parámetros de entrada
Sin parámetros.
Parámetros de salida
Sin parámetros.
Get short lived tokenMOTHERDUCK_MCP_GET_SHORT_LIVED_TOKENAcciónReturns a short-lived token and connection details for the MotherDuck database endpoint.
MOTHERDUCK_MCP_GET_SHORT_LIVED_TOKENAcciónReturns a short-lived token and connection details for the MotherDuck database endpoint.
Parámetros de entrada
Sin parámetros.
Parámetros de salida
Sin parámetros.
List columnsMOTHERDUCK_MCP_LIST_COLUMNSAcciónList all columns of a table or view with their types and comments.
MOTHERDUCK_MCP_LIST_COLUMNSAcciónList all columns of a table or view with their types and comments.
Parámetros de entrada
limitintegerMax results to return (default: 100)
tablestringObligatorioTable or view name
schemastringSchema name (optional, defaults to 'main')
databasestringObligatorioDatabase name
Parámetros de salida
Sin parámetros.
List databasesMOTHERDUCK_MCP_LIST_DATABASESAcciónList all databases in your MotherDuck account. Shows each database's alias, type, and its `url` — a fully qualified MotherDuck database name (e.g. `md:my_db`) or share URL (e.g. in guide references). Optionally filter by keywords.
MOTHERDUCK_MCP_LIST_DATABASESAcciónList all databases in your MotherDuck account. Shows each database's alias, type, and its `url` — a fully qualified MotherDuck database name (e.g. `md:my_db`) or share URL (e.g. in guide references). Optionally filter by keywords.
Parámetros de entrada
limitintegerMax results to return (default: 100)
keywordsstringOptional keywords to filter databases by name (case-insensitive, any word can match)
Parámetros de salida
Sin parámetros.
List divesMOTHERDUCK_MCP_LIST_DIVESAcciónList all dives in MotherDuck. Dives are interactive React data apps that query live data. Returns metadata including current_version and status. Each dive has a governance status: 'endorsed' (admin-approved org source of truth — prefer these), 'ready' (author-reviewed), 'draft' (work in progress; the default for new dives), or 'archived' (retired; excluded unless include_archived is true). Results are ordered endorsed, ready, draft, then archived, most recently updated first. Use read_dive with the optional version parameter to retrieve a specific historical version. Optionally filter by keywords.
MOTHERDUCK_MCP_LIST_DIVESAcciónList all dives in MotherDuck. Dives are interactive React data apps that query live data. Returns metadata including current_version and status. Each dive has a governance status: 'endorsed' (admin-approved org source of truth — prefer these), 'ready' (author-reviewed), 'draft' (work in progress; the default for new dives), or 'archived' (retired; excluded unless include_archived is true). Results are ordered endorsed, ready, draft, then archived, most recently updated first. Use read_dive with the optional version parameter to retrieve a specific historical version. Optionally filter by keywords.
Parámetros de entrada
limitintegerMax results to return (default: 100)
keywordsstringOptional keywords to filter dives by title or description (case-insensitive, all words must match)
include_archivedbooleanInclude archived Dives in the results. Defaults to false. Archived Dives remain readable via read_dive by id.
include_org_sharesbooleanInclude Dives shared with your organization. Defaults to false.
Parámetros de salida
Sin parámetros.
List flight runsMOTHERDUCK_MCP_LIST_FLIGHT_RUNSAcciónList executions of a flight, newest first. Each run has a sequential number, status (PENDING/RUNNING/SUCCEEDED/FAILED/CANCELLED), timing metadata, and the effective `config` it ran with (the flight version's config merged with any per-run overrides).
MOTHERDUCK_MCP_LIST_FLIGHT_RUNSAcciónList executions of a flight, newest first. Each run has a sequential number, status (PENDING/RUNNING/SUCCEEDED/FAILED/CANCELLED), timing metadata, and the effective `config` it ran with (the flight version's config merged with any per-run overrides).
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
limitintegerMax results (default: 50)
offsetintegerNumber of runs to skip, for paging back through history
Parámetros de salida
Sin parámetros.
List flightsMOTHERDUCK_MCP_LIST_FLIGHTSAcciónList MotherDuck flights. Org admins see every flight in their organization (with `owner_name` identifying whose is whose); everyone else sees only their own. Returns metadata for each flight including schedule and current version. Optionally filter by keywords matching the flight name.
MOTHERDUCK_MCP_LIST_FLIGHTSAcciónList MotherDuck flights. Org admins see every flight in their organization (with `owner_name` identifying whose is whose); everyone else sees only their own. Returns metadata for each flight including schedule and current version. Optionally filter by keywords matching the flight name.
Parámetros de entrada
limitintegerMax results to return (default: 50)
offsetintegerNumber of flights to skip, for paging through results
keywordsstringOptional keywords to filter by flight name (case-insensitive, all words must match). Filters within the page selected by limit/offset, not across every flight.
owner_onlybooleanRestrict the listing to flights you own. Only meaningful for org admins, who see the whole org's flights by default; ignored for everyone else.
Parámetros de salida
Sin parámetros.
List flight versionsMOTHERDUCK_MCP_LIST_FLIGHT_VERSIONSAcciónList the immutable versions of a flight, newest first. Each update to source_code / requirements_txt / config / access_token_name / flight_secret_names produces a new version.
MOTHERDUCK_MCP_LIST_FLIGHT_VERSIONSAcciónList the immutable versions of a flight, newest first. Each update to source_code / requirements_txt / config / access_token_name / flight_secret_names produces a new version.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
limitintegerMax results (default: 50)
offsetintegerNumber of versions to skip, for paging back through history
Parámetros de salida
Sin parámetros.
List guidesMOTHERDUCK_MCP_LIST_GUIDESAcciónBrowse this organization's curated guides — markdown documents that capture organization and personal context about the data in MotherDuck. Called with no arguments, lists the root level: guides without topics plus every topic (folder) with its guide count. Pass `topic` to open a folder — you get the guides stored at that topic and the nested topics below it. Read a guide in full with `get_guide(uuid)`.
MOTHERDUCK_MCP_LIST_GUIDESAcciónBrowse this organization's curated guides — markdown documents that capture organization and personal context about the data in MotherDuck. Called with no arguments, lists the root level: guides without topics plus every topic (folder) with its guide count. Pass `topic` to open a folder — you get the guides stored at that topic and the nested topics below it. Read a guide in full with `get_guide(uuid)`.
Parámetros de entrada
topicstringOpen this folder, e.g. 'revenue-billing' or 'core/metrics' (no leading/trailing slash). Omit for the root level.
Parámetros de salida
Sin parámetros.
List macrosMOTHERDUCK_MCP_LIST_MACROSAcciónList all macros (table and scalar macros) in a MotherDuck database, with their schema and parameters. Optionally filter by schema or keywords.
MOTHERDUCK_MCP_LIST_MACROSAcciónList all macros (table and scalar macros) in a MotherDuck database, with their schema and parameters. Optionally filter by schema or keywords.
Parámetros de entrada
limitintegerMax results to return (default: 100)
schemastringSchema name (optional, defaults to all schemas)
databasestringObligatorioDatabase name to list macros from
keywordsstringOptional keywords to filter macros by name (case-insensitive, any word can match)
Parámetros de salida
Sin parámetros.
List sharesMOTHERDUCK_MCP_LIST_SHARESAcciónList 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.
MOTHERDUCK_MCP_LIST_SHARESAcciónList 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.
Parámetros de entrada
limitintegerMax results to return (default: 100)
keywordsstringOptional keywords to filter shares by name (case-insensitive, any word can match)
Parámetros de salida
Sin parámetros.
List tablesMOTHERDUCK_MCP_LIST_TABLESAcciónList all tables and views in a MotherDuck database with comments. Optionally filter by keywords. Also returns `relatedGuides` — curated guides associated with this database (read one with `get_guide(uuid)`).
MOTHERDUCK_MCP_LIST_TABLESAcciónList all tables and views in a MotherDuck database with comments. Optionally filter by keywords. Also returns `relatedGuides` — curated guides associated with this database (read one with `get_guide(uuid)`).
Parámetros de entrada
limitintegerMax results to return (default: 100)
schemastringSchema name (optional, defaults to all schemas)
databasestringObligatorioDatabase name to list tables from
keywordsstringOptional keywords to filter tables/views by name or comment (case-insensitive, any word can match)
Parámetros de salida
Sin parámetros.
List viewsMOTHERDUCK_MCP_LIST_VIEWSAcciónList all views in a MotherDuck database, with their schema, comment, and column count. Optionally filter by schema or keywords.
MOTHERDUCK_MCP_LIST_VIEWSAcciónList all views in a MotherDuck database, with their schema, comment, and column count. Optionally filter by schema or keywords.
Parámetros de entrada
limitintegerMax results to return (default: 100)
schemastringSchema name (optional, defaults to all schemas)
databasestringObligatorioDatabase name to list views from
keywordsstringOptional keywords to filter views by name or comment (case-insensitive, any word can match)
Parámetros de salida
Sin parámetros.
Log dive viewer eventMOTHERDUCK_MCP_LOG_DIVE_VIEWER_EVENTAcciónLog a dive viewer event for analytics. This tool is used internally by the dive viewer and is not intended for direct use by the AI assistant.
MOTHERDUCK_MCP_LOG_DIVE_VIEWER_EVENTAcciónLog a dive viewer event for analytics. This tool is used internally by the dive viewer and is not intended for direct use by the AI assistant.
Parámetros de entrada
stagestringProcessing stage (compile, execute, database_validation)
dive_idstringUUID of the dive
successbooleanWhether the action succeeded
to_modestringNew display mode
app_namestringName of the MCP app
from_modestringPrevious display mode
row_countnumberNumber of rows returned by query
event_namestringObligatorioName of the event
app_versionstringVersion of the MCP app
duration_msnumberDuration in milliseconds
sql_previewstringTruncated SQL query text (first 200 chars)
error_messagestringError message if failed
Parámetros de salida
Sin parámetros.
Mint dive state referenceMOTHERDUCK_MCP_MINT_DIVE_STATE_REFERENCEAcciónMint a server-stored reference for a `useDiveState` bag and return its id. Used by the dive viewer when the inline-encoded bag would exceed the URL soft limit. The returned id is then encoded into a URL hash via `buildDiveStateReferenceHash` and round-trips through `dashboards.get` on dive open.
MOTHERDUCK_MCP_MINT_DIVE_STATE_REFERENCEAcciónMint a server-stored reference for a `useDiveState` bag and return its id. Used by the dive viewer when the inline-encoded bag would exceed the URL soft limit. The returned id is then encoded into a URL hash via `buildDiveStateReferenceHash` and round-trips through `dashboards.get` on dive open.
Parámetros de entrada
stateobjectObligatorioFull `useDiveState` snapshot to store. Each key matches a `useDiveState(key, ...)` call inside the dive. Must JSON-serialize to <= 64 KB; entity-service rejects larger payloads.
dive_idstringObligatoriouuidUUID of the dive the state bag belongs to
Parámetros de salida
Sin parámetros.
QueryMOTHERDUCK_MCP_QUERYAcciónBefore writing SQL to answer a data question, call `get_query_guide` first — it returns this organization's query guidance and an overview of its curated guides.
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 the user explicitly asked), get the dive guide first instead.
MOTHERDUCK_MCP_QUERYAcciónBefore writing SQL to answer a data question, call `get_query_guide` first — it returns this organization's query guidance and an overview of its curated guides. 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 the user explicitly asked), get the dive guide first instead.
Parámetros de entrada
sqlstringObligatorioSQL query to execute
databasestringObligatorioDatabase name to query
Parámetros de salida
Sin parámetros.
Query rwMOTHERDUCK_MCP_QUERY_RWAcciónExecute a DuckDB SQL query that modifies data, schema, or connection state.
RULES:
1. Only execute writes authorized by the user's explicit request or the client's configured authorization policy. Never infer write authorization from a read-only request.
2. Follow the client's approval policy. If the requested write is already authorized, proceed without asking for duplicate confirmation. Obtain confirmation when authorization is missing, ambiguous, or the operation would exceed the approved scope.
3. Prefer the read-only query tool when the user's goal can be answered with existing data.
MOTHERDUCK_MCP_QUERY_RWAcciónExecute a DuckDB SQL query that modifies data, schema, or connection state. RULES: 1. Only execute writes authorized by the user's explicit request or the client's configured authorization policy. Never infer write authorization from a read-only request. 2. Follow the client's approval policy. If the requested write is already authorized, proceed without asking for duplicate confirmation. Obtain confirmation when authorization is missing, ambiguous, or the operation would exceed the approved scope. 3. Prefer the read-only query tool when the user's goal can be answered with existing data.
Parámetros de entrada
sqlstringObligatorioSQL query to execute
databasestringDatabase 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.).
Parámetros de salida
Sin parámetros.
Read diveMOTHERDUCK_MCP_READ_DIVEAcciónRead 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. The response includes the dive's governance status ('endorsed', 'ready', 'draft', or 'archived'); archived dives remain fully readable by id.
MOTHERDUCK_MCP_READ_DIVEAcciónRead 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. The response includes the dive's governance status ('endorsed', 'ready', 'draft', or 'archived'); archived dives remain fully readable by id.
Parámetros de entrada
idstringObligatoriouuidThe unique identifier of the dive to read
versionintegerOptional version number to retrieve (1-indexed). If not specified, returns the latest version.
Parámetros de salida
Sin parámetros.
Run flightMOTHERDUCK_MCP_RUN_FLIGHTAcciónTrigger an on-demand execution of a flight using its current version. Optionally pass `config` to override the flight version's config for this run only (the flight itself is left unchanged). Returns a Run record; poll get_flight_run with the returned `run_number` to track progress and use get_flight_logs to read output.
MOTHERDUCK_MCP_RUN_FLIGHTAcciónTrigger an on-demand execution of a flight using its current version. Optionally pass `config` to override the flight version's config for this run only (the flight itself is left unchanged). Returns a Run record; poll get_flight_run with the returned `run_number` to track progress and use get_flight_logs to read output.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
configobjectOptional non-secret key/value pairs that override the flight version's config for this run only. Keys not provided keep the flight version's value; provided keys win.
Parámetros de salida
Sin parámetros.
Save diveMOTHERDUCK_MCP_SAVE_DIVEAcciónSave a new dive to MotherDuck. Returns a URL the user can click to view the dive. Get the 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.
MOTHERDUCK_MCP_SAVE_DIVEAcciónSave a new dive to MotherDuck. Returns a URL the user can click to view the dive. Get the 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.
Parámetros de entrada
titlestringObligatorioThe title of the dive
contentstringObligatorioThe JSX/React component code for the dive
descriptionstringA brief description of the dive
Parámetros de salida
Sin parámetros.
Search catalogMOTHERDUCK_MCP_SEARCH_CATALOGAcciónSearch the catalog for databases, schemas, tables, columns, and 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. Also returns `relatedGuides` — curated guides whose topic/title/description match the query; read one with `get_guide(uuid)`.
MOTHERDUCK_MCP_SEARCH_CATALOGAcciónSearch the catalog for databases, schemas, tables, columns, and 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. Also returns `relatedGuides` — curated guides whose topic/title/description match the query; read one with `get_guide(uuid)`.
Parámetros de entrada
querystringObligatorioSearch term to find in object names (supports partial matching, underscores, dots)
object_typesstring[]Optional filter to limit results to specific object types
Parámetros de salida
Sin parámetros.
Set guide accessMOTHERDUCK_MCP_SET_GUIDE_ACCESSAcciónSet a guide's visibility to 'user' (private to the owner) or 'organization' (visible to the whole org). Identify it by `uuid`. Org-wide scoping is permission-gated.
MOTHERDUCK_MCP_SET_GUIDE_ACCESSAcciónSet a guide's visibility to 'user' (private to the owner) or 'organization' (visible to the whole org). Identify it by `uuid`. Org-wide scoping is permission-gated.
Parámetros de entrada
uuidstringObligatorioThe guide's UUID, as returned by list_guides or a previous mutation.
accessstringObligatorioenum'user' (private) or 'organization' (org-wide, permission-gated).
userorganization
Parámetros de salida
Sin parámetros.
Share dive dataMOTHERDUCK_MCP_SHARE_DIVE_DATAAcciónShare 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.
MOTHERDUCK_MCP_SHARE_DIVE_DATAAcciónShare 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.
Parámetros de entrada
diveIdstringObligatoriouuidThe unique identifier (UUID) of the dive
Parámetros de salida
Sin parámetros.
Update diveMOTHERDUCK_MCP_UPDATE_DIVEAcciónUpdate 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.
MOTHERDUCK_MCP_UPDATE_DIVEAcciónUpdate 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.
Parámetros de entrada
idstringObligatoriouuidThe unique identifier (UUID) of the dive to update
titlestringNew title for the dive
contentstringNew JSX/React component code
descriptionstringNew description for the dive
Parámetros de salida
Sin parámetros.
Update flightMOTHERDUCK_MCP_UPDATE_FLIGHTAcciónUpdate a flight. Any subset of name, source_code, requirements_txt, schedule_cron, config, access_token_name, flight_secret_names, max_runtime_sec, or instance_type may be provided. Updates to source_code/requirements_txt/config/flight_secret_names/access_token_name/max_runtime_sec/instance_type create a new FlightVersion; name and schedule_cron are metadata-only. Pass schedule_cron as `""` (empty string) to remove the schedule; omit it to leave it unchanged.
MOTHERDUCK_MCP_UPDATE_FLIGHTAcciónUpdate a flight. Any subset of name, source_code, requirements_txt, schedule_cron, config, access_token_name, flight_secret_names, max_runtime_sec, or instance_type may be provided. Updates to source_code/requirements_txt/config/flight_secret_names/access_token_name/max_runtime_sec/instance_type create a new FlightVersion; name and schedule_cron are metadata-only. Pass schedule_cron as `""` (empty string) to remove the schedule; omit it to leave it unchanged.
Parámetros de entrada
idstringObligatoriouuidThe flight UUID
namestringNew flight name
configobjectReplacement config map (full replace)
source_codestringNew Python entrypoint source (single-file)
instance_typestringenumNew runner size, named after its memory in GB: F4, F16 or F32. Omit to leave it unchanged. Sizes above your plan's cap are rejected.
F4F16F32schedule_cronstringNew cron expression (UTC, 5 fields). Empty string clears the schedule.
max_runtime_secintegerNew per-run timeout in seconds; 0 means no timeout. Omit to leave it unchanged. Requests above your plan's cap are rejected.
requirements_txtstringNew requirements.txt contents
access_token_namestringNew MotherDuck access token label to use at runtime. Omit to leave the current token unchanged.
flight_secret_namesstring[]Replacement list of MotherDuck secret names (full replace)
Parámetros de salida
Sin parámetros.
Update guideMOTHERDUCK_MCP_UPDATE_GUIDEAcciónAppend a new version to an existing guide, identified by `uuid`. Omit `content` to keep the current text and just change metadata such as references. A supplied `references` list replaces the existing one (pass [] to clear them, omit to carry them forward). For small in-place edits use `edit_guide_content`. Use `create_guide` to make a new guide, `update_guide_metadata` to retitle or re-topic.
MOTHERDUCK_MCP_UPDATE_GUIDEAcciónAppend a new version to an existing guide, identified by `uuid`. Omit `content` to keep the current text and just change metadata such as references. A supplied `references` list replaces the existing one (pass [] to clear them, omit to carry them forward). For small in-place edits use `edit_guide_content`. Use `create_guide` to make a new guide, `update_guide_metadata` to retitle or re-topic.
Parámetros de entrada
uuidstringObligatorioThe guide's UUID, as returned by list_guides or a previous mutation.
contentstringNew full markdown body. Omit to carry the current version's content forward.
referencesobject[]Replaces the guide's references. Pass [] to clear; omit to carry them forward.
external_idstringOptional caller-provided id for this version (e.g. a git SHA).
change_commentstringOptional note describing this version's change.
Parámetros de salida
Sin parámetros.
Update guide metadataMOTHERDUCK_MCP_UPDATE_GUIDE_METADATAAcciónChange a guide's title, description, or topic without appending a content version. Identify it by `uuid`. Pass an empty `description` to clear it; pass an empty `topic` to remove the topic.
MOTHERDUCK_MCP_UPDATE_GUIDE_METADATAAcciónChange a guide's title, description, or topic without appending a content version. Identify it by `uuid`. Pass an empty `description` to clear it; pass an empty `topic` to remove the topic.
Parámetros de entrada
uuidstringObligatorioThe guide's UUID, as returned by list_guides or a previous mutation.
titlestringNew title.
topicstringNew grouping label, e.g. 'revenue-billing' or 'core/metrics' (no leading/trailing slash). Pass an empty string to remove the topic.
descriptionstringNew one-line summary. Pass an empty string to clear it.
Parámetros de salida
Sin parámetros.
View diveMOTHERDUCK_MCP_VIEW_DIVEAcciónOpen and render a MotherDuck Dive as a live MCP app with interactive charts. Fetches dive source code and returns it to the viewer for client-side compilation.
MOTHERDUCK_MCP_VIEW_DIVEAcciónOpen and render a MotherDuck Dive as a live MCP app with interactive charts. Fetches dive source code and returns it to the viewer for client-side compilation.
Parámetros de entrada
dive_idstringObligatoriouuidUUID of the dive to open
initial_stateobjectSeed the dive's initial UI state for this preview. When supplied, each key is read by the corresponding `useDiveState` call inside the dive. Useful when the user describes a specific view ("show me this filtered to last quarter") — pass that selection as initial_state instead of re-saving the dive. State stays in memory for the preview session; interactive changes do not round-trip back to the MCP host. Example shape: { "region": "us-east-1", "filters": ["alpha"], "count": 5 }. Do not use for ephemeral UI state (input drafts, dialog open/close) — those use plain useState inside the dive and aren't part of the dive-state bag.
required_resourcesobject[]Override the dive's declared required resources for this preview. When supplied, the dive viewer attaches this list in place of the dive's source-declared REQUIRED_DATABASES. Useful when the user wants to preview against a specific share or embed configuration ("render this against the customer's analytics database instead of mine"). Example shape: [{ "url": "md:customer_analytics", "alias": "analytics" }]. Do not use as a substitute for fixing the dive's source — if the dive should permanently target different databases, edit the source and update_dive instead.
Parámetros de salida
Sin parámetros.