MotherDuck's DuckDB MCP Server
MCP server for DuckDB and MotherDuck
Overview
The mcp-server-motherduck is an MCP server designed for MotherDuck and local DuckDB, facilitating connections and queries to these databases.
To use the mcp-server-motherduck, configure your Claude Desktop with the provided snippet, ensuring to set the HOME environment variable and, if using MotherDuck, the MotherDuck token.
- Initialize connections to DuckDB or MotherDuck databases. - Retrieve table schemas from specific databases. - Execute queries on the MotherDuck (DuckDB) database.
- Connecting to local DuckDB for data analysis.
- Executing complex queries on MotherDuck databases.
- Retrieving database schemas for understanding data structure.
Add to your AI client
Use these steps to connect MotherDuck's DuckDB MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-server-motherduck-motherduckdb": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-motherduck-motherduckdb"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-server-motherduck-motherduckdb": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-motherduck-motherduckdb"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-server-motherduck-motherduckdb": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-motherduck-motherduckdb"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-server-motherduck-motherduckdb": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-motherduck-motherduckdb"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-server-motherduck-motherduckdb": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-motherduck-motherduckdb"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-server-motherduck-motherduckdb": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-motherduck-motherduckdb"
]
}
}
}FAQ
What is the purpose of the mcp-server-motherduck?
It serves as a bridge to connect and interact with DuckDB and MotherDuck databases.
Is there a license for using this server?
Yes, it is licensed under the MIT License, allowing free use, modification, and distribution.
What configurations are needed for Claude Desktop?
You need to set the HOME variable and, for MotherDuck, the motherduck_token environment variable.