CSVbox handles the CSV/XLSX import widget your app embeds. This server handles the configuration side: the importer sheet that defines columns, validation, destinations, and webhooks.
Installation
No local install is required. Every supported client can run the server directly withnpx:
Environment variables
CSVBOX_API_KEY and CSVBOX_API_SECRET are only required for the API-backed tools (create_sheet, update_sheet, patch_sheet, create_importer_from_prompt, submit_file). validate_schema and generate_import_code run with no credentials at all.create_csvbox_sheet and csvbox_sheet_functions prompts hand schema generation to your AI client’s own model, for free and with no server-side key.
Tools
There are no
get_sheet or list_sheet tools. The CSVbox API itself has no GET or LIST endpoints for sheets.update_sheet vs. patch_sheet
Default to
patch_sheet for incremental changes. Validate with the matching mode (create, put, or patch) before applying.
submit_file
CallsPOST /1.1/file with either a public_file_url or a base64-encoded upload. The base64 payload is decoded server-side into a true multipart/form-data part before it reaches CSVbox. It is never sent to CSVbox as base64 text.
MCP prompts
Two prompts hand schema generation to your AI client’s own model instead of the server’s. This is useful when no server-side LLM key is configured.Prompt-to-sheet generation
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 and never mistaken for columns.
Generation tiers
Generation resolves through three tiers, in order:- Server LLM: if
ANTHROPIC_API_KEYorOPENAI_API_KEYis set, the server calls the model directly. Usage is billed to your own API key. - MCP prompt: with no server key, the host client (Cursor, Claude Desktop, Cline, etc.) runs generation with its own model, then calls
validate_schemaandcreate_sheet. Free. - None: with no LLM anywhere, the server returns a structured error pointing at the MCP prompt. The CSVbox API is never called.
Extraction vs. expansion mode
- Extraction mode (default): the prompt names concrete fields, for example “columns name, email, phone”, and only those become columns. Nothing is invented.
- Expansion mode: triggered by a named business module, a request for a “comprehensive” schema, or an explicit column-count floor. Each module (for example, Suppliers) expands into realistic, prefixed columns (
supplier_id,supplier_gstin, …), with every name kept globally unique.
claude-haiku-4-5 / gpt-4o-mini) with a stronger one via LLM_MODEL. Oversized output is flagged TRUNCATED rather than silently truncated or mis-parsed, and the CSVbox API is not called in that case.
Column type mapping
Field names and requested types are mapped to CSVbox column types automatically:Supported column types
text · number · email · date · time · boolean · regex · ip · url · credit_card · phone_number · currency · list · dependent_list · dynamic_list · dependent_dynamic_list · multiselect_list · multiselect_dynamic_list
Function collections
Beyond the core sheet properties, CSVbox accepts three collections whose items carry ajs_code string that CSVbox executes during a real import:
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.
Third-party scripts
An item may load up to five third-party scripts, restricted to a fixed CDN allowlist:cdn.jsdelivr.net, unpkg.com, cdnjs.cloudflare.com. HTTPS only, .js/.mjs path, and no query string, fragment, userinfo, or port.
FAQ
Do I need an LLM API key to use it?
Do I need an LLM API key to use it?
No. Without one, the
create_csvbox_sheet and csvbox_sheet_functions prompts hand generation to the host client’s own model, for free and with no server-side key required.What's the difference between update_sheet and patch_sheet?
What's the difference between update_sheet and patch_sheet?
update_sheet is a destructive PUT: anything not named in a collection gets deleted. patch_sheet merges and supports a per-item _delete flag. Default to patch_sheet for incremental changes.Is the generated js_code executed by the MCP server?
Is the generated js_code executed by the MCP server?
No. It’s treated as an opaque string and only runs later, inside CSVbox, during a real import. Read it before applying it with
patch_sheet.How many tools does it expose?
How many tools does it expose?
Nine tools and two MCP prompts. There’s no
get_sheet or list_sheet, because the CSVbox API itself has no GET or LIST endpoints for sheets.How do I install it?
How do I install it?
Run
npm install @csvbox/mcp-server, or point any MCP client at npx --package=@csvbox/mcp-server csvbox-mcp-server with no local install at all.Can it submit files directly, not just configure the importer?
Can it submit files directly, not just configure the importer?
Yes.
submit_file calls POST /1.1/file with either a public file URL or a base64 upload, decoded server-side into true multipart binary before it reaches CSVbox.Resources
MIT licensed ·@csvbox/mcp-server · Source on GitHub · npm · csvbox.io · modelcontextprotocol.io
