A MCP server for MotherDuck
Project description
mcp-server-motherduck MCP server
A MCP server for MotherDuck and local DuckDB
Components
Resources
Prompts
The server implements one prompt:
- duckdb-motherduck-initial-prompt: A prompt to initialize a connection to duckdb or motherduck and start working with it
Tools
The server implements three tools:
- initialize-connection: Create a connection to either a local DuckDB or MotherDuck and retrieve available databases
- Takes "type" (DuckDB or MotherDuck) as input
- read-schemas: Get table schemas from a specific DuckDB/MotherDuck database
- Takes "database_name" as required string arguments
- execute-query: Execute a query on the MotherDuck (DuckDB) database
- Takes "query" as required string arguments
Configuration Claude Desktop
Add the snippet below to your Claude Desktop config and make sure to set the HOME var to your home folder (needed by DuckDB).
When using MotherDuck, you also need to set a MotherDuck token env var.
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Published Servers Configuration
``` "mcpServers": { "mcp-server-motherduck": { "command": "uvx", "args": [ "mcp-server-motherduck" ], "env": { "motherduck_token": "", "HOME": "" } } } ```Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Development/Unpublished Servers Configuration
``` "mcpServers": { "mcp-server-motherduck": { "command": "uv", "args": [ "--directory", "/Users//mcp-server/mcp-server-motherduck", "run", "mcp-server-motherduck" ] } } ```Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /Users/<username>/mcp-server/mcp-server-motherduck run mcp-server-motherduck
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_motherduck-0.2.0.tar.gz.
File metadata
- Download URL: mcp_server_motherduck-0.2.0.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70641426e4c1e675e465b760df7dca2f715ad95f8d7f37c4bef052fb6b277b5c
|
|
| MD5 |
3e3042c51a7df3ece95078bf842267e1
|
|
| BLAKE2b-256 |
8c34c9cea7eef6b6c2003853ffdc8af93e1d6d61b43f7e3801e8732bcc356947
|
File details
Details for the file mcp_server_motherduck-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mcp_server_motherduck-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14d6c969dcd73ea8e1d13fd033abcaf8c3f0a418ee6ec9d09b7d4220bf341cde
|
|
| MD5 |
4eb6d2d567804d134a653bf816129ae7
|
|
| BLAKE2b-256 |
15850aeaf9d49cf7f168e628c4371992c9612d91547c505df9bf34a2681a08c2
|