New · Model Context Protocol

Build a CSV importer by asking for one.

The CSVbox MCP server turns importer-sheet management into tools your AI client can call directly. Describe the importer you want in plain language from Claude, Cursor, Windsurf, Cline, Roo Code or VS Code — and get a validated CSVbox sheet generated, created and live, without hand-writing JSON against the REST API.

Package
@csvbox/mcp-server
Executable
csvbox-mcp-server
Transport
stdio
Surface
9 tools · 2 prompts
Requires
Node.js ≥ 18
License
MIT
What it is

A sentence in. A working importer out.

CSVbox handles the CSV and XLSX import widget your app embeds. This server handles the configuration side — the importer “sheet” that defines columns, validation rules, destinations and webhooks. Point any Model Context Protocol client at it and that whole step collapses into a request in plain language.

There are deliberately no get_sheet or list_sheet tools: the CSVbox API itself exposes no GET or LIST endpoints for sheets.

Reference

Nine tools, two prompts

Everything the server registers on connect. Five tools call the CSVbox API and need credentials; the rest run locally or against a model.

Registered MCP tools, their purpose, and the CSVbox API call each makes
ToolPurposeAPI call
create_sheetCreate a CSVbox sheetPOST /1.1/sheet
update_sheetReplace an existing sheet (PUT semantics)PUT /1.1/sheet/{key}
patch_sheetPartially update a sheet (merge semantics)PATCH /1.1/sheet/{key}
generate_sheet_jsonNatural-language prompt → complete sheet JSONLLM only
create_importer_from_promptPrompt → validate → create, in one callPOST /1.1/sheet
generate_import_codeIntegration snippet for vanilla JS, React, Vue or AngularNone
generate_sheet_functionsPrompt → virtual columns, validation functions, transformsLLM only
validate_schemaLocal schema validation against CSVbox’s rulesNone
submit_fileSubmit a file for import, by URL or direct uploadPOST /1.1/file

MCP prompts

Two prompts hand generation to the client’s own model instead of the server’s — the path to take when you would rather not configure a server-side LLM key at all.

create_csvbox_sheet

Guides the host client’s own model to build a complete CSVbox sheet — no server-side LLM key needed.

csvbox_sheet_functions

Guides the host client’s own model to author virtual columns, validation functions and data transforms — again key-free.

Generation

From a sentence to a sheet

generate_sheet_json and create_importer_from_prompt turn a free-form request into a complete sheet — title, columns, destinations, webhooks, security settings and steps. Only real data fields become columns; destination, domain, region and file-type settings are routed to their own config sections.

01Your API usage

Server-side LLM

ANTHROPIC_API_KEY or OPENAI_API_KEY is set, so the server calls the model itself and returns finished sheet JSON.

02Free

MCP prompt

No server key. The host client — Claude Desktop, Cursor, Cline — runs generation with its own model, then calls validate_schema and create_sheet.

03

Neither

No LLM anywhere. You get a structured error pointing at the MCP prompt, and the CSVbox API is never called.

Generation resolves through these tiers in order — the first one available wins.

Extraction mode

Default

The prompt names concrete fields — “columns name, email, phone” — and only those become columns. Nothing is invented.

Expansion mode

On request

Triggered by a named business module, a request for a “comprehensive” schema, or an explicit column-count floor. A module like Suppliers expands into realistic prefixed columns — supplier_id, supplier_gstin — with every name kept globally unique.

Type inference

Field names and requested types are mapped onto CSVbox column types automatically, with the obvious validators attached.

How field name patterns map to CSVbox column types and validators
Field patternColumn typeValidators
Dropdown, status, fixed categorylistvalues: [...]
Percentagenumbermin_value: 0, max_value: 100
Quantity, cost, age (positive)numbermin_value: 0
Emailemail
Phone, mobilephone_number
URL, websiteurl
Price, salary, amountcurrency
Date fieldsdateformat: "YYYY-MM-DD"
Boolean, is_*boolean
GST, GSTIN, tax idregexGSTIN pattern
Indian PIN coderegex^[1-9][0-9]{5}$

Schemas over 100 columns. Override the cheap default model (claude-haiku-4-5 or gpt-4o-mini) with a stronger one via LLM_MODEL. Oversized output is flagged TRUNCATED rather than silently cut or mis-parsed, and the CSVbox API is not called.

Custom logic

Virtual columns, validators, transforms

Beyond the six core sheet properties, CSVbox accepts three collections whose items carry a js_code string that CSVbox executes during a real import.

The three function collections, their identity keys, limits, and js_code contracts
CollectionIdentified byMaxjs_code must…
virtual_columnscolumn_name20return the computed cell value
validation_functionsfunction_name10return an array of error strings ([] = valid)
data_transformstransform_name10mutate the csvbox object and return it

The csvbox object

Inside js_code, the csvbox object exposes row, column, virtual, user, import and environment.

A virtual column reads csvbox.row.<name> — one row, a scalar. A column-scoped function reads csvbox.column.<name> — the whole column, an array. The two are not interchangeable, and confusing them is the most common way a generated function fails at import time.

Third-party scripts

An item may load up to five third-party scripts, restricted to a fixed CDN allowlist: cdn.jsdelivr.net, unpkg.com and cdnjs.cloudflare.com — https only, a .js or .mjs path, and no query string, fragment, userinfo or port.

dependency
{
  "url": "https://cdn.jsdelivr.net/npm/dayjs@1.11.10/dayjs.min.js",
  "globals": ["dayjs"],
  "integrity": "sha384-..."
}

The MCP server never executes js_code. It is an opaque, unreviewed string here, and only runs later inside CSVbox during a real import. Read generated code before applying it with patch_sheet. A dependency without an integrity digest can change under your users at any time — validate_schema warns when one is missing.

PUT vs PATCH

The difference matters most on the function collections, where a PUT that omits an item deletes it. Validate with the matching verb before applying — mode is create (default), put or patch.

Behavioural differences between update_sheet (PUT) and patch_sheet (PATCH)
Behaviourupdate_sheet (PUT)patch_sheet (PATCH)
Collection sentAuthoritative — unnamed existing items are deletedMerged — unnamed items are left untouched
"virtual_columns": []Deletes all 20No-op
Key omitted entirelyUntouchedUntouched
_delete: trueNot validRemoves that one item
Setup

One config block, every client

Install it, or skip the install entirely and let npx fetch it on demand. The JSON below is identical in every supported client — only the file it lives in changes.

Installnpm install @csvbox/mcp-server
mcp.json
{
  "mcpServers": {
    "csvbox": {
      "command": "npx",
      "args": ["-y", "--package=@csvbox/mcp-server", "csvbox-mcp-server"],
      "env": {
        "CSVBOX_API_KEY": "your_api_key",
        "CSVBOX_API_SECRET": "your_api_secret"
      }
    }
  }
}
Where the MCP config block goes in each supported client
ClientConfig file
Claude DesktopClaude Desktop MCP settings
Cursor~/.cursor/mcp.jsonor per-project .cursor/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
Roo Codemcp_settings.json
Clinecline_mcp_settings.json
VS Code.vscode/mcp.jsonthe key is "servers", not "mcpServers"

Credentials are only needed for the API-backed tools create_sheet, update_sheet, patch_sheet, create_importer_from_prompt and submit_file. validate_schema and generate_import_code run with no credentials at all, so you can wire the server up and try it before it touches your account.

Environment variables

Environment variables and what each one is required for
VariableRequired for
CSVBOX_API_KEYEvery CSVbox API-backed tool
CSVBOX_API_SECRETEvery CSVbox API-backed tool
ANTHROPIC_API_KEYServer-side generation (tier 1), Claude models
OPENAI_API_KEYServer-side generation (tier 1), OpenAI models
LLM_PROVIDERDisambiguates when both LLM keys are set
LLM_MODELOverrides the default model — recommended for 100+ column schemas
Schema

Supported column types

Every type the generator can emit and validate_schema will accept.

textnumberemaildatetimebooleanregexipurlcredit_cardphone_numbercurrencylistdependent_listdynamic_listdependent_dynamic_listmultiselect_listmultiselect_dynamic_list
FAQ

MCP server questions

It is a Model Context Protocol server that exposes CSVbox importer-sheet management — creating, updating, patching, validating and generating CSV/XLSX import schemas — as tools an AI client can call directly. It runs over stdio and behaves identically in Claude Desktop, Cursor, Windsurf, Roo Code, Cline, VS Code and any other MCP-compatible client.
No. If you set ANTHROPIC_API_KEY or OPENAI_API_KEY, the server generates schemas itself. Without a key, the create_csvbox_sheet and csvbox_sheet_functions MCP prompts hand generation to the host client’s own model — Claude Desktop, Cursor and Cline all work this way at no extra cost, with no server-side LLM key at all.
update_sheet issues a PUT: it is authoritative, so any virtual column, validation function or data transform not named in the request is deleted, and an empty array wipes the whole collection. patch_sheet issues a PATCH: it merges, leaving unnamed items untouched, and supports a per-item _delete flag to remove a single function without touching the rest. Default to patch for incremental changes.
No. js_code for virtual columns, validation functions and data transforms is generated as an opaque string and is never executed by the MCP server — it only runs later, inside CSVbox, during a real import. Because it is unreviewed model output, read generated js_code before applying it with patch_sheet.
Nine tools — create_sheet, update_sheet, patch_sheet, generate_sheet_json, create_importer_from_prompt, generate_import_code, generate_sheet_functions, validate_schema and submit_file — plus two MCP prompts, create_csvbox_sheet and csvbox_sheet_functions. There are no get_sheet or list_sheet tools because the CSVbox API itself has no GET or LIST endpoints for sheets.
Run npm install @csvbox/mcp-server, or point your MCP client at npx --package=@csvbox/mcp-server csvbox-mcp-server with no local install at all. Add CSVBOX_API_KEY and CSVBOX_API_SECRET to the client’s env block; the config JSON is identical across Claude Desktop, Cursor, Windsurf, Roo Code, Cline and VS Code — only the config file location differs.
Yes. The submit_file tool calls CSVbox’s POST /1.1/file endpoint, accepting either a public file URL or a base64-encoded upload, which is decoded server-side into a true multipart/form-data part rather than being sent to CSVbox as base64 text.
The MCP server is free and MIT licensed. It talks to your existing CSVbox account, so the only cost is your normal CSVbox plan — and, if you opt into server-side generation, your own Anthropic or OpenAI API usage. See CSVbox pricing

Stop building CSV importers.

Ship ours in 15 minutes. Free forever on the Sandbox plan.

No credit cardEmbed in minutesSecure by default