Bonnard

To analyse your MotherDuck data in Claude, ChatGPT or another AI client, connect it to Bonnard on the Data page. Then give people access to it. Bonnard reads MotherDuck through an access token, so agents query only the databases attached to the token’s account.

MotherDuck at a glance
FactMotherDuck
CredentialA Read Scaling or Read/Write access token
Connectionmotherduck. DuckDB local-file mode is not available on the hosted service
TenancyNo tenancy

Requirements

  • The Editor role or higher in your Bonnard workspace.
  • To work from your AI client: Bonnard connected.
  • A MotherDuck account, for example a service account, that has the databases you want to query attached to its workspace.

1. Create an access token

  1. In MotherDuck, open Settings. If you use a service account, open it under Service Accounts.
  2. Select Create token. Then enter a name.
  3. Select the token type from the table below.
  4. Copy the token.
MotherDuck token types
Token typeUse it when
Read ScalingYour MotherDuck plan includes read scaling, for example Business. The token can only read, and queries run in parallel on the account’s read-scaling pool. This token cannot attach databases, so attach them first with a Read/Write token.
Read/WriteYour plan has no read scaling. All queries run on the account’s one Duckling. Bonnard runs read-only queries either way.

2. Start the connection

In your AI client

The agent offers a form link only while the workspace has no data source, or only the sample.

  1. Ask:

    Connect my MotherDuck database <database> to Bonnard.

  2. Open the link that the agent gives. Enter the token in the form, and never put it in the chat.

In the console

In the console at app.bonnard.ai, select Data, then Add data source, then DuckDB / MotherDuck.

3. Test and connect

In the console

Console only
  1. Enter the details from the table below.
  2. Select Test and connect. Bonnard connects with the token and reads the tables in Database.
MotherDuck connection fields
FieldEnter
Connection nameA name for this database, for example Production.
Import from connection string (optional)For example, md:<database>?motherduck_token=<token>. Then select Fill fields.
ConnectionKeep motherduck.
DatabaseThe database to read. Empty means my_db.
MotherDuck tokenThe token from step 1.
SaaS safe modeKeep on. In safe mode, queries cannot read local files or load extensions.

A failed test keeps a draft without the token. Select Continue setup on its card on the Data page. While no data source is connected, the agent also gives a resume link. Exit setup removes it. A deleted data source’s name keeps no draft.

Make sure that it is connected

In your AI client

Ask:

Which tables can you read in <connection name>?

The agent calls explore_schema and shows the tables in Database. An Editor first adds themselves on the Access tab.

In the console

A setup started in the console shows <name> is connected and who can use it. Select Give access to change that.

Troubleshooting

DuckDB local-file mode is not available on the hosted service. Use MotherDuck, or self-host Bonnard.

Set Connection to motherduck.

Query exceeded the 30s time limit.

Show details gives this message when MotherDuck did not return the table list in time. Select Test and connect again.

Signed in, but couldn't read the tables

The token cannot read the table list. Select Show details for MotherDuck’s own message.

No tables are discovered

Examine Database. A database that the account did not attach shows no tables and no error.

A table is missing

Make sure that the table is in Database. Then select Re-scan tables on the data source’s Settings tab.

Change or remove

In the console

Console only

On the data source’s Settings tab:

  • Edit connection changes the connection details.
  • Re-scan tables reads the table list now. Bonnard reads it at approximately 6-hour intervals.
  • Delete data source needs the Admin role. Select Delete, then Delete data source. Its dashboards and charts stop running until you connect one with the same name and engine. Then give access again.

To rename the data source, select its name in the page header.

Charts in your AI client