Skip to main content
The CSVbox MCP server exposes importer sheet management as tools that any Model Context Protocol client can call directly. Claude Desktop, Cursor, Windsurf, Roo Code, Cline, and VS Code all work identically over one stdio transport. Instead of hand-writing JSON against the CSVbox REST API, describe the importer you want in plain language and let your AI client create, validate, and push a compliant CSVbox schema for you.
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 with npx:
Or install it locally:
The config block above is identical across clients. Only the file it goes in changes:

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.
You don’t need an LLM API key to use the server. Without one, the 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

Calls POST /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:
  1. Server LLM: if ANTHROPIC_API_KEY or OPENAI_API_KEY is set, the server calls the model directly. Usage is billed to your own API key.
  2. MCP prompt: with no server key, the host client (Cursor, Claude Desktop, Cline, etc.) runs generation with its own model, then calls validate_schema and create_sheet. Free.
  3. 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.
For 100+ column schemas, override the default cheap model (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 a js_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.
The MCP server never executes js_code. Here it’s an opaque, unreviewed string that only runs later inside CSVbox. Read generated code before applying it with patch_sheet.

Third-party scripts

An item may load up to five third-party scripts, restricted to a fixed CDN allowlist:
Allowed hosts: cdn.jsdelivr.net, unpkg.com, cdnjs.cloudflare.com. HTTPS only, .js/.mjs path, and no query string, fragment, userinfo, or port.
A dependency without an integrity digest can change under your users at any time. validate_schema warns when one is missing.

FAQ

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.
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.
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.
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.
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.
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