motherduck-connect

Establish SSL-secured MotherDuck connections via PG endpoint or native DuckDB md: options.

53|3|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/motherduckdb/agent-skills --skill motherduck-connect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: motherduck-connect
Source: https://github.com/motherduckdb/agent-skills/tree/main/plugins/motherduck-skills-claude/skills/motherduck-connect
Command: npx skills add https://github.com/motherduckdb/agent-skills --skill motherduck-connect

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the challenge of getting reliable, secure connectivity from an application or runtime to MotherDuck so you can start working with data without guessing connection strings, SSL settings, or token handling.

Core Features & Use Cases

  • Connection method selection: Choose the right path (PG endpoint vs native DuckDB md: connection vs alternatives) based on workload needs like hybrid execution, local file access, and query control.
  • Runtime-aware installation: Detect whether to use MCP tools, uv, Python/pip, Node, or the DuckDB CLI, while pinning to a MotherDuck-supported DuckDB version.
  • Operational safety defaults: Prefer environment-managed tokens, verify connections with a lightweight query, and apply read-scaling/session affinity guidance when needed.
  • Use case: Configure a backend service or BI workflow to connect to the correct MotherDuck database, verify access, and prepare for subsequent exploration and querying.

Quick Start

Use the motherduck-connect skill to establish a verified, SSL-secured connection to your target MotherDuck database, then proceed to list and query tables.

Frequently Asked Questions about motherduck-connect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a Python application to MotherDuck securely?

To securely connect to MotherDuck, choose the correct connection method for your workload, apply SSL configuration, use environment-managed tokens, pin a MotherDuck-supported DuckDB version, and verify the connection with a lightweight query.

What is the difference between the MotherDuck PG endpoint and native DuckDB md: connection?

Connection method selection between the PG endpoint and native DuckDB `md:` connection depends on your workload needs, such as requiring hybrid execution, local file access, or specific query control for your backend services or BI tools.

How do I manage authentication tokens when connecting to MotherDuck?

MotherDuck connection authentication requires environment-managed token usage to ensure operational safety, avoiding hardcoded credentials while securely establishing connectivity from your client application or runtime.

Can I use the DuckDB CLI to run ad-hoc exploration queries against MotherDuck?

Yes, the DuckDB CLI is a supported runtime execution path for ad-hoc exploration. The connection method detects your runtime, applies read-scaling guidance, and verifies access prior to downstream query skills.

Do I need to pin a specific DuckDB version to connect to MotherDuck?

Yes, establishing a reliable MotherDuck connection requires explicit DuckDB version pinning via MotherDuck-supported versions to ensure runtime compatibility and prevent connection failures during execution.

Why is my MotherDuck connection failing before I can run downstream queries?

MotherDuck connection failures often occur when SSL configuration is missing, tokens are not environment-managed, or the runtime uses an unsupported DuckDB version, preventing the required connection verification step.