# ODBC
> Connect to MotherDuck with the DuckDB ODBC driver, and authenticate a DSN with an access token instead of a browser sign-in.
The MotherDuck integration with ODBC is no different than DuckDB. For more information, see [ODBC](https://duckdb.org/docs/stable/clients/odbc/overview.html) in DuckDB Documentation.

To reach MotherDuck, set the **Database** field of your DSN to a MotherDuck database with the `md:` prefix:

```text
md:my_database
```

## Authenticating with an access token

With no token configured, the driver opens a browser sign-in prompt, and every application that uses the DSN prompts again each session. To authenticate the DSN itself, append your [access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#creating-an-access-token) to the **Database** field as a connection string parameter:

```text
md:my_database?motherduck_token=<your_motherduck_token>
```

This works for any application that reads the DSN, including tools that don't expose a separate field for driver connection properties.

Add any other [connection string parameter](/sql-reference/connection-string-parameters) the same way, separated by `&`. BI tools often benefit from `attach_mode=single`, because their catalog browsers can be confused by multiple attached databases:

```text
md:my_database?motherduck_token=<your_motherduck_token>&attach_mode=single
```

To serve several people from one DSN, create the token on a service account and give it a [read scaling](/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling/read-scaling.mdx) pool size that matches your expected number of concurrent users.

### Windows DSN fields truncate long tokens

:::warning
**The ODBC Data Source Administrator shortens the Database field.** The text box holds around 255 characters and saves a truncated value without reporting an error. A truncated token fails to authenticate, so the connection falls back to the browser prompt.
:::

Write the full value into the registry instead:

1. Open Registry Editor by running `regedit`.
2. Navigate to the key for your DSN:
   - System DSN: `HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<your_dsn_name>`
   - 32-bit System DSN: `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC\ODBC.INI\<your_dsn_name>`
   - User DSN: `HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\<your_dsn_name>`
3. Double-click `Database`, paste the full `md:my_database?motherduck_token=<your_motherduck_token>` value, and click OK.

Restart the application that uses the DSN to pick up the change.


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fgetting-started%2Finterfaces%2Fclient-apis%2Fother%2Fodbc%2F&page_title=ODBC&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
