> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Motherduck in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/motherduck
Last updated: 2026-11-24

Share Motherduck with your team in Claude, ChatGPT and Cursor through Metorial: 36 tools (20 read-only).

---

To give your team Motherduck in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Motherduck integration in a Metorial portal. Agents can query MotherDuck databases, explore catalogs, and manage Dives, Flights, and Guides through native SQL and the PostgreSQL endpoint. The integration has 36 tools, 20 read-only and 16 destructive.

**What you will learn**

- How an admin shares Motherduck in a portal and how each person connects
- How to keep the 20 read-only tools and reject the other 16

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in method

Available: **MotherDuck Access Token**.

## Admin: share Motherduck in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Motherduck.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Motherduck.

4. **Choose who gets it**

   Add the access groups that should see Motherduck. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Motherduck integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search motherduck
```

## Employee: connect Motherduck

### In the portal

1. **Open Motherduck in the catalog**

   Sign in to your portal and open Motherduck. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**.

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search motherduck
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. 

### Add it to your AI client

`metorial install` adds your Motherduck connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list motherduck
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 20 read-only tools, such as `query` and `get_guide`, and lose the 16 destructive tools, such as `query_rw` or `save_dive`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list motherduck
metorial tools <integration-id>
```

`metorial tools` lists the 36 tools, minus any you rejected.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (20)

- `get_query_guide`: Load your organization's query guidance and an overview of available Guides before writing SQL.
- `query`: Execute read-only SQL queries against MotherDuck databases.
- `list_dives`: List all Dives in your MotherDuck workspace.
- `list_databases`: List all databases in your MotherDuck account.
- `get_flight`: Fetch a Flight's metadata and version snapshot, optionally at a historical version.
- `search_catalog`: Fuzzy search across databases, schemas, tables, columns, and shares.
- `list_tables`: List tables and views in a MotherDuck database.
- `list_columns`: List columns of a table or view with types and comments.
- `list_flight_runs`: List the execution history of a Flight, newest first.
- `read_dive`: Read a specific Dive by ID, including its full component code.
- `list_guides`: Browse your organization's Guides level by level, grouped by topic.
- `list_macros`: List table and scalar macros in a MotherDuck database with their parameters.
- `list_flights`: List Flights with summary metadata, optionally filtered by keywords.
- `get_guide`: Load a Guide's full content by UUID, optionally pinning a historical version.
- `view_dive`: Load a Dive's source, preview inputs, and MotherDuck app link for a live preview.
- `list_views`: List views in a MotherDuck database with schema, comment, and column count.
- `list_flight_versions`: List the version history of a Flight, newest first.
- `list_shares`: List database shares that have been shared with you.
- `get_flight_run_logs`: Fetch the logs and run record for a single Flight run.
- `get_current_user`: Get the authenticated MotherDuck user, organization, and account region.

### Destructive tools (16)

- `edit_flight_source`: Edit a Flight's source code with find-and-replace operations, producing a new version.
- `run_flight`: Trigger an on-demand execution of a Flight using its current version.
- `cancel_flight_run`: Cancel an in-progress Flight run.
- `delete_flight`: Permanently delete a Flight, its versions, schedule, and run history.
- `update_flight`: Update a Flight's source, requirements, config, token, secrets, name, or schedule.
- `update_dive`: Update an existing Dive's title, description, or content.
- `query_rw`: Execute SQL queries that can modify data or schema in MotherDuck.
- `create_guide`: Create a markdown Guide that AI agents use to answer your organization's data questions.
- `set_guide_access`: Change a Guide's visibility between private and organization-wide.
- `save_dive`: Save a new Dive to your MotherDuck workspace.
- `delete_dive`: Permanently delete a Dive by ID.
- `delete_guide`: Soft-delete a Guide while preserving its version history.
- `update_guide_metadata`: Change a Guide's title, description, or topic without creating a content version.
- `edit_guide_content`: Apply targeted string replacements to a Guide and save a versioned update.
- `create_flight`: Create a new Flight from Python source code, requirements, and an optional schedule.
- `update_guide`: Append a version to an existing Guide with updated content or references.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Motherduck there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Motherduck on metorial.com](https://metorial.com/integrations/motherduck): the integration overview