MCP Server

A DuckDB MCP server

Local serverstdioPython

What is the MCP MCP server?

A DuckDB MCP server. The mcp mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 10 defined tools rather than through you.

What it actually does

A Model Context Protocol (MCP) server implementation for DuckDB, providing database interaction capabilities through MCP tools. It would be interesting to have LLM analyze it. DuckDB is suitable for local analysis.

This server enables interaction with a DuckDB database through the Model Context Protocol, allowing for database operations like querying, table creation, and schema inspection.

Its toolset

Everything the assistant can do here goes through one of these:

  • query — Execute any SQL query on the DuckDB database
  • Input — query (string) - Any valid DuckDB SQL statement
  • Output — Query results as text (or success message for operations like CREATE/INSERT)
  • Resources — The Resources tool exposed by this server
  • Prompts — The Prompts tool exposed by this server
  • Tools — The server implements the following database interaction tool:
  • MacOS — Location: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows — The Windows tool exposed by this server
  • Prerequisites — The Prerequisites tool exposed by this server
  • Debugging — Debugging MCP servers can be challenging due to their stdio-based communication. We recommend using the [MCP

Adding it to your client

@smithery/cli on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration

  • Python with uv package manager - DuckDB Python package - MCP server dependencies

When to reach for it

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP's toolset — query, Input, Output and 7 more — is a fair guide to whether it matches your workflow.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MCP.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
queryExecute any SQL query on the DuckDB database
Inputquery (string) - Any valid DuckDB SQL statement
OutputQuery results as text (or success message for operations like CREATE/INSERT)
ResourcesThe Resources tool exposed by this server.
PromptsThe Prompts tool exposed by this server.
ToolsThe server implements the following database interaction tool:
MacOSLocation: ~/Library/Application Support/Claude/claude_desktop_config.json
WindowsThe Windows tool exposed by this server.
PrerequisitesThe Prerequisites tool exposed by this server.
DebuggingDebugging MCP servers can be challenging due to their stdio-based communication. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for the best debugging experience.

How to install the MCP MCP server

{
  "mcpServers": {
    "server-duckdb": {
      "command": "npx",
      "args": ["-y", "@smithery/cli"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python with uv package manager - DuckDB Python package - MCP server dependencies

Example prompts to try

  • Use MCP to query.
  • Use MCP to Input.
  • Use MCP to Output.

Frequently asked questions

It connects MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (query, Input, Output, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP directly.