MCP server · Databases
DuckDB / MotherDuck Local MCP server
Lets an assistant run DuckDB SQL on local files, in-memory databases, S3-hosted databases or MotherDuck, read-only unless you allow writes.
- Maintainer
- MotherDuck (official)
- Licence
- MIT
- Runs
- Locally (uvx)
- Sign-in
- Optional token
- Registry version
- 1.1.0 (updated 2026-10-07)
- Last activity
- 2026-10-07
Overview
What it does
This server from MotherDuck runs DuckDB through uvx. You give it a database path: a local .duckdb file, :memory:, an s3:// URL or md: for MotherDuck, which also needs a MotherDuck token. It then exposes a small set of tools to run SQL and browse databases, tables and columns. Results are capped at 1,024 rows and 50,000 characters by default.
Connections are read-only unless you add --read-write. A read-only connection to a local file does not hold the file lock, so you can keep writing to it from another tool. The --allow-switch-databases flag lets the assistant move between databases while it runs. It is a good choice for quick analysis of local data files and DuckDB databases. MotherDuck also runs a hosted remote MCP server, which it recommends when third parties need access.
Tools
What the assistant can do
- execute_query in the DuckDB SQL dialect
- list_databases, list_tables and list_columns
- switch_database_connection (with --allow-switch-databases)
- Local files, in-memory, S3 and MotherDuck databases
- Row, character and timeout limits on results
Install
Install DuckDB / MotherDuck Local MCP server in your app
You need:
- uv (provides uvx)
- A MotherDuck account and token only if you connect to MotherDuck
Run in your project. --scope local keeps the servers private to you in this project; use user for every project.
claude mcp add --scope local motherduck -- uvx mcp-server-motherduck --db-path /absolute/path/to/your.duckdb
claude mcp add --scope local motherduck -- uvx mcp-server-motherduck --db-path /absolute/path/to/your.duckdb
Project root. Commit it to share the servers with your team; each person sets the variables in their own shell.
{
"mcpServers": {
"motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"/absolute/path/to/your.duckdb"
]
}
}
}
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json (Settings → Developer → Edit Config). Restart Claude after saving.
{
"mcpServers": {
"motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"/absolute/path/to/your.duckdb"
]
}
}
}
In your project, or ~/.cursor/mcp.json for every project.
{
"mcpServers": {
"motherduck": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"/absolute/path/to/your.duckdb"
]
}
}
}
In your workspace. VS Code asks for each secret the first time a server starts and stores it securely.
{
"servers": {
"motherduck": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"/absolute/path/to/your.duckdb"
]
}
}
}
macOS/Linux: ~/.config/devin/mcp_config.json · Windows: %APPDATA%\devin\mcp_config.json. Read by the default Devin Local agent and by the legacy Cascade agent.
{
"mcpServers": {
"motherduck": {
"command": "uvx",
"args": [
"mcp-server-motherduck",
"--db-path",
"/absolute/path/to/your.duckdb"
]
}
}
}
Want it alongside other servers? Open DuckDB / MotherDuck Local MCP Server in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.
Before you install
- Read-only by default; --read-write lets the assistant change data.
- MotherDuck notes that read-only mode alone still allows local filesystem access and changes to DuckDB settings; use --init-sql or SaaS mode to lock it down before sharing access.
- Pass the MotherDuck token through the motherduck_token environment variable rather than on the command line.
- A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.
Why it’s listed
Why we list it
Vendor-maintained, simple to start and handy for local analytics on files and DuckDB databases.
Related
More MCP servers
- Neon MCP ServerLets an assistant manage Neon Postgres projects and branches, run SQL, and test schema migrations on a temporary branch first.
- Prisma MCP serverLets an assistant create and query Prisma Postgres databases, restore backups, and manage Prisma Compute apps and Object Storage.
- MongoDB MCP ServerLets an assistant query and manage MongoDB databases and, with Atlas credentials, manage Atlas projects, clusters and users.
- Redis MCP ServerLets an assistant read and write Redis data types, streams and JSON documents, and run vector search on a Redis database.
- ClickHouse MCP ServerLets an assistant list ClickHouse databases and tables and run SQL queries, read-only by default, plus optional embedded chDB queries.
- mcp-server-qdrantGives an assistant a semantic memory: it stores notes in a Qdrant collection and finds them later by meaning rather than exact words.
All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?