- Home
- MCP servers
- DuckDB
DuckDB
- other
0
GitHub Stars
other
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-ktanaka101_mcp-server-duckdb": {
"command": "uvx",
"args": [
"mcp-server-duckdb",
"--db-path",
"~/mcp-server-duckdb/data/data.db"
]
}
}
}You can interact with a DuckDB database through the Model Context Protocol (MCP). This server lets you run read and write operations, inspect schemas, and manage tables via MCP-compatible clients, while also supporting a safe read-only mode to protect your data.
How to use
Connect to the DuckDB MCP server from your MCP client and start issuing tools to read data, modify data, or explore table structures. Use read-query to run SELECT statements and receive results as text. Use list-tables to view available tables. Use describe-table to inspect a table’s schema. If you need to create tables or modify data, use create-table and write-query respectively, but in read-only mode those write-focused tools are disabled to prevent changes. In read-only mode the server will prevent any write operations and will not create the database file if it does not exist.
How to install
Prerequisites you need before running the server:
- Node.js and npm or the toolchain you prefer for MCP servers
- The MCP server package for DuckDB as shown below
Step-by-step setup to get started:
npx -y @smithery/cli install mcp-server-duckdb --client claude
- This installs the DuckDB MCP server for use with Claude Desktop
Additional configuration and usage notes
Configure how Claude Desktop connects to the MCP server to enable seamless local analysis of your DuckDB data.
{
"mcpServers": {
"duckdb": {
"command": "uvx",
"args": [
"mcp-server-duckdb",
"--db-path",
"~/mcp-server-duckdb/data/data.db"
]
}
}
}
Available tools
read-query
Execute SELECT queries to read data from the database. Input: query (string) must be a SELECT statement. Output: query results as text.
write-query
Execute INSERT, UPDATE, or DELETE queries to modify data. Input: query (string) must be a non-SELECT statement. Output: query results as text.
create-table
Create new tables in the database. Input: query (string) must be a CREATE TABLE statement. Output: success confirmation message.
list-tables
List all tables in the database. Input: none. Output: list of tables from information_schema.
describe-table
Get schema information for a specific table. Input: table_name (string). Output: table schema information.