MotherDuck Now Speaks Postgres! Our pg_endpoint is now live!Demo - April 21

Skip to main content

Connect to the MotherDuck MCP Server

The MotherDuck MCP Server lets AI assistants query and explore your databases using the Model Context Protocol (MCP). This guide walks you through connecting your preferred AI client to the remote MCP server (fully managed, zero setup).

Prerequisites

  • A MotherDuck account (sign up free)
  • An MCP-compatible AI client (Claude, ChatGPT, Cursor, Claude Code, Codex, or others)

Set up the remote MCP server

Select your MCP client and follow the instructions to connect.

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 uses OAuth, so you'll authenticate with your MotherDuck account during setup. Some clients also support token-based authentication through a Bearer header.

Configuring tool permissions

Most MCP clients let you control how the AI uses each tool. The exact UI varies by client, but the general permission levels are:

PermissionBehavior
Always allowThe AI uses the tool automatically without asking. Faster iteration when errors occur, but no human confirmation before each action.
Needs approvalThe AI asks for your confirmation before each tool use. Gives you visibility into every action.
BlockedThe AI cannot use this tool.
tip

The MCP Server provides both read-only (query) and read-write (query_rw) tools. For exploratory analysis, setting read-only tools to "Always allow" enables faster back-and-forth when the AI needs to retry or refine queries. You can keep query_rw on "Needs approval" or block it if you only need read access. See Restricting to read-only access for more options.

Remote vs local MCP server

MotherDuck offers two MCP server options:

ServerBest forSetupAccess
Remote (hosted by MotherDuck)Most users who query and modify data on MotherDuck cloudZero setup; connect through URL and OAuthRead-write
Local (mcp-server-motherduck)Self-hosted use; local DuckDB files; or when you need full customizationInstall and run the server yourselfFully customizable

The remote server is recommended for most use cases. Use the local server when you need to work with local DuckDB files, want custom tool configurations, or require full control over the server environment.

Local MCP Server GitHub Repository – Self-host the open-source MCP server for DuckDB and MotherDuck

Where to go from here