A Model Context Protocol (MCP) server implementation that provides read-only access to MotherDuck databases. Supports database and schema-level access control.
-
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"}
MOTHERDUCK_TOKEN
: Your MotherDuck authentication token
ALLOWED_DATASETS
: Restrict access to specific databases/schemas- Format:
database
ordatabase.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
- Format:
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
}
}
}
}
GNU General Public License v3.0 (GPL-3.0)