Skip to content

Repository files navigation

SQL CSV Chomper

A VS Code extension and MCP server for querying and editing CSV/TSV files using SQL, powered by DuckDB.

Install from VS Code Marketplace

Features

  • Custom CSV Editor — Open delimited files in VS Code with a full SQL IDE layout
  • Full SQL Support — Write and execute DuckDB SQL against your CSV files
  • Format Preservation — The source delimiter, quoting and header are detected on load and reused on save, so a pipe- or tab-delimited file is never silently rewritten as comma-delimited
  • Load Options — Override the column delimiter, row delimiter, header, quoting or encoding when detection gets it wrong, and re-read the file in place
  • Virtual Scrolling — Handles 500K+ rows with chunked loading
  • Resizable Columns — Drag any column edge; double-click the handle to auto-fit
  • Column Filtering — Excel-style filter panels with value checkboxes, search, date histograms
  • Column Profiling — Distinct, null, whitespace-only and max-length stats per column
  • Inline Editing — Double-click cells to edit, save back to disk
  • Column Operations — Rename, insert, delete columns via right-click
  • Find & Replace — Regex and case-sensitive search across columns
  • Save As — Export with custom delimiter, quoting, row numbers
  • Multi-Table Support — Load multiple files and JOIN across them
  • MCP Server — Expose CSV querying, profiling and table diffing to Claude, Copilot, and other AI assistants

Project Structure

packages/
extension/ # VS Code extension (custom editor provider)
webapp/ # React editor UI (Monaco, TanStack Table, DuckDB WASM)
mcp-server/ # MCP server for LLM integration (native DuckDB)

Development

npm install
npm run build # Build all packages
npm run dev # Run webapp standalone for development

Press F5 in VS Code to launch the Extension Development Host for testing.

Publishing

cd packages/extension
npx @vscode/vsce publish --no-dependencies

MCP Server

The MCP server lets AI assistants load, query, edit, and save CSV files via SQL. It auto-installs the native DuckDB binary on first run.

See the extension README for full setup instructions (Claude Code, Copilot, terminal).

Quick setup (Claude Code)

claude mcp add sql-csv-chomper --scope user -- npx -y sql-csv-chomper-mcp

Available MCP Tools

ToolDescription
load_csv / unload_csvLoad a delimited file as a named table (dialect detected and overridable), or drop it
execute_sqlRun SQL queries against loaded tables
list_tables / list_columns / get_schemaInspect loaded data
profile_table / profile_fileColumn stats, or scan a file before loading it
diff_tablesSchema-aware diff of two tables on a key column
update_rows / insert_row / delete_rowsEdit data
save_tableWrite a table back out, in its original dialect by default
list_remembered_tables / reload_remembered_tablesRe-load tables from a previous session
set_editor_sql / run_editor_queryPush SQL into the VS Code editor

See the MCP server README for details, including a note on how DuckDB treats empty CSV fields as NULL.

License

MIT

About

Simple VS Code editor meant for easily querying and editing csv files using SQL built on duckdb

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages