Integrations
Enables direct SQL queries on various data sources including CSV, Parquet, JSON, and cloud storage like S3, allowing for sophisticated data analysis with DuckDB's analytical database capabilities.
Provides ability to query and analyze SQLite databases through DuckDB's interface, extending analytical capabilities to SQLite data sources.
DuckDB MCP Server
A Model Context Protocol (MCP) server implementation that enables AI assistants like Claude to interact with DuckDB for powerful data analysis capabilities.
🌟 What is DuckDB MCP Server?
DuckDB MCP Server connects AI assistants to DuckDB - a high-performance analytical database - through the Model Context Protocol (MCP). This allows AI models to:
- Query data directly from various sources like CSV, Parquet, JSON, etc.
- Access data from cloud storage (S3, etc.) without complex setup
- Perform sophisticated data analysis using SQL
- Generate data insights with proper context and understanding
🚀 Key Features
- SQL Query Tool: Execute any SQL query with DuckDB's powerful syntax
- Multiple Data Sources: Query directly from:
- Local files (CSV, Parquet, JSON, etc.)
- S3 buckets and cloud storage
- SQLite databases
- All other data sources supported by DuckDB
- Auto-Connection Management: Automatic database file creation and connection handling
- Smart Credential Handling: Seamless AWS/S3 credential management
- Documentation Resources: Built-in DuckDB SQL and data import reference for AI assistants
📋 Requirements
- Python 3.10+
- An MCP-compatible client (Claude Desktop, Cursor, VS Code with Copilot, etc.)
💻 Installation
Using pip
From source
🔧 Configuration
Command Line Options
Required Parameters:
--db-path
- Path to DuckDB database file (will be created if doesn't exist)
Optional Parameters:
--readonly
- Run in read-only mode (will error if database doesn't exist)--s3-region
- AWS S3 region (default: uses AWS_DEFAULT_REGION env var)--s3-profile
- AWS profile for S3 credentials (default: uses AWS_PROFILE or 'default')--creds-from-env
- Use AWS credentials from environment variables
🔌 Setting Up with Claude Desktop
- Install Claude Desktop from claude.ai/download
- Edit Claude Desktop's configuration file:macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:%APPDATA%/Claude/claude_desktop_config.json
- Add DuckDB MCP Server configuration:
📊 Example Usage
Once configured, you can ask your AI assistant to analyze data using DuckDB:
The AI will generate and execute the appropriate SQL:
Working with S3 Data
Query data directly from S3 buckets:
The AI will generate appropriate SQL to query S3:
🌩️ Cloud Storage Authentication
DuckDB MCP Server handles AWS authentication in this order:
- Explicit credentials (if
--creds-from-env
is enabled) - Named profile credentials (via
--s3-profile
) - Default credential chain (environment, shared credentials file, etc.)
🛠️ Development
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
This server cannot be installed
A Model Context Protocol server implementation that connects AI assistants to DuckDB, enabling them to query and analyze data from various sources including CSV, Parquet, JSON, and cloud storage through SQL.