Available Connection Modes
In-Memory
Temporary database stored in RAM, perfect for development and testing
Local DuckDB Files
Connect to DuckDB files on your local filesystem
MotherDuck
Cloud-hosted DuckDB databases with collaborative features
S3 Databases
Query DuckDB databases stored in Amazon S3
In-Memory Databases
In-memory databases are stored entirely in RAM and are ideal for development, testing, or temporary data processing. Data is lost when the connection closes.- JSON Config
- CLI
In-memory databases always require the
--read-write flag since DuckDB doesn’t support read-only mode for :memory: databases.- Development and testing
- Temporary data processing
- Quick data exploration without persistence
- Maximum flexibility with no guardrails
Local DuckDB Files
Connect to DuckDB database files stored on your local filesystem. The server supports both ephemeral and persistent connections.Read-Only Mode (Default)
Read-only connections are safer and allow concurrent access from multiple processes.- JSON Config
- CLI
Read-Write Mode
Enable write access by adding the--read-write flag:
Ephemeral vs Persistent Connections
By default, read-only local file connections use ephemeral connections (--ephemeral-connections is true by default). This means:
- A new connection is created for each query
- The file is immediately unlocked after each query
- Other processes can write to the database concurrently
- Prevents “file locked” errors
- Querying existing DuckDB databases
- Concurrent read access while another process writes
- Local data analysis and exploration
- Building and maintaining local data pipelines
MotherDuck
Connect to cloud-hosted DuckDB databases on MotherDuck. Requires a MotherDuck token.Read-Write Mode
- JSON Config
- CLI
Read-Only Mode
Read-only MotherDuck connections require a read-scaling token instead of a regular token:- Collaborative data analysis
- Cloud-based data warehousing
- Sharing databases across teams
- Combining local and cloud data processing
MotherDuck Remote MCP
For a fully-managed remote MCP server for MotherDuck with zero-setup, see the MotherDuck Remote MCP.| Remote MCP | Local MCP (this server) | |
|---|---|---|
| Hosting | Hosted by MotherDuck | Runs locally/self-hosted |
| Setup | Zero-setup | Requires local installation |
| Access | Read-write supported | Read-write supported |
| Local filesystem | - | Query across local and remote databases, ingest/export local files |
S3 Databases
Connect to DuckDB databases stored in Amazon S3 buckets.S3 Authentication
The server supports multiple AWS authentication methods:Access Key and Secret Key
Access Key and Secret Key
Provide static credentials via environment variables:
IAM Roles and Session Tokens
IAM Roles and Session Tokens
For temporary credentials (IAM roles, SSO, EC2 instance profiles):The server will use the credential chain provider to automatically fetch credentials.
S3 databases are always attached as read-only, even when
--read-write is specified. This is because S3 storage is typically used for read-only access patterns.- Querying large datasets stored in S3
- Accessing archived DuckDB databases
- Serverless data processing
- Cost-effective storage for infrequently accessed data
Switching Databases at Runtime
With the--allow-switch-databases flag, you can switch between different databases during a session using the switch_database_connection tool:
- Switch from in-memory to local files
- Connect to different MotherDuck databases
- Switch to S3 databases
- Create new databases on-the-fly