Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

MCP server duckdb

MCP server by ktanaka101 Verified · gh:ktanaka101

Lets an AI assistant run SQL against a local DuckDB database through one query tool. It is aimed at users who want to query data, create tables, or inspect schemas in DuckDB files.

  • Score 57
  • 179 stars
  • MIT
  • Updated

Install MCP server duckdb

Built from the published package, never by AI.

claude mcp add mcp-server-duckdb -- uvx mcp-server-duckdb

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install MCP server duckdb in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mcp-server-duckdb block.

About

mcp-server-duckdb is a Model Context Protocol server that lets an AI assistant interact with a DuckDB database. It exposes one tool, query, which runs any DuckDB SQL statement and returns results as text, or a success message for statements such as CREATE and INSERT. The source says DuckDB is suitable for local analysis, and the project is meant for that kind of work.

The server is started with a path to a database file and creates the file and its parent directories if they do not exist. A readonly flag opens the database in read-only mode, which blocks write operations and stops the file from being created. An optional keep-connection flag reuses one connection for the server lifetime, which enables TEMP objects but can hold an exclusive lock on the file. It is intended for people who want an assistant to query or analyze DuckDB data.

Written from the project's README and checked against it.

Tools it gives your assistant

  • queryExecutes any valid DuckDB SQL statement and returns the results as text.

What you need

  • Python with the uv package manager
  • DuckDB Python package
  • Claude Desktop for the documented configuration

Try asking

  • Show me all the tables and columns in my DuckDB database.
  • Create a table called sales and insert three sample rows into it.
  • Run a join across my customers and orders tables and summarize the results.

Good to know

  • In readonly mode, write operations such as CREATE, INSERT, UPDATE and DELETE are blocked.
  • In readonly mode, the database file is not created if it does not exist.
  • Keep-connection mode can hold an exclusive lock on the database file.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to MCP server duckdb

All alternatives →
Supabase supabase
97

Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.

AAA Local and remote 172k/wk
ArcadeDB MCP Server ArcadeData
94

ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.

AAA Local 1.3k
DBHubbytebase
94

Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.

AAA Local 343k/wk
MCP Toolbox for Databasesgoogleapis
94

MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.

AAA Local 17k
MCP Toolbox for Databasesgoogleapis
94

Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.

AAA Local 17k
mongodb-mcp-servermongodb-js
94

MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.

AAA Local 203k/wk

Compare with Supabase, ArcadeDB MCP Server or DBHub

MCP server duckdb: common questions

Does the server let the assistant change my database?

By default it can run any SQL statement, including writes. With the readonly flag, DuckDB's native read-only protection blocks write operations.

Why is there only one query tool?

The source says modern LLMs can generate the right SQL for any database operation, so a single unified query function is used instead of separate endpoints.

What does the keep-connection option do?

It reuses a single DuckDB connection for the whole server lifetime. This enables TEMP objects and slightly faster queries, but can hold an exclusive lock on the file.

How do I install MCP server duckdb?

In Claude Code run claude mcp add mcp-server-duckdb -- uvx mcp-server-duckdb. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is MCP server duckdb the official server?

MCP server duckdb is published by gh:ktanaka101 from its verified domain in the official MCP Registry.

Is MCP server duckdb free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is MCP server duckdb safe to use?

It scores 57 of 100. Grades: maintenance F, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to MCP server duckdb?

Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.

Does MCP server duckdb work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

MCP server duckdb Install

Add to stack

Loading.