Bonnard

To chart MotherDuck data in Claude, ChatGPT or another AI client, connect it here, then create an app on it. Bonnard reads MotherDuck through an access token, so your apps query only the databases attached to the token’s account.

Requirements

  • The Admin role in your Bonnard workspace.
  • A MotherDuck account, such as a service account, with the databases apps should query attached to its workspace.

1. Create an access token

Bonnard connects with this token. Agents can query every database attached to its account.

  1. In MotherDuck, open Settings. For a service account, open it under Service Accounts.
  2. Select Create token, enter a name, and choose the token type from the table below.
  3. Copy the token.
MotherDuck token types
Token typeChoose it when
Read ScalingYour MotherDuck plan is Business or Enterprise. The token can only read, and queries run in parallel on the account’s read-scaling pool. Results can lag the latest writes by a few minutes. This token cannot attach databases, so attach them first with a Read/Write token.
Read/WriteYour plan has no read scaling. Every query runs on the account’s one Duckling. Bonnard runs read-only queries either way.

2. Add the connection

  1. In the console at app.bonnard.ai, select Data, then MotherDuck.
  2. Enter a Connection name and the details from the table below.
  3. Select Test & connect. Bonnard connects with the token and reads the tables in Database.
MotherDuck connection fields
FieldEnter
Connection nameA name for this database in Bonnard, such as Production.
ConnectionKeep motherduck.
DatabaseThe database to read. Empty means my_db. If each tenant (the customer a caller belongs to) has its own database, enter one of them.
MotherDuck tokenThe token from step 1.
SaaS safe modeKeep on. It stops queries from reading local files or loading extensions.

3. Choose the tenancy

Choose how callers see the data, then select Save & continue.

Tenancy options
OptionUse it when
No tenancyEvery caller should see the same data.
Database per tenantEach tenant’s tables sit in their own database, named by a pattern such as customer_{tenant}. Queries go to the caller’s database, but can name any database the token reaches.

Connection saved shows the number of tables discovered.

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. MotherDuck did not return the table list in time. Select Test & connect again.
  • Connected, but introspect failed: <message> The token cannot read the table list. Fix what the message names.
  • No tables are discovered. Check Database: a database the account has not attached shows no tables and no error.
  • A table is missing. Check that it is in Database, then select Re-introspect on the database’s Tables tab.
  • Any other error is MotherDuck’s own message. Check the field it names, then select Test & connect again.

Charts in your AI client

Create an app on this database, so AI clients such as Claude and ChatGPT can query it and draw charts.