Skip to content

navisbio/mcp_motherduck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MotherDuck MCP Server

Overview

A Model Context Protocol (MCP) server implementation that provides read-only access to MotherDuck databases. Supports database and schema-level access control.

Tools

  • motherduck-list-tables

    • Lists available tables in the database
    • Optional filter by database name
    • Example: {"database": "compound_pipeline"}
  • motherduck-describe-table

    • Shows table structure (columns, types, nullability)
    • Requires full table name: database.schema.table
    • Example: {"table_name": "compound_pipeline.oncology_all.genetarget"}
  • motherduck-query

    • Executes read-only SQL queries
    • Requires fully qualified table names
    • Example: {"sql": "SELECT * FROM compound_pipeline.oncology_all.genetarget LIMIT 5"}

Configuration

Required Environment Variables

  • MOTHERDUCK_TOKEN: Your MotherDuck authentication token

Optional Environment Variables

  • ALLOWED_DATASETS: Restrict access to specific databases/schemas
    • Format: database or database.schema (comma-separated)
    • Examples:
      # Full database access
      ALLOWED_DATASETS=compound_pipeline
      
      # Single schema access
      ALLOWED_DATASETS=compound_pipeline.oncology_all
      
      # Multiple schemas
      ALLOWED_DATASETS=compound_pipeline.oncology_all,compound_pipeline.clinicaltrials

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "MOTHERDUCK-MCP": {
      "command": "uv",
      "args": ["-m", "mcp_server_motherduck"],
      "env": {
        "MOTHERDUCK_TOKEN": "YOUR_TOKEN",
        "ALLOWED_DATASETS_MOTHERDUCK": "YOUR_ALLOWED_DATASETS"  // Optional
      }
    }
  }
}

License

GNU General Public License v3.0 (GPL-3.0)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages