Skip to main content
William Boyden
Theme: Night, matching your device
Status
shipped
Period
2026
Dated
Role
Design and implementation

DuckDB MCP Server

MCP server exposing 15 DuckDB tools — query, schema, import/export, profiling, cross-database — over stdio JSON-RPC. It drives the DuckDB CLI binary via subprocess and encodes 9 benchmark-proven best practices.

Python 3.11+mcp SDKDuckDB CLI 1.5.4+stdio JSON-RPCpytest
tools exposed
15
benchmark suite
14 benchmarks
100K bulk insert
27 ms

Highlights

  • 15 tools spanning query, DDL/DML, CSV/Parquet import-export, profiling, ATTACH-based cross-DB joins
  • CLI subprocess over the Python binding: no version drift, -json output parsed with recursive type coercion to int/float/bool/None
  • Multi-statement SQL via temp files and duckdb -f, dodging argument-length limits
  • 9 benchmark-proven best practices as code (bulk insert via generate_series: 100K users in 27 ms; 3x100K cross-DB join in 8 ms; Parquet at ~27% of CSV size), each pinned by an integration test
  • Pitfall guard for the real DuckDB failure mode: IDENTITY/SERIAL fails, so auto-increment goes through CREATE SEQUENCE + nextval()

Related writing