Koskamo

mcp-server-motherduck

A local MCP server for DuckDB and MotherDuck that enables SQL analytics and data engineering for AI Assistants and IDEs. It allows connecting to local DuckDB files, in-memory databases, S3-hosted databases, and MotherDuck, supporting SQL read/write queries, catalog browsing, and dynamic connection switching.

Package and access

Local package with source-attributed installation metadata. Koskamo does not execute packages during review.

mcp-server-motherduck logo, by motherduckdbCommunity listingLocal stdioSource reviewed; not executedPublished by motherduckdb
You need:Install uv via pip install uv or brew install uv
Vendor documentation

What you can do with it

  • Execute SQL read and write queries
  • Browse database catalogs
  • Switch between different database connections
  • Connect AI assistants to data using DuckDB

Source and maintenance

Community listingRegistry 1.1.0
Maintenance checked

Packages and installation

Source-provided package data. Koskamo has not executed or live-probed this package.

mcp-server-motherduck 1.1.0

pypi
mcp-server-motherduck package definition
{
  "version": "1.1.0",
  "transport": "stdio",
  "identifier": "mcp-server-motherduck",
  "registryType": "pypi",
  "registryBaseUrl": "https://pypi.org",
  "packageArguments": [
    {
      "name": "--transport",
      "type": "named",
      "choices": [
        "stdio",
        "http",
        "sse",
        "stream"
      ],
      "default": "stdio",
      "description": "Transport type for MCP server. Use 'http' for HTTP Streamable transport."
    },
    {
      "name": "--port",
      "type": "named",
      "format": "number",
      "default": "8000",
      "description": "Port to listen on for HTTP transport"
    },
    {
      "name": "--host",
      "type": "named",
      "default": "127.0.0.1",
      "description": "Host to bind the MCP server"
    },
    {
      "name": "--db-path",
      "type": "named",
      "default": ":memory:",
      "description": "Database path: ':memory:' for in-memory, 'md:' for MotherDuck, or file/S3 path"
    },
    {
      "name": "--motherduck-token",
      "type": "named",
      "description": "Access token for MotherDuck connections"
    },
    {
      "name": "--read-write",
      "type": "named",
      "description": "Enable write access (server runs in read-only mode by default)"
    },
    {
      "name": "--allow-switch-databases",
      "type": "named",
      "description": "Enable the switch_database_connection tool to change databases at runtime"
    },
    {
      "name": "--motherduck-saas-mode",
      "type": "named",
      "description": "Enable SaaS mode for MotherDuck (disables local filesystem access)"
    },
    {
      "name": "--init-sql",
      "type": "named",
      "description": "SQL file path or SQL string to execute on startup"
    },
    {
      "name": "--home-dir",
      "type": "named",
      "description": "Home directory for DuckDB"
    },
    {
      "name": "--max-rows",
      "type": "named",
      "format": "number",
      "default": "1024",
      "description": "Maximum number of rows to return from queries"
    },
    {
      "name": "--max-chars",
      "type": "named",
      "format": "number",
      "default": "50000",
      "description": "Maximum number of characters in query results"
    },
    {
      "name": "--query-timeout",
      "type": "named",
      "format": "number",
      "default": "-1",
      "description": "Query execution timeout in seconds (-1 to disable)"
    },
    {
      "name": "--ephemeral-connections",
      "type": "named",
      "description": "Use temporary connections for read-only local DuckDB files (default: true)"
    }
  ],
  "environmentVariables": [
    {
      "name": "motherduck_token",
      "description": "Access token for MotherDuck connections (alternative to --motherduck-token)"
    },
    {
      "name": "MOTHERDUCK_TOKEN",
      "description": "Access token for MotherDuck connections (alternative to --motherduck-token)"
    },
    {
      "name": "HOME",
      "description": "Used by DuckDB for extensions and config. Override with --home-dir if not set."
    },
    {
      "name": "AWS_ACCESS_KEY_ID",
      "description": "AWS access key for S3 database connections"
    },
    {
      "name": "AWS_SECRET_ACCESS_KEY",
      "description": "AWS secret access key for S3 database connections"
    },
    {
      "name": "AWS_SESSION_TOKEN",
      "description": "AWS session token for temporary credentials"
    },
    {
      "name": "AWS_DEFAULT_REGION",
      "description": "AWS region for S3 database connections"
    },
    {
      "name": "AWS_ENDPOINT",
      "description": "AWS endpoint for S3 database connections"
    }
  ]
}

Tools

Reported by the attributed source; not independently observed by Koskamo.

No tool definitions available.

Connect from your client

Each snippet configures the same source-provided package; replace placeholders before use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Cursor

Merge this local stdio configuration, replace every placeholder environment value, and restart Cursor. Koskamo has not executed this package.
Cursor configuration
{
  "mcpServers": {
    "mcp-server-motherduck": {
      "command": "uvx",
      "args": [
        "mcp-server-motherduck==1.1.0"
      ],
      "env": {
        "motherduck_token": "<YOUR_MOTHERDUCK_TOKEN>",
        "MOTHERDUCK_TOKEN": "<YOUR_MOTHERDUCK_TOKEN>",
        "HOME": "<YOUR_HOME>",
        "AWS_ACCESS_KEY_ID": "<YOUR_AWS_ACCESS_KEY_ID>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
        "AWS_SESSION_TOKEN": "<YOUR_AWS_SESSION_TOKEN>",
        "AWS_DEFAULT_REGION": "<YOUR_AWS_DEFAULT_REGION>",
        "AWS_ENDPOINT": "<YOUR_AWS_ENDPOINT>"
      }
    }
  }
}

Cline

Merge this local stdio configuration, replace every placeholder environment value, and restart Cline. Koskamo has not executed this package.
Cline configuration
{
  "mcpServers": {
    "mcp-server-motherduck": {
      "command": "uvx",
      "args": [
        "mcp-server-motherduck==1.1.0"
      ],
      "env": {
        "motherduck_token": "<YOUR_MOTHERDUCK_TOKEN>",
        "MOTHERDUCK_TOKEN": "<YOUR_MOTHERDUCK_TOKEN>",
        "HOME": "<YOUR_HOME>",
        "AWS_ACCESS_KEY_ID": "<YOUR_AWS_ACCESS_KEY_ID>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
        "AWS_SESSION_TOKEN": "<YOUR_AWS_SESSION_TOKEN>",
        "AWS_DEFAULT_REGION": "<YOUR_AWS_DEFAULT_REGION>",
        "AWS_ENDPOINT": "<YOUR_AWS_ENDPOINT>"
      }
    }
  }
}

VS Code

Merge this local stdio configuration, replace every placeholder environment value, and restart VS Code. Koskamo has not executed this package.
VS Code configuration
{
  "servers": {
    "mcp-server-motherduck": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-server-motherduck==1.1.0"
      ],
      "env": {
        "motherduck_token": "<YOUR_MOTHERDUCK_TOKEN>",
        "MOTHERDUCK_TOKEN": "<YOUR_MOTHERDUCK_TOKEN>",
        "HOME": "<YOUR_HOME>",
        "AWS_ACCESS_KEY_ID": "<YOUR_AWS_ACCESS_KEY_ID>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
        "AWS_SESSION_TOKEN": "<YOUR_AWS_SESSION_TOKEN>",
        "AWS_DEFAULT_REGION": "<YOUR_AWS_DEFAULT_REGION>",
        "AWS_ENDPOINT": "<YOUR_AWS_ENDPOINT>"
      }
    }
  }
}

Claude Desktop

Merge this local stdio configuration, replace every placeholder environment value, and restart Claude Desktop. Koskamo has not executed this package.
Claude Desktop configuration
{
  "mcpServers": {
    "mcp-server-motherduck": {
      "command": "uvx",
      "args": [
        "mcp-server-motherduck==1.1.0"
      ],
      "env": {
        "motherduck_token": "<YOUR_MOTHERDUCK_TOKEN>",
        "MOTHERDUCK_TOKEN": "<YOUR_MOTHERDUCK_TOKEN>",
        "HOME": "<YOUR_HOME>",
        "AWS_ACCESS_KEY_ID": "<YOUR_AWS_ACCESS_KEY_ID>",
        "AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
        "AWS_SESSION_TOKEN": "<YOUR_AWS_SESSION_TOKEN>",
        "AWS_DEFAULT_REGION": "<YOUR_AWS_DEFAULT_REGION>",
        "AWS_ENDPOINT": "<YOUR_AWS_ENDPOINT>"
      }
    }
  }
}

Let your agent find its tools

Find servers like mcp-server-motherduck from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.