Skip to main content

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:

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_motherduck-0.2.0.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_motherduck-0.2.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_motherduck-0.2.0.tar.gz.

File metadata

File hashes

Hashes for mcp_server_motherduck-0.2.0.tar.gz
Algorithm Hash digest
SHA256 70641426e4c1e675e465b760df7dca2f715ad95f8d7f37c4bef052fb6b277b5c
MD5 3e3042c51a7df3ece95078bf842267e1
BLAKE2b-256 8c34c9cea7eef6b6c2003853ffdc8af93e1d6d61b43f7e3801e8732bcc356947

See more details on using hashes here.

File details

Details for the file mcp_server_motherduck-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_motherduck-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14d6c969dcd73ea8e1d13fd033abcaf8c3f0a418ee6ec9d09b7d4220bf341cde
MD5 4eb6d2d567804d134a653bf816129ae7
BLAKE2b-256 15850aeaf9d49cf7f168e628c4371992c9612d91547c505df9bf34a2681a08c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page