Prerequisites
-
MotherDuck Account and Token
- Sign up for a MotherDuck account at motherduck.com.
- Generate an access token via the MotherDuck UI.
- Store the token securely for use in the configuration.
-
Install uv
- Install
uv using one of the following methods:
- Using pip:
pip install uv
- Using Homebrew:
brew install uv
-
Claude Desktop (if applicable)
- Install Claude Desktop from claude.ai/download.
Setting up your MotherDuck Token
- Generate and Store Token
- Generate an access token via the MotherDuck UI.
- Store the token securely.
Configuration for Claude Desktop
-
Access Claude Desktop Configuration
- Open the Claude Desktop app.
- Navigate to
Settings > Developer tab.
- Click on the
Edit Config button.
-
Edit Configuration File
- Add the following configuration to your
claude_desktop_config.json:
"mcpServers": {
"mcp-server-motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"md:",
"--motherduck-token",
"<YOUR_MOTHERDUCK_TOKEN_HERE>"
]
}
}
- Replace
<YOUR_MOTHERDUCK_TOKEN_HERE> with your actual MotherDuck token.
Testing the Server
- Start Server Manually
- To connect to the default MotherDuck database, run:
uvx mcp-server-motherduck --db-path md: --motherduck-token <your_motherduck_token>
- For a specific MotherDuck database:
uvx mcp-server-motherduck --db-path md:your_database_name --motherduck-token <your_motherduck_token>
- For a local DuckDB database:
uvx mcp-server-motherduck --db-path /path/to/your/local.db
- For an in-memory database:
uvx mcp-server-motherduck --db-path :memory:
Running in SSE Mode
- Run Server in SSE Mode
- Execute the following command:
npx -y supergateway --stdio "uvx mcp-server-motherduck --db-path md: --motherduck-token <your_motherduck_token>"
Troubleshooting
- Verify your MotherDuck token is correct if you encounter connection issues.
- Ensure the
--home-dir parameter is set correctly for local file access.
- Check that the
uvx command is available in your PATH.
- If you encounter
spawn uvx ENOENT errors, specify the full path to uvx (output of which uvx).
MotherDuck Account and Token
- Sign up for a MotherDuck account at motherduck.com.
- Generate an access token via the MotherDuck UI.
- Store the token securely for use in the configuration.
Install uv
- Install
uvusing one of the following methods:- Using pip:
pip install uv - Using Homebrew:
brew install uv
- Using pip:
Claude Desktop (if applicable)
- Install Claude Desktop from claude.ai/download.
- Generate an access token via the MotherDuck UI.
- Store the token securely.
Access Claude Desktop Configuration
- Open the Claude Desktop app.
- Navigate to
Settings>Developertab. - Click on the
Edit Configbutton.
Edit Configuration File
- Add the following configuration to your
claude_desktop_config.json:"mcpServers": { "mcp-server-motherduck": { "command": "uvx", "args": [ "mcp-server-motherduck", "--db-path", "md:", "--motherduck-token", "<YOUR_MOTHERDUCK_TOKEN_HERE>" ] } } - Replace
<YOUR_MOTHERDUCK_TOKEN_HERE>with your actual MotherDuck token.
- To connect to the default MotherDuck database, run:
uvx mcp-server-motherduck --db-path md: --motherduck-token <your_motherduck_token> - For a specific MotherDuck database:
uvx mcp-server-motherduck --db-path md:your_database_name --motherduck-token <your_motherduck_token> - For a local DuckDB database:
uvx mcp-server-motherduck --db-path /path/to/your/local.db - For an in-memory database:
uvx mcp-server-motherduck --db-path :memory:
- Execute the following command:
npx -y supergateway --stdio "uvx mcp-server-motherduck --db-path md: --motherduck-token <your_motherduck_token>"
--home-dir parameter is set correctly for local file access.uvx command is available in your PATH.spawn uvx ENOENT errors, specify the full path to uvx (output of which uvx).