MotherDuck MCP server
MotherDuck offers a remote MCP server (fully managed, read-write) and a local MCP server (fully customizable, self-hosted) that let AI assistants query and explore your MotherDuck databases using the Model Context Protocol (MCP).
The remote MCP server is hosted at https://api.motherduck.com/mcp. Most clients connect through OAuth automatically; clients that need a manual configuration use this URL with an HTTP transport.
For step-by-step setup instructions for all supported clients (Claude, ChatGPT, Cursor, Claude Code, and others), see Connect to the MotherDuck MCP Server.
Server capabilities
With the remote MCP server, your agent can:
- Execute read-only and read-write SQL against your databases
- Explore database schemas, tables, and columns
- Attach and detach shares
- Ask questions about DuckDB and MotherDuck documentation
- Create and manage Dives (interactive data visualizations)
- Render Dives inline in supported clients with the Dive Viewer MCP App, so you iterate against live data instead of a sample-data preview
- Create, schedule, run, and monitor Flights (scheduled Python jobs on MotherDuck compute)
For clients that support MCP instructions, the remote MCP server provides detailed query guidelines to help AI assistants write effective DuckDB SQL. Learn more about using the MotherDuck MCP server.
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.
Restricting to read-only access
The remote MCP server exposes both read-only and read-write tools. To restrict your AI assistant to read-only access, see Restricting to read-only access.
Local MCP server
For local DuckDB databases, custom configurations, or self-hosted scenarios, use the local MCP server (mcp-server-motherduck). For a comparison of remote vs local and when to use each, see the setup guide.
📦 Local MCP Server GitHub Repository – Self-host the open-source MCP server for DuckDB and MotherDuck
Related resources
- Connect to the MCP Server - Setup instructions for all supported AI clients
- MCP Workflows Guide - Tips and workflows for using the MotherDuck MCP server
- Building Analytics Agents - Guide to building AI agents with MotherDuck
- MCP Specification (2025-06-18) - Official protocol documentation
ask_docs_question
Ask questions about DuckDB or MotherDuck documentation
cancel_flight_run
Cancel an in-progress Flight run.
create_flight
Create a new Flight from Python source code, requirements, and an optional schedule.
delete_dive
Permanently delete a Dive by ID
delete_flight
Permanently delete a Flight, its versions, schedule, and run history.
edit_flight_source
Edit a Flight's source code with one or more find-and-replace operations, producing a new version.
get_dive_guide
Load instructions for creating MotherDuck Dives
get_flight
Fetch a Flight's metadata and version snapshot by UUID, optionally at a specific historical version.
get_flight_guide
Load the canonical instructions for authoring, scheduling, running, and troubleshooting MotherDuck Flights.
get_flight_run_logs
Fetch the logs and run record for a single Flight run.
list_columns
List columns of a table or view with types and comments
list_databases
List all databases in your MotherDuck account
list_dives
List all Dives in your MotherDuck workspace
list_flight_runs
List the execution history of a Flight, newest first.
list_flight_versions
List the version history of a Flight, newest first.
list_flights
List the Flights you own with summary metadata, optionally filtered by keywords.
list_shares
List database shares that have been shared with you
list_tables
List tables and views in a MotherDuck database
query
Execute SQL queries against MotherDuck databases
query_rw
Execute SQL queries that can modify data or schema in MotherDuck
read_dive
Read a specific Dive by ID, including its full component code
run_flight
Trigger an on-demand execution of a Flight using its current version.
save_dive
Save a new Dive to your MotherDuck workspace
search_catalog
Fuzzy search across databases, schemas, tables, columns, and shares
share_dive_data
Share the data for a Dive with your organization
update_dive
Update an existing Dive's title, description, or content
update_flight
Update a Flight's source, requirements, config, token, secrets, name, or schedule.
view_dive
Render a MotherDuck Dive as a live, interactive MCP app inside the host client.