- Category: model context protocol
- Auth: DCR_OAUTH
- Composio-managed OAuth available? No
- Tools: 45
- Triggers: 0
- Slug:
MOTHERDUCK_MCP - Version: 00000000_00
Tools
Ask docs question
Ask docs question
Cancel flight run
Cancel flight run
MOTHERDUCK_MCP_CANCEL_FLIGHT_RUNCancel 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.Input Parameters
Create flight
Create flight
MOTHERDUCK_MCP_CREATE_FLIGHTCreate 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.Input Parameters
def main(): ...)SELECT * FROM md_access_tokens() to list available labels.Create guide
Create guide
MOTHERDUCK_MCP_CREATE_GUIDECreate 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.Input Parameters
Delete dive
Delete dive
Delete flight
Delete flight
Delete guide
Delete guide
Dive query
Dive query
Edit dive content
Edit dive content
MOTHERDUCK_MCP_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 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.Input Parameters
Edit flight source
Edit flight source
MOTHERDUCK_MCP_EDIT_FLIGHT_SOURCEEdit 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.Input Parameters
Edit guide content
Edit guide content
MOTHERDUCK_MCP_EDIT_GUIDE_CONTENTEdit 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.Input Parameters
Get dive guide
Get dive guide
MOTHERDUCK_MCP_GET_DIVE_GUIDELoad 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.Input Parameters
Get flight
Get flight
Get flight guide
Get flight guide
MOTHERDUCK_MCP_GET_FLIGHT_GUIDELoad 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.Get flight logs
Get flight logs
MOTHERDUCK_MCP_GET_FLIGHT_LOGSFetch 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.Input Parameters
order reads from.Get flight run
Get flight run
MOTHERDUCK_MCP_GET_FLIGHT_RUNFetch 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.Input Parameters
Get guide
Get guide
MOTHERDUCK_MCP_GET_GUIDELoad 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.Input Parameters
Get query guide
Get query guide
MOTHERDUCK_MCP_GET_QUERY_GUIDECall 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.Get short lived token
Get short lived token
MOTHERDUCK_MCP_GET_SHORT_LIVED_TOKENReturns a short-lived token and connection details for the MotherDuck database endpoint.List columns
List columns
List databases
List databases
List dives
List dives
MOTHERDUCK_MCP_LIST_DIVESList 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.Input Parameters
List flight runs
List flight runs
MOTHERDUCK_MCP_LIST_FLIGHT_RUNSList 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).Input Parameters
List flights
List flights
MOTHERDUCK_MCP_LIST_FLIGHTSList 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.Input Parameters
List flight versions
List flight versions
List guides
List guides
MOTHERDUCK_MCP_LIST_GUIDESBrowse 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).Input Parameters
List macros
List macros
List tables
List tables
List views
List views
Log dive viewer event
Log dive viewer event
Mint dive state reference
Mint dive state reference
MOTHERDUCK_MCP_MINT_DIVE_STATE_REFERENCEMint 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.Input Parameters
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.Query
Query
MOTHERDUCK_MCP_QUERYBefore 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.Input Parameters
Query rw
Query rw
MOTHERDUCK_MCP_QUERY_RWExecute a DuckDB SQL query that modifies data, schema, or connection state.RULES:- 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.
- 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.
- Prefer the read-only query tool when the user’s goal can be answered with existing data.
Input Parameters
Read dive
Read dive
MOTHERDUCK_MCP_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. The response includes the dive’s governance status (‘endorsed’, ‘ready’, ‘draft’, or ‘archived’); archived dives remain fully readable by id.Input Parameters
Run flight
Run flight
MOTHERDUCK_MCP_RUN_FLIGHTTrigger 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.Input Parameters
Save dive
Save dive
Search catalog
Search catalog
MOTHERDUCK_MCP_SEARCH_CATALOGSearch 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).Input Parameters
Set guide access
Set guide access
Update dive
Update dive
Update flight
Update flight
MOTHERDUCK_MCP_UPDATE_FLIGHTUpdate 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.Input Parameters
Update guide
Update guide
MOTHERDUCK_MCP_UPDATE_GUIDEAppend 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.Input Parameters
Update guide metadata
Update guide metadata
MOTHERDUCK_MCP_UPDATE_GUIDE_METADATAChange 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.Input Parameters
View dive
View dive
MOTHERDUCK_MCP_VIEW_DIVEOpen 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.Input Parameters
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.