mcp-server-duckdb

This repository provides a Model Context Protocol (MCP) server for DuckDB, enabling database interaction through a unified SQL query tool. It supports querying, table creation, and schema inspection while offering readonly protection.

119
5

Here's a summary of the README content, aiming for clarity and conciseness:

mcp-server-duckdb

This project provides a Model Context Protocol (MCP) server for DuckDB, enabling interaction with DuckDB databases through MCP tools. It allows Language Models (LLMs) to query, create tables, and inspect schemas within a DuckDB database.

Overview

The server facilitates database operations via the Model Context Protocol.

Components

It currently implements one tool:

  • query: Executes SQL queries on the DuckDB database, accepting any valid DuckDB SQL statement as input and returning query results or success messages.

The server offers a unified query function, leveraging LLMs' ability to generate appropriate SQL for various database operations. A readonly mode, enforced by DuckDB's native protection, prevents write operations, ensuring data integrity.

Configuration

The server requires the db-path parameter, specifying the path to the DuckDB database file. The optional --readonly flag enables read-only mode, preventing database modifications.

Installation

Installation can be done via Smithery or by manually configuring Claude Desktop.

Development

Debugging is recommended using the MCP Inspector for visibility into communication, tool execution, and server state.

Repository

KT
ktanaka101

ktanaka101/mcp-server-duckdb

Created

November 30, 2024

Updated

March 28, 2025

Language

Python

Category

Database