Skip to main content

MotherDuck MCP Server

MotherDuck offers a remote MCP server (fully managed, read-only) and a local MCP server (self-hosted, read-write) that let AI assistants query and explore your MotherDuck databases using the Model Context Protocol (MCP). Connect your favorite AI agent to explore schemas, run SQL queries, and ask documentation questions with natural language.

Recommended: Use the remote MCP server for most use cases—zero setup, fully managed, and read-only. Learn about the difference between remote and local, and when to use the local server.

Remote server

Quick Start

Select your MCP client and follow the instructions to connect to the remote MCP server.

AnthropicAdd MotherDuck to Claude

Or manually:

  1. Go to SettingsConnectors
  2. Click Browse Connectors to find the MotherDuck connector

MotherDuck Connector in the Claude connector Directory

A browser window should open for authentication. After authentication you can double check the connection by asking "List all my databases on MotherDuck."

Authentication

The remote MCP server supports OAuth authentication. When you add the server to your AI client, you'll be redirected to authenticate with your MotherDuck account. The server uses your MotherDuck credentials to access your databases with the same permissions as your account.

Some clients also support simple authentication - in that case, you can provide your MotherDuck access token as a Bearer header.

Server Capabilities

With the remote MCP server, your agent can:

  • Execute read-only SQL queries against your databases
  • Explore database schemas, tables, and columns
  • Attach and detach shares that have been shared with you
  • Ask questions about DuckDB and MotherDuck documentation

Example prompts:

  • "Analyze monthly revenue trends and identify our fastest-growing product categories"
  • "Compare customer retention rates across different acquisition channels"
  • "Build a cohort analysis showing user engagement over their first 90 days"

For clients that support MCP instructions, the remote server provides detailed query guidelines to help AI assistants write effective DuckDB SQL.

Learn more about using the MotherDuck MCP server.

Available Tools

The remote MCP server provides the following tools for AI assistants:

Regional Availability

The remote MCP server is available in all MotherDuck regions. Requests are routed to the MCP server closest to where the client runs:

  • Desktop clients (Cursor, Claude Code): Routed based on your physical location
  • Web-based agents (Claude.ai, ChatGPT): Routed based on the agent provider's server location

Your data is always processed in your MotherDuck organization's region. However, query results transit through the remote MCP server. If you have strict data residency requirements, ensure your MCP client runs within your region.

Local server

For local DuckDB databases, write access, or self-hosted scenarios, use the local MCP server—a self-hosted server you run yourself (mcp-server-motherduck).

📦 mcp-server-motherduck – Open-source local MCP server for DuckDB and MotherDuck

The local MCP server supports:

  • Read-write operations on local and cloud databases
  • Local DuckDB databases (no cloud connection required)
  • MotherDuck cloud databases with your access token
  • Custom configurations and security settings

Remote vs local

ServerBest forSetupAccess
Remote (hosted by MotherDuck)Most users who mainly query data on MotherDuck cloudZero setup; connect via URL and OAuthRead-only
Local (mcp-server-motherduck)Self-hosted use; local DuckDB files; or when you need write accessInstall and run the server yourselfRead-write
  • Remote: Fully managed, zero-setup, read-only. Recommended if you mostly query data on MotherDuck cloud. Setup and tools are in the Remote server section above.
  • Local: Self-hosted, read-write. Use it when you work mostly with local DuckDB files or need the AI to run write operations. See the Local server section above.