# MCP Server Motherduck (MCP server)

> MCP Server Motherduck is an MCP server that adds data and analytics tools to AI assistants such as Claude Desktop, Claude Code and Cursor. SQL analytics and data engineering for AI Assistants and IDEs. It has 526 GitHub stars, is released under the MIT license and runs locally with uvx mcp-server-motherduck.

SQL analytics and data engineering for AI Assistants and IDEs. Connect AI assistants to your data using DuckDB's powerful analytical SQL engine. Supports connecting to local DuckDB files, in-memory databases, S3-hosted databases, and MotherDuck. Allows executing SQL read- and write-queries, browsing database catalogs, and switching between different database connections on-the-fly.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/motherduckdb/mcp-server-motherduck |
| GitHub stars | 526 |
| License | MIT |
| Language | Python |
| Transport | stdio |
| Packages | pypi: mcp-server-motherduck |
| Remote URL | none |
| Needs API key | yes |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | Data & analytics |
| Latest release | v1.0.8 (Aug 19, 2026) |
| Last commit | Aug 19, 2026 |
| MCP registry name | io.github.motherduckdb/mcp-server-motherduck |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-server-motherduck": {
      "command": "uvx",
      "args": [
        "mcp-server-motherduck"
      ],
      "env": {
        "MOTHERDUCK_TOKEN": "your-value",
        "AWS_ACCESS_KEY_ID": "your-value",
        "AWS_SECRET_ACCESS_KEY": "your-value",
        "AWS_SESSION_TOKEN": "your-value"
      }
    }
  }
}
```

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env MOTHERDUCK_TOKEN=your-value --env AWS_ACCESS_KEY_ID=your-value --env AWS_SECRET_ACCESS_KEY=your-value --env AWS_SESSION_TOKEN=your-value --transport stdio mcp-server-motherduck -- uvx mcp-server-motherduck
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-server-motherduck": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-server-motherduck"
      ],
      "env": {
        "MOTHERDUCK_TOKEN": "your-value",
        "AWS_ACCESS_KEY_ID": "your-value",
        "AWS_SECRET_ACCESS_KEY": "your-value",
        "AWS_SESSION_TOKEN": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

### VS Code (.vscode/mcp.json)

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "motherduck_token",
      "description": "MOTHERDUCK_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "aws_access_key_id",
      "description": "AWS_ACCESS_KEY_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "aws_secret_access_key",
      "description": "AWS_SECRET_ACCESS_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "aws_session_token",
      "description": "AWS_SESSION_TOKEN",
      "password": true
    }
  ],
  "servers": {
    "mcp-server-motherduck": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-server-motherduck"
      ],
      "env": {
        "MOTHERDUCK_TOKEN": "${input:motherduck_token}",
        "AWS_ACCESS_KEY_ID": "${input:aws_access_key_id}",
        "AWS_SECRET_ACCESS_KEY": "${input:aws_secret_access_key}",
        "AWS_SESSION_TOKEN": "${input:aws_session_token}"
      }
    }
  }
}
```

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `MOTHERDUCK_TOKEN` (secret): Access token for MotherDuck connections (alternative to --motherduck-token)
- `HOME`: Used by DuckDB for extensions and config. Override with --home-dir if not set.
- `AWS_ACCESS_KEY_ID` (secret): AWS access key for S3 database connections
- `AWS_SECRET_ACCESS_KEY` (secret): AWS secret access key for S3 database connections
- `AWS_SESSION_TOKEN` (secret): AWS session token for temporary credentials
- `AWS_DEFAULT_REGION`: AWS region for S3 database connections
- `AWS_ENDPOINT`: AWS endpoint for S3 database connections

## Tools

- `execute_query`: Execute SQL query (DuckDB dialect)
- `list_databases`: List all databases (useful for MotherDuck or multiple attached DBs)
- `list_tables`: List tables and views
- `list_columns`: List columns of a table/view

## Similar MCP servers

- [Ida Pro MCP](https://appsgit.com/mcp-servers/ida-pro-mcp): AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP. (12,497 stars, MIT)
- [Ask Jev](https://appsgit.com/mcp-servers/ask-jev): Evaluate state with typed choice, score, and probability questions. (5,174 stars, MIT, needs API key)
- [Jitsu](https://appsgit.com/mcp-servers/jitsu): Manage Jitsu data pipelines: destinations, streams, connections, functions, live events. (5,101 stars, MIT, official)
- [Google Ads + Meta Ads + SEO/GEO MCP](https://appsgit.com/mcp-servers/google-ads-meta-ads-seo-geo-mcp): Google Ads, Meta Ads, SEO, GEO & GA4 MCP by Ryze AI - audits, reports, keywords, Search Console. (4,107 stars, MIT)
- [Blitz](https://appsgit.com/mcp-servers/blitz): Give AI agents full control over iOS/macOS development via a native macOS app with 30+ MCP tools. (1,754 stars, Apache-2.0)
- [Chunkhound](https://appsgit.com/mcp-servers/chunkhound): Your entire engineering context, deeply understood. (1,445 stars, MIT, official)

---

Canonical page: https://appsgit.com/mcp-servers/mcp-server-motherduck
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
