The MotherDuck MCP connector routes your AI agent's tool calls to MotherDuck's own MCP server through Scalekit. Each user signs in to MotherDuck once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 50 tools.
- Tools
- 50
- What they doRead · write · destructive
- 27 · 20 · 327 read20 write3 destructive
- Users sign in with
- OAuth
- OAuth app
- Scalekit's or your own
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the MotherDuck MCP connection
In AgentKit > Connections, create a MotherDuck MCP connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Scalekit credentials are available for MotherDuck MCP server, so you don't need to register an OAuth app.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'motherduckmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize MotherDuck MCP:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'motherduckmcp_get_connection_info',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "motherduckmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize MotherDuck MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="motherduckmcp_get_connection_info",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolmotherduckmcp_ask_docs_questionQuery official DuckDB and MotherDuck documentation to answer questions about SQL syntax, features, and best practices.Read-onlyAsk Docs Question
Query official DuckDB and MotherDuck documentation to answer questions about SQL syntax, features, and best practices.
Inputs
questionstringrequired- Question about DuckDB or MotherDuck.
motherduckmcp_dive_queryExecute a read-only DuckDB SQL query on behalf of a Dive, attributed to the specified Dive UUID.Read-onlyDive Query
Execute a read-only DuckDB SQL query on behalf of a Dive, attributed to the specified Dive UUID. Used by the Dive viewer for query execution.
Inputs
sqlstringrequired- SQL query to execute
databasestring- Database name to query
dive_idstring- Dive UUID for fallback query attribution
motherduckmcp_get_connection_infoShow the MotherDuck user and organization this connection is signed in as: the user's name and email, and the organization's name and web app URL.Read-onlyGet Connection Info
Show the MotherDuck user and organization this connection is signed in as: the user's name and email, and the organization's name and web app URL. A user can belong to several organizations, and every tool call runs in this one. Call this when the user asks which account or organization they are connected to, or when data, dives or flights they expect are missing.
Inputs
This tool takes no inputs.
motherduckmcp_get_dive_guideRetrieve comprehensive instructions for creating MotherDuck Dives (interactive React data apps), tailored to the calling AI client.Read-onlyGet Dive Guide
Retrieve comprehensive instructions for creating MotherDuck Dives (interactive React data apps), tailored to the calling AI client.
Inputs
clientstringrequired- AI platform making the request.one of
claudechatgptclaude_coworkclaude_codeother
motherduckmcp_get_flightFetch a Flight's metadata and version snapshot by UUID, including source code, requirements, config, secret names, and token name.Read-onlyGet Flight
Fetch a Flight's metadata and version snapshot by UUID, including source code, requirements, config, secret names, and token name.
Inputs
idstringrequired- The flight UUID
content_limitinteger- Optional maximum number of content characters to return in this call. Values above the server-defined maximum are clamped to that maximum. Default and line-range reads stop at a complete line when possible; exceptionally long lines may be partial.
content_offsetinteger- Optional 0-indexed character offset into the content. Use next_content_offset from a truncated response to continue through very long or generated lines.
end_lineinteger- Optional 1-indexed last content line to return (inclusive). Requires start_line.
searchstring- Optional case-insensitive literal text to search for in the content. Returns matching lines with line numbers; cannot be combined with content_offset, start_line, or end_line.
start_lineinteger- Optional 1-indexed first content line to return. Use with end_line to read a focused range after a truncated response.
versioninteger- Optional 1-indexed version number. Omit to get the current version.
motherduckmcp_get_flight_guideRetrieve the authoritative guide for working with MotherDuck Flights (anatomy, config vs.Read-onlyGet Flight Guide
Retrieve the authoritative guide for working with MotherDuck Flights (anatomy, config vs. secrets, scheduling, run lifecycle, common failures). Call this first before using other Flight tools.
Inputs
This tool takes no inputs.
motherduckmcp_get_flight_logsFetch the plain-text logs (stdout + stderr) of a Flight run plus the matching Run record (status, exit_code, timing).Read-onlyGet Flight Run Logs
Fetch the plain-text logs (stdout + stderr) of a Flight run plus the matching Run record (status, exit_code, timing). Logs may be large; pass max_bytes to cap the response size — the response will be the tail when truncated.
Inputs
idstringrequired- The flight UUID
run_numberintegerrequired- Sequential run number
limitinteger- Max log lines to return (default: 200)default
200 max_bytesinteger- Optional max bytes of logs to return; the response is truncated to fit, keeping the end `order` reads from.default
50000 offsetinteger- Number of lines to skip, counted from the end `order` reads from
orderstring- 'asc' reads from the first log line, 'desc' from the last (default: 'desc')one of
ascdescdefaultdesc
motherduckmcp_get_flight_runFetch a single run of a flight by its sequential run number (from run_flight or list_flight_runs).Read-onlyGet Flight Run
Fetch a single run of a flight by its sequential run number (from run_flight or list_flight_runs). Returns its status (PENDING/RUNNING/SUCCEEDED/FAILED/CANCELLED), timing metadata, and the effective `config` the run executed with. Use this to poll a run's status.
Inputs
idstringrequired- The flight UUID
run_numberintegerrequired- Sequential run number to fetch
motherduckmcp_get_flight_viz_guideLoad the convention for making a MotherDuck flight's runs show up in the Flight Explainer, a live, step-by-step view with per-step timing.Read-onlyGet Flight Viz Guide
Load the convention for making a MotherDuck flight's runs show up in the Flight Explainer, a live, step-by-step view with per-step timing. Use section only for a narrow factual lookup already scoped to one part of the convention: 'chart' covers Mermaid declarations, node kinds and meters, labelled-edge syntax, and child-flight nodes; 'grammar' covers @flight-run/@flight-log events, fields, effects, JSON mode, rollups, runtime branch reporting, and taken-edge semantics; 'emitting' covers Python print and helper patterns; 'examples' provides an integrated worked flight. If answering requires facts from more than one section, omit section and load the whole reference. Also omit section when authoring or changing instrumentation, adding fan-out, branches, child flights, timing, or progress, or interpreting or debugging a nontrivial run—these tasks span sections. Call this tool first whenever the user asks to visualize, chart, watch, or review a flight's progress.
Inputs
sectionstring- For a narrow lookup, the single reference section to load: 'chart', 'grammar', 'emitting', or 'examples'. If the answer may require facts from more than one section, omit this parameter to load the whole guide.one of
chartgrammaremittingexamples
motherduckmcp_get_guideLoad a guide by uuid.Read-onlyGet Guide
Load 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, get_dive_guide, or get_flight_guide.
Inputs
uuidstringrequired- The guide's UUID, as returned by list_guides or a previous mutation.
content_limitinteger- Optional maximum number of content characters to return in this call. Values above the server-defined maximum are clamped to that maximum. Default and line-range reads stop at a complete line when possible; exceptionally long lines may be partial.
content_offsetinteger- Optional 0-indexed character offset into the content. Use next_content_offset from a truncated response to continue through very long or generated lines.
end_lineinteger- Optional 1-indexed last content line to return (inclusive). Requires start_line.
searchstring- Optional case-insensitive literal text to search for in the content. Returns matching lines with line numbers; cannot be combined with content_offset, start_line, or end_line.
start_lineinteger- Optional 1-indexed first content line to return. Use with end_line to read a focused range after a truncated response.
versioninteger- Optional version number to read; defaults to the current version.
motherduckmcp_get_query_guideCall this before writing SQL to answer a data question.Read-onlyGet Query Guide
Call this before writing SQL to answer a data question. Returns this organization's query guidance: what guides exist (curated markdown documents about the data), how to navigate them, and an overview of the available guide topics.
Inputs
This tool takes no inputs.
motherduckmcp_get_short_lived_tokenReturns a short-lived token and connection details for the MotherDuck database endpoint.Read-onlyGet Short-Lived Token
Returns a short-lived token and connection details for the MotherDuck database endpoint. Use this to obtain temporary credentials for direct database access.
Inputs
This tool takes no inputs.
motherduckmcp_list_columnsList all columns of a table or view with data types, nullability, and comments.Read-onlyList Columns
List all columns of a table or view with data types, nullability, and comments.
Inputs
databasestringrequired- Database name
tablestringrequired- Table or view name
limitinteger- Max results to return (default: 100)
schemastring- Schema name (optional, defaults to 'main')
motherduckmcp_list_databasesRetrieve all databases accessible to the MotherDuck account, including owned databases and attached shared databases.Read-onlyList Databases
Retrieve all databases accessible to the MotherDuck account, including owned databases and attached shared databases.
Inputs
keywordsstring- Optional keywords to filter databases by name (case-insensitive, any word can match)
limitinteger- Max results to return (default: 100)
motherduckmcp_list_divesReturn all Dives owned in the MotherDuck workspace, including metadata like version history and timestamps.Read-onlyList Dives
Return all Dives owned in the MotherDuck workspace, including metadata like version history and timestamps. Optionally filter by keywords.
Inputs
include_archivedboolean- Include archived Dives in the results. Defaults to false. Archived Dives remain readable via read_dive by id.
include_org_sharesboolean- Include Dives shared with you, by the organization, a role or directly. Defaults to false.
keywordsstring- Optional keywords to filter dives by title or description (case-insensitive, all words must match)
limitinteger- Max results to return (default: 100)
motherduckmcp_list_flight_runsRetrieve the execution history of a Flight (newest first), including run number, status, timing, and effective config.Read-onlyList Flight Runs
Retrieve the execution history of a Flight (newest first), including run number, status, timing, and effective config.
Inputs
idstringrequired- The flight UUID
limitinteger- Max results (default: 50)default
50 offsetinteger- Number of runs to skip, for paging back through history
motherduckmcp_list_flight_versionsRetrieve the complete version history of a Flight (newest first), enabling change tracking between versions.Read-onlyList Flight Versions
Retrieve the complete version history of a Flight (newest first), enabling change tracking between versions.
Inputs
idstringrequired- The flight UUID
limitinteger- Max results (default: 50)default
50 offsetinteger- Number of versions to skip, for paging back through history
motherduckmcp_list_flightsList all Flights owned by the caller with summary metadata (UUID, name, schedule, status, current version).Read-onlyList Flights
List all Flights owned by the caller with summary metadata (UUID, name, schedule, status, current version). Optionally filter by keyword.
Inputs
keywordsstring- Optional keywords to filter by flight name (case-insensitive, all words must match). Filters within the page selected by limit/offset, not across every flight.
limitinteger- Max results to return (default: 50)default
50 offsetinteger- Number of flights to skip, for paging through results
owner_onlyboolean- Restrict the listing to flights you own. Only meaningful for org admins, who see the whole org's flights by default; ignored for everyone else.
motherduckmcp_list_guidesBrowse this organization's curated guides — markdown documents that capture organization and personal context about the data in MotherDuck.Read-onlyList Guides
Browse 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. Read a guide in full with get_guide(uuid).
Inputs
topicstring- Open this folder, e.g. 'revenue-billing' or 'core/metrics' (no leading/trailing slash). Omit for the root level.
motherduckmcp_list_macrosList all macros (table and scalar macros) in a MotherDuck database, with their schema and parameters.Read-onlyList Macros
List all macros (table and scalar macros) in a MotherDuck database, with their schema and parameters. Optionally filter by schema or keywords.
Inputs
databasestringrequired- Database name to list macros from
keywordsstring- Optional keywords to filter macros by name (case-insensitive, any word can match)
limitinteger- Max results to return (default: 100)
schemastring- Schema name (optional, defaults to all schemas)
motherduckmcp_list_tablesList all tables and views in a MotherDuck database, including schema, type (table or view), and any comments.Read-onlyList Tables
List all tables and views in a MotherDuck database, including schema, type (table or view), and any comments.
Inputs
databasestringrequired- 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)
motherduckmcp_list_viewsList all views in a MotherDuck database, with their schema, comment, and column count.Read-onlyList Views
List all views in a MotherDuck database, with their schema, comment, and column count. Optionally filter by schema or keywords.
Inputs
databasestringrequired- Database name to list views from
keywordsstring- Optional keywords to filter 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)
motherduckmcp_queryExecute read-only SQL queries against MotherDuck databases using DuckDB SQL syntax.Read-onlyQuery
Execute read-only SQL queries against MotherDuck databases using DuckDB SQL syntax. Cross-database queries are supported via fully qualified names. Results are capped at 2,048 rows and 50,000 characters. Timeout is 55 seconds.
Inputs
databasestringrequired- Database name to query.
sqlstringrequired- DuckDB SQL statement (read-only; mutation statements are rejected).
motherduckmcp_read_diveRetrieve a Dive's complete details including title, description, timestamps, and full React component source code.Read-onlyRead Dive
Retrieve a Dive's complete details including title, description, timestamps, and full React component source code.
Inputs
idstringrequired- The unique identifier of the dive to read
content_limitinteger- Optional maximum number of content characters to return in this call. Values above the server-defined maximum are clamped to that maximum. Default and line-range reads stop at a complete line when possible; exceptionally long lines may be partial.
content_offsetinteger- Optional 0-indexed character offset into the content. Use next_content_offset from a truncated response to continue through very long or generated lines.
end_lineinteger- Optional 1-indexed last content line to return (inclusive). Requires start_line.
searchstring- Optional case-insensitive literal text to search for in the content. Returns matching lines with line numbers; cannot be combined with content_offset, start_line, or end_line.
start_lineinteger- Optional 1-indexed first content line to return. Use with end_line to read a focused range after a truncated response.
versioninteger- Optional version number to retrieve (1-indexed). If not specified, returns the latest version.
motherduckmcp_search_catalogFuzzy search across the MotherDuck catalog (databases, schemas, tables, columns, shares) using Jaro-Winkler similarity scoring.Read-onlySearch Catalog
Fuzzy search across the MotherDuck catalog (databases, schemas, tables, columns, shares) using Jaro-Winkler similarity scoring. Results are ranked by relevance.
Inputs
querystringrequired- Search term; supports partial matching, underscores, dots.
object_typesarray- Filter to specific object types. If omitted, searches all types.
motherduckmcp_view_diveRender a MotherDuck Dive as a live, interactive MCP app inside the host client.Read-onlyView Dive
Render a MotherDuck Dive as a live, interactive MCP app inside the host client.
Inputs
dive_idstringrequired- UUID of the dive to open
initial_stateobject- Seed 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_resourcesarray- 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.
motherduckmcp_cancel_flight_runCancel an in-progress Flight run.WriteCancel Flight Run
Cancel an in-progress Flight run. Returns an error if the run is already in a terminal state.
Inputs
idstringrequired- The flight UUID
run_numberintegerrequired- Sequential run number to cancel
motherduckmcp_create_flightCreate a new Flight — a Python entrypoint with optional dependencies that executes on MotherDuck compute.WriteCreate Flight
Create a new Flight — a Python entrypoint with optional dependencies that executes on MotherDuck compute. Supports optional cron scheduling.
Inputs
namestringrequired- Flight name (used in UI and logs)
source_codestringrequired- Python source for the flight entrypoint (a single-file script with a top-level `def main(): ...`)
access_token_namestring- Optional 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.
configobject- Optional non-secret key/value pairs made available as env vars
flight_secret_namesarray- Optional list of MotherDuck secret names made available as env vars
instance_typestring- Optional 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.one of
F4F16F32 max_runtime_secinteger- Optional per-run timeout in seconds; 0 means no timeout. Omit to use your plan's default. Requests above your plan's cap are rejected.
metadataobject- Flight control metadata. Only the "chart" key is currently supported.
requirements_txtstring- Optional `requirements.txt` contents for pip install (one pinned package per line).
schedule_cronstring- Optional 5-field cron expression (UTC). Omit to create an on-demand-only flight.
motherduckmcp_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).WriteCreate Guide
Create 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). Attach references to the 1-5 objects the guide is authoritative about.
Inputs
contentstringrequired- The full markdown body.
titlestringrequired- Human-readable title.
accessstring- 'user' (private, default) or 'organization' (org-wide, permission-gated).one of
userorganization change_commentstring- Optional note describing this initial version.
descriptionstring- Short one-line summary shown in the index.
external_idstring- Optional caller-provided id for this version (e.g. a git SHA).
referencesarray- Structured references to the objects this guide explains.
topicstring- Slash-separated grouping label, e.g. 'revenue-billing' or 'core/metrics' (no leading/trailing slash). Omit for no topic.
motherduckmcp_edit_dive_contentEdit a Dive's content by applying one or more text replacements and saving to MotherDuck.WriteEdit Dive Content
Edit a Dive's content by applying one or more text replacements and saving to MotherDuck. Reads current content, applies edits in sequence, validates, and persists. No prior read_dive call is needed.
Inputs
editsarrayrequired- List of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.
idstringrequired- The unique identifier (UUID) of the dive to edit
motherduckmcp_edit_flight_sourceEdit a Flight's source code through one or more find-and-replace operations, producing a new FlightVersion.WriteEdit Flight Source
Edit a Flight's source code through one or more find-and-replace operations, producing a new FlightVersion. Applies edits sequentially and validates the result.
Inputs
editsarrayrequired- List of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.
idstringrequired- The flight UUID
motherduckmcp_edit_guide_contentEdit a guide's markdown body by applying one or more text replacements, then save as a new version.WriteEdit Guide Content
Edit 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. old_string must be unique unless replace_all is true. No prior get_guide call is needed.
Inputs
editsarrayrequired- List of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.
uuidstringrequired- The guide's UUID, as returned by list_guides or a previous mutation.
change_commentstring- Optional note describing this version's change.
external_idstring- Optional caller-provided id for this version (e.g. a git SHA).
motherduckmcp_grant_accessGrant a permission on one dive or flight to users, roles or the whole organization.WriteGrant Access
Grant a permission on one dive or flight to users, roles or the whole organization. Re-granting is a no-op. Only an object's owner (or an admin) can share it; only a flight's owner can grant 'run' on it. An object you can't change is reported as not found, so 'Could not find Dive' can mean you lack permission rather than a wrong id. Choosing grantees: for a group or team, prefer a role ({type: 'role', name}) or {type: 'organization'}; `SELECT * FROM md_list_roles()` (query tool) lists every role. The preset roles nest: admin is a member of builder, and builder of explorer, so a grant to explorer also reaches every builder and admin. A user grantee needs the username, not the email. `SELECT member_name FROM md_list_role_members('<role>') WHERE member_type = 'user' AND email = '<email>'` (query tool) finds someone's username; without the email filter it lists the role's users. Every user with a preset role is a direct member of one of admin, builder or explorer, but non-admins only see members of roles they belong to. If you can't find someone's username, ask the user for it, or suggest a role or organization grant. Never guess a username. Sharing a dive doesn't share its data: viewers still need access to the dive's databases, which the dive's owner can share with share_dive_data. Nor does it let them run the dive's flights: each flight in its useRunFlight calls needs its own 'run' grant. Grant 'run' only after the user confirms; a request to share the dive doesn't count.
Inputs
granteesarrayrequired- Who the change applies to. An unknown name fails the whole call.
idstringrequired- The object's unique identifier.
resource_typestringrequired- The kind of object.one of
flight permissionstring- 'run' to run a flight. Defaults to the one the object takes.one of
run
motherduckmcp_log_dive_viewer_eventLog a Dive viewer analytics event (e.g.WriteLog Dive Viewer Event
Log a Dive viewer analytics event (e.g. render, query, mode change) to MotherDuck. Used by the Dive viewer for telemetry.
Inputs
event_namestringrequired- Name of the analytics event to log.
app_namestring- Name of the MCP app logging the event.
app_versionstring- Version of the MCP app.
dive_idstring- UUID of the Dive associated with this event.
duration_msnumber- Duration of the operation in milliseconds.
error_messagestring- Error message if the operation failed.
from_modestring- Previous display mode before the transition.
row_countnumber- Number of rows returned by a query.
sql_previewstring- Truncated SQL query text (first 200 chars) for logging.
stagestring- Processing stage for the event (e.g. compile, execute, database_validation).
successboolean- Whether the operation succeeded.
to_modestring- New display mode after the transition.
motherduckmcp_mint_dive_state_referenceStore a Dive UI state bag server-side and return its reference ID.WriteMint Dive State Reference
Store a Dive UI state bag server-side and return its reference ID. Used when the inline-encoded state would exceed URL length limits. The returned ID is encoded into the Dive URL hash for retrieval on open.
Inputs
dive_idstringrequired- UUID of the dive the state bag belongs to
stateobjectrequired- Full `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.
motherduckmcp_query_rwExecute SQL statements that can read or modify data and schema in MotherDuck databases using DuckDB SQL syntax.WriteQuery (Read-Write)
Execute SQL statements that can read or modify data and schema in MotherDuck databases using DuckDB SQL syntax. Supports DDL and DML operations. Results are capped at 2,048 rows and 50,000 characters. Timeout is 55 seconds.
Inputs
sqlstringrequired- DuckDB SQL statement (read or write).
databasestring- Database name to target. Required when targeting database objects; optional for account-level operations.
motherduckmcp_revoke_accessRevoke a permission on one dive or flight from users, roles or the whole organization; takes the same parameters as grant_access.WriteRevoke Access
Revoke a permission on one dive or flight from users, roles or the whole organization; takes the same parameters as grant_access. Revoking a grant that doesn't exist is a no-op. The owner (or an admin) can always revoke. Revoking the organization grant leaves access with the owner and anyone still covered by a user or role grant. An object you can't change is reported as not found, so 'Could not find Dive' can mean you lack permission rather than a wrong id. Revoking someone's access to a dive leaves their 'run' grants on its flights and their read grants on the shares it reads through. Offer to revoke those too.
Inputs
granteesarrayrequired- Who the change applies to. An unknown name fails the whole call.
idstringrequired- The object's unique identifier.
resource_typestringrequired- The kind of object.one of
flight permissionstring- 'run' to run a flight. Defaults to the one the object takes.one of
run
motherduckmcp_run_flightTrigger an asynchronous execution of a Flight using its current version.WriteRun Flight
Trigger an asynchronous execution of a Flight using its current version. Returns a Run record immediately in PENDING or RUNNING state.
Inputs
idstringrequired- The flight UUID
configobject- Optional 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.
motherduckmcp_save_diveCreate a new Dive in the MotherDuck workspace.WriteSave Dive
Create a new Dive in the MotherDuck workspace. Validates JSX/React component code and analyzes database dependencies.
Inputs
contentstringrequired- JSX/React component code.
titlestringrequired- Name of the Dive.
descriptionstring- Brief explanation of the Dive.
motherduckmcp_set_guide_accessSet a guide's visibility to 'user' (private to the owner) or 'organization' (visible to the whole org).WriteSet Guide Access
Set 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.
- Idempotent
Inputs
accessstringrequired- 'user' (private) or 'organization' (org-wide, permission-gated).one of
userorganization uuidstringrequired- The guide's UUID, as returned by list_guides or a previous mutation.
motherduckmcp_update_diveUpdate an existing Dive's title, description, or content.WriteUpdate Dive
Update an existing Dive's title, description, or content. At least one optional field must be provided.
Inputs
idstringrequired- The unique identifier (UUID) of the dive to update
contentstring- New JSX/React component code
descriptionstring- New description for the dive
titlestring- New title for the dive
motherduckmcp_update_flightUpdate a Flight's source code, dependencies, config, authentication tokens, secrets, name, or schedule.WriteUpdate Flight
Update a Flight's source code, dependencies, config, authentication tokens, secrets, name, or schedule. Omitted fields remain unchanged. Code/dependency/config/secret changes create a new FlightVersion.
Inputs
idstringrequired- The flight UUID
access_token_namestring- New MotherDuck access token label to use at runtime. Omit to leave the current token unchanged.
configobject- Replacement config map (full replace)
flight_secret_namesarray- Replacement list of MotherDuck secret names (full replace)
instance_typestring- New 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.one of
F4F16F32 max_runtime_secinteger- New per-run timeout in seconds; 0 means no timeout. Omit to leave it unchanged. Requests above your plan's cap are rejected.
metadataobject- Flight control metadata. Only the "chart" key is currently supported.
namestring- New flight name
requirements_txtstring- New requirements.txt contents
schedule_cronstring- New cron expression (UTC, 5 fields). Empty string clears the schedule.
source_codestring- New Python entrypoint source (single-file)
motherduckmcp_update_guideAppend a new version to an existing guide, identified by uuid.WriteUpdate Guide
Append 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.
Inputs
uuidstringrequired- The guide's UUID, as returned by list_guides or a previous mutation.
change_commentstring- Optional note describing this version's change.
contentstring- New full markdown body. Omit to carry the current version's content forward.
external_idstring- Optional caller-provided id for this version (e.g. a git SHA).
referencesarray- Replaces the guide's references. Pass [] to clear; omit to carry them forward.
motherduckmcp_update_guide_metadataChange a guide's title, description, or topic without appending a content version.WriteUpdate Guide Metadata
Change 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.
- Idempotent
Inputs
uuidstringrequired- The guide's UUID, as returned by list_guides or a previous mutation.
descriptionstring- New one-line summary. Pass an empty string to clear it.
titlestring- New title.
topicstring- New grouping label, e.g. 'revenue-billing' or 'core/metrics' (no leading/trailing slash). Pass an empty string to remove the topic.
motherduckmcp_view_flight_runOpen a flight run as a live diagram: the flight's declared chart as a step-by-step view, each step coloured by what the run actually did, with its timing, per-step rows, effects and errors.WriteView Flight Run
Open a flight run as a live diagram: the flight's declared chart as a step-by-step view, each step coloured by what the run actually did, with its timing, per-step rows, effects and errors. Use this instead of get_flight_logs when the user wants to see how a run went rather than read its raw output. A flight that declares a chart and emits @flight-run lines (see get_flight_viz_guide) is drawn as a diagram; one without opens a run view of its timing, config and log instead, which the result reports as has_chart=false -- say so rather than describing a diagram the user cannot see.
Inputs
idstringrequired- The flight UUID
run_numberinteger- Sequential run number to open (from list_flight_runs). Omit for the most recent run.
motherduckmcp_delete_divePermanently remove a Dive from the MotherDuck workspace.DestructiveDelete Dive
Permanently remove a Dive from the MotherDuck workspace. This action cannot be undone.
Inputs
idstringrequired- The unique identifier of the dive to delete
motherduckmcp_delete_flightPermanently delete a Flight, its versions, schedule, and run history.DestructiveDelete Flight
Permanently delete a Flight, its versions, schedule, and run history. This action cannot be undone.
Inputs
idstringrequired- The flight UUID
motherduckmcp_delete_guideSoft-delete a guide while preserving its version history.DestructiveDelete Guide
Soft-delete a guide while preserving its version history. Identify it by uuid.
Inputs
uuidstringrequired- The guide's UUID, as returned by list_guides or a previous mutation.
No tools match.