MCP server · Databases
DuckDB and MotherDuck MCP server
The MotherDuck MCP server is MotherDuck’s official local MCP server for DuckDB. It lets an assistant run DuckDB SQL on local files, in-memory databases, S3-hosted databases or MotherDuck. It runs locally with uvx mcp-server-motherduck, is read-only by default, and needs a MotherDuck token only to connect to MotherDuck.
- Maintainer
- MotherDuck (official)
- Licence
- MIT
- Runs
- Locally (uvx)
- Sign-in
- Optional token
- Registry version
- 1.1.1 (updated 2026-11-11)
- Last activity
- 2026-10-07
Overview
What can the DuckDB / MotherDuck Local MCP server do?
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
Tools it gives the assistant
- 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
How do I install DuckDB / MotherDuck Local MCP in Claude Code, Cursor or VS Code?
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
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"
]
}
}
}
Need another app? Open DuckDB / MotherDuck Local MCP Server in the MCP config generator for a shared project .mcp.json, Devin, or several servers at once; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.
Is the DuckDB / MotherDuck Local MCP server safe? Check 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.
FAQ
DuckDB / MotherDuck Local MCP questions
Is the DuckDB / MotherDuck Local MCP server official?
Yes. MotherDuck publishes and maintains it, under the MIT licence. Install it only from the source linked on this page, not from a copy in another directory.
Is DuckDB / MotherDuck Local MCP server remote or local?
Local. Your MCP app starts it on your machine with uvx, and it runs with your user account’s permissions.
Does DuckDB / MotherDuck Local MCP server need an API key or account?
Not to start. It works without a key, and an API key or token from the service adds higher limits or more tools. You also need: uv (provides uvx); A MotherDuck account and token only if you connect to MotherDuck.
Why it’s listed
Why we list it
Vendor-maintained, simple to start and handy for local analytics on files and DuckDB databases.
Related
Alternatives and related servers: databases
- mcp-server-qdrant
- Pinecone Developer MCP Server
- MCP Toolbox for Databases
- Neon MCP Server
- Prisma MCP server
- MongoDB MCP Server
All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?