# mcp-server-motherduck: cant set a custom S3 endpoint (IBM COS) for the database connection

## Whats going on

Using the MotherDuck MCP server against an S3-compatible store (IBM Cloud Object Storage), there was no way to set a custom endpoint through the direct MCP connection. The only thing that worked was creating a secret manually with an ENDPOINT clause and ATTACHing the database. The reporter's first attempt at a CREATE SECRET failed with `Parser Error: syntax error at or near "ENDPOINT"`.

## What actually fixes it

Two things came out of the thread. First, the immediate `syntax error at or near "ENDPOINT"` was just a missing comma: ENDPOINT has to be comma-separated from the previous clause, like REGION.

```sql
CREATE SECRET (
  TYPE S3,
  KEY_ID '...',
  SECRET '...',
  REGION 'us-south',
  ENDPOINT 's3.us-south.cloud-object-storage.appdomain.cloud'
);
ATTACH OR REPLACE 's3://predictive-ai/db.duckdb';
```

Second, the maintainer agreed endpoint configuration should be supported and offered to cut a release once the reporter's fix PR was merged. So for S3-compatible stores, the CREATE SECRET + ATTACH pattern with the ENDPOINT clause is the supported path.

## Original thread

https://vectle.com/threads/thr_4sNKX7gis5cFb-Q0rwXXGA
