Motherduck Connect logo

Motherduck Connect

Organization
motherduckdb
motherduck-connect

Set up or troubleshoot MotherDuck connections, the MotherDuck MCP server in AI clients, authentication, client runtimes, and read scaling.

Overview

Publishermotherduckdb
Repositoryagent-skills
Skill namemotherduck-connect
Stars
62
Forks
6
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by motherduckdb on GitHub. Read the source before you install it.

Installation

Install the Motherduck Connect AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/motherduckdb/agent-skills/tree/main/plugins/motherduck-skills-claude/skills/motherduck-connect
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/motherduckdb/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/plugins/motherduck-skills-claude/skills/motherduck-connect .claude/skills/motherduck-connect
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Motherduck Connect in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Motherduck Connect on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Motherduck Connect is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Connect to MotherDuck

Source Of Truth

  • Prefer current MotherDuck connection, attach-mode, read-scaling, and multithreading docs.
  • If the MotherDuck MCP ask_docs_question tool is available, use it first for current connection behavior.
  • When it is unavailable, verify guidance against the public docs before making firm claims about connection strings, token types, or read-scaling behavior.

Default Posture

  • Start with the PG endpoint (MotherDuck's Postgres-compatible endpoint) for backend applications, BI tools, and serverless runtimes that want PostgreSQL wire compatibility.
  • For BI tools, treat the PG endpoint as the compatibility path for Power BI and Tableau Cloud when current docs list them as supported.
  • Use the native DuckDB API when you need local files, hybrid local/cloud execution, or direct DuckDB control.
  • Use md: workspace connections for multi-database exploration, bootstrap flows, and temporary validation environments.
  • Reuse an existing connection, connector, or environment-managed token when the user's context already provides one; do not ask for secrets that can be discovered from the active workspace. When only the MotherDuck MCP server is connected and a one-off local session needs credentials, get_short_lived_token returns a temporary token and endpoint details; pass it through the process environment and never write it to files, code, or logs. Deployed services still need a service-account token.
  • Start with one connection. Add pooling or read scaling only when real concurrent-read pressure exists.
  • For services that should fail over instead of blocking while a Duckling starts, bound native md: connects with connection_timeout (md:my_db?connection_timeout=30s, MOTHERDUCK_CONNECTION_TIMEOUT, or SET motherduck_connection_timeout = '30s' before the first ATTACH 'md:'). It applies to DuckDB clients with the MotherDuck extension, not the PG endpoint or Wasm. Without it, only network retries are bounded.
  • To connect an AI client (Claude, Cursor, VS Code, Gemini CLI, ChatGPT, Codex) to MotherDuck, use the hosted MCP server at https://api.motherduck.com/mcp; read references/MCP_SETUP.md.
  • Use native DuckDB custom_user_agent where supported; for PG endpoint clients, prefer the client's application_name setting when available. The tag shows per query in the Duckling Overview, which makes it the quickest way to see which workload is using a Duckling.

Runtime Selection

Pick the connection method (above) and the runtime separately. The runtime is what actually executes queries: MotherDuck MCP, the MotherDuck CLI, a Python or Node process, or the DuckDB CLI.

For answer, review, or planning requests, inspect the available runtimes and recommend a path without installing anything. Install or configure a runtime only when the user asks to connect, build, or change the application.

Reuse the project’s language, dependencies, and working connection. Prefer MCP for chat-only exploration and the MotherDuck CLI for file-shaped Dive/Flight work or large output. For application code, use its existing runtime; choose a new runtime only when none is established.

Before installing a DuckDB client, check https://motherduck.com/docs/duckdb-versions.json and pin a MotherDuck-supported version. Keep an existing compatible pin unless the task requires an upgrade. See the runtime reference for installation examples.

Workflow

  1. Choose the connection path for the workload; keep ingestion and serving paths distinct when their needs differ.
  2. Put the MotherDuck token in environment-managed secrets, not in source code.
  3. Establish the connection with explicit SSL settings where required.
  4. Verify the connection with SELECT 1 AS connected and then list reachable tables.
  5. If the workload is read-heavy and concurrent, evaluate read scaling and a stable session_name per end user.

References

  • Read references/MCP_SETUP.md to add the MotherDuck MCP server to an AI client.

Read only the reference sections needed for the current task.

  • Read references/CONNECTION_GUIDE.md for connection-method selection, PG endpoint and native DuckDB examples, token handling, read scaling, attach modes, and common failure modes
  • Read references/RUNTIME_SELECTION.md for the MCP-vs-Python-vs-Node-vs-CLI decision tree, detection commands, install snippets, and the DuckDB version-pinning workflow

Related Skills

Load related skills only for missing capabilities; reuse established context.

  • motherduck-explore for discovering databases, tables, columns, and shares after the connection is established
  • motherduck-query for executing DuckDB SQL against the connected databases
  • motherduck-duckdb-sql for DuckDB syntax and function lookup support
  • motherduck-rest-api for control-plane admin operations; those use MOTHERDUCK_ADMIN_TOKEN, which is never used for database connections
  • motherduck-cli for terminal queries and file-oriented Dive/Flight authoring

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Motherduck Connect AI skill do?

Set up or troubleshoot MotherDuck connections, the MotherDuck MCP server in AI clients, authentication, client runtimes, and read scaling.

Why use Motherduck Connect on TypingMind?

Because you install it once and use it with any model. Motherduck Connect is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Motherduck Connect in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/motherduckdb/agent-skills/tree/main/plugins/motherduck-skills-claude/skills/motherduck-connect. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Motherduck Connect?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Motherduck Connect?

As many as you like. As long as a model supports skills, you can use Motherduck Connect with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Motherduck Connect AI skill free?

Yes. It is published on GitHub by motherduckdb under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇