New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

csvto-mcp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csvto-mcp

MCP server for local CSV, JSON and Excel conversion. Converts files on your own machine and never uploads them, and returns summaries instead of pulling whole files into the model's context.

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
29
-53.23%
Maintainers
1
Weekly downloads
 
Created
Source

csvto-mcp

An MCP server for converting CSV, JSON and Excel files — on the machine it runs on.

Point your assistant at a file path and it writes the converted file next to it. Nothing is uploaded anywhere, and the file's contents never pass through the model's context.

Why this exists

Two problems with asking an AI assistant to convert a spreadsheet:

  • The file has to go somewhere. Pasting it into the chat sends your data to a model provider; using a web converter sends it to that service's servers. Spreadsheets are exports — customer lists, payroll, transactions — and often shouldn't leave the machine.
  • Large files don't fit. A 50,000-row CSV pasted into a conversation is expensive, slow, and frequently just doesn't fit.

This server takes a path, does the work locally, and returns a short summary. A 200MB file costs the same number of tokens as a 2KB one.

Install

Claude Code:

claude mcp add csvto -- npx -y csvto-mcp

Or in any MCP client's config:

{
  "mcpServers": {
    "csvto": { "command": "npx", "args": ["-y", "csvto-mcp"] }
  }
}

Requires Node 18+.

Tools

ToolDoes
inspect_fileColumns, row count, detected types and parse warnings for a CSV, JSON or Excel file
read_rowsA slice of rows, with optional search and sorting — read part of a large file without loading all of it
csv_to_excelCSV → .xlsx workbook
csv_to_jsonCSV → JSON, as objects or arrays
csv_to_pdfCSV → paginated PDF table, headers repeated on every page
csv_to_sqlCSV → CREATE TABLE plus batched INSERTs (ANSI/PostgreSQL or MySQL)
csv_to_xmlCSV → XML
csv_to_markdownCSV → a Markdown table
json_to_csvJSON → CSV
excel_to_csv.xlsx → CSV

Types are inferred per column, not per cell

This is the part that matters, and it's where most converters quietly corrupt data.

A column is converted to numbers only if every value in it survives the round trip exactly. If one value would change, the whole column stays text. So:

  • 01234 keeps its leading zero instead of becoming 1234
  • A 16-digit account number stays itself instead of becoming 1.23457E+14
  • 1250.50 keeps its trailing zero instead of becoming 1250.5
  • A column never ends up as a mix of numbers and strings

Verified: 01234 survives a CSV → xlsx → CSV round trip intact.

Other behaviour worth knowing:

  • JSON → CSV takes the union of keys across all records, so fields that only appear in later records aren't dropped. Nested values are serialised back to JSON in the cell rather than discarded.
  • CSV → SQL escapes single quotes (O'Brien → 'O''Brien') and infers a type per column, so an identifier column stays TEXT.
  • CSV → XML rewrites column names that aren't valid element names (first name → first_name) rather than emitting a file no parser can read.
  • CSV → PDF is limited to the latin-1 character set. Characters outside it become question marks, and the tool tells you exactly which ones rather than letting you discover it later.

Example

> Inspect ~/exports/orders.csv, then convert it to Excel

  inspect_file  → orders.csv (csv): 48,210 rows, 9 columns.
                  Columns: order_id, customer, city, zip, amount, ...
  csv_to_excel  → Converted orders.csv -> ~/exports/orders.xlsx
                  48,210 rows, 9 columns.
                  Conversion ran locally. No file contents were uploaded anywhere.

The same tools in a browser

Everything here also runs as a web tool at csvtosite.com, using the same conversion engine, also entirely client-side.

Licence

MIT

Keywords

mcp

FAQs

Package last updated on 31 Aug 2026

Related posts