DuckDB MCP Server
@mustafahasankhan
DuckDB MCP Server について
A MCP server for DuckDB with auth and friendly sql support out of the box.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"duckdb-mcp-server": {
"command": "python",
"args": [
"-m",
"venv",
".venv",
"&&",
"source",
".venv/bin/activate"
]
}
}
}ツール
5Execute any SQL query. Results capped at 10 000 rows.
Describe the columns and types of a file or table.
Row count, numeric stats (min/max/avg/median), date ranges, top categorical values.
Suggest chart types and ready-to-run SQL queries based on column types.
Create or reset a session for cross-call context tracking.
概要
What is DuckDB MCP Server?
A Model Context Protocol (MCP) server that gives AI assistants full access to DuckDB — enabling them to query local files, S3/GCS buckets, and in-memory data using plain SQL. It is designed for any MCP-compatible client such as Claude Desktop, Cursor, or VS Code.
How to use DuckDB MCP Server?
Install with pip install duckdb-mcp-server, then configure via the --db-path flag (and optional --readonly, --s3-region, --s3-profile, --creds-from-env). After installation, set up the server in your client's MCP configuration file (e.g., claude_desktop_config.json). The server exposes five tools: query, analyze_schema, analyze_data, suggest_visualizations, and create_session.
Key features of DuckDB MCP Server
- Execute arbitrary SQL queries (capped at 10,000 rows).
- Analyze schema and data statistics for files or tables.
- Suggest visualizations with ready-to-run SQL templates.
- Query local CSV, Parquet, and JSON files directly.
- Cache remote S3/GCS data as local tables.
- Supports DuckDB SQL extensions (GROUP BY ALL, SELECT * EXCLUDE, etc.).
- Read‑only mode for shared or externally managed databases.
Use cases of DuckDB MCP Server
- Ask an AI assistant to load a local CSV and compute top products by revenue.
- Cache monthly signups from S3 and produce daily breakdowns without writing SQL.
- Get a statistical summary (row count, min/max/avg, date ranges) of any table.
- Have the assistant suggest chart types and corresponding SQL queries based on column types.
FAQ from DuckDB MCP Server
What is DuckDB MCP Server?
It is an MCP server that connects AI assistants to DuckDB, allowing them to query local and remote data using SQL through tools like query, analyze_data, and suggest_visualizations.
How does DuckDB MCP Server handle AWS credentials?
Credentials are resolved in this order: 1) environment variables (AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY when --creds-from-env is set), 2) a named AWS profile (--s3-profile), 3) the default credential chain (environment, shared credentials file, instance profile).
Can I use DuckDB MCP Server in read‑only mode?
Yes. Pass --readonly when starting the server; the database must already exist or an error is raised.
What is the row limit for query results?
The query tool caps results at 10,000 rows.
What Python version is required?
Python 3.10 or higher is required.
「データベース」の他のコンテンツ
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
MCP Alchemy
runekaagaardA MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.
Redis MCP Server
redisThe official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
コメント