MotherDuck's DuckDB MCP Server
@motherduckdb
MotherDuck's DuckDB MCP Server について
Local MCP server for DuckDB and MotherDuck
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"DuckDB (in-memory, r/w)": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
":memory:",
"--read-write",
"--allow-switch-databases"
]
}
}
}ツール
4Execute SQL query (DuckDB dialect)
List all databases (useful for MotherDuck or multiple attached DBs)
List tables and views
List columns of a table/view
概要
What is MotherDuck's DuckDB MCP Server?
An MCP server that connects AI assistants and IDEs to DuckDB's analytical SQL engine. It supports local DuckDB files, in-memory databases, S3-hosted databases, and MotherDuck. Users can execute SQL queries, browse database catalogs, and switch between connections at runtime.
How to use MotherDuck's DuckDB MCP Server?
Install uv via pip install uv or brew install uv, then add a JSON configuration to your MCP client’s config file. Use the command uvx mcp-server-motherduck with args like --db-path :memory: for in-memory, --db-path /path/to/file.duckdb for local files, or --db-path md: for MotherDuck. Additional flags control read-write access, database switching, and security.
Key features of MotherDuck's DuckDB MCP Server
- Execute SQL queries in DuckDB dialect.
- List databases, tables, and columns.
- Switch database connections at runtime (requires
--allow-switch-databases). - Read-only mode by default for safety.
- Supports local, S3, and MotherDuck databases.
- Configurable row and character limits for results.
Use cases of MotherDuck's DuckDB MCP Server
- Analyze local DuckDB files from an AI assistant.
- Query an in-memory database for development and testing.
- Connect to MotherDuck for cloud-based analytics.
- Ingest or export data between remote databases and local filesystem.
FAQ from MotherDuck's DuckDB MCP Server
What is the difference between the local and remote MCP server?
The local server runs on your machine and requires installation; the remote server is hosted by MotherDuck with zero setup. Both support read-write, but only the local server can access the local filesystem.
How do I enable write access?
Add the --read-write flag. Without it, the server runs in read-only mode by default.
What are the default settings for database path and access?
The default --db-path is :memory: (in-memory). The server starts in read-only mode unless --read-write is set.
How do I connect to MotherDuck?
Set --db-path md: and provide a MotherDuck token via the motherduck_token environment variable or --motherduck-token flag. Use a read-scaling token for read-only access.
How do I secure the server for production?
Read-only mode is not sufficient when giving third parties access. Consider using MotherDuck Remote MCP, or self-host with service accounts, read-scaling tokens, SaaS mode (--motherduck-saas-mode), and --init-sql to apply security settings.
「データベース」の他のコンテンツ
Multi Database MCP Server
FreePeakA powerful multi-database server implementing the Model Context Protocol (MCP) to provide AI assistants with structured access to databases.
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Meilisearch MCP Server
meilisearchA Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
MCP Alchemy
runekaagaardA MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.
コメント