MCP Connector

Convert JSON to CSV

Converts JSON data or a JSON file URL into CSV/Excel-ready format via two MCP tools, with a 6-row cap on the free tier.

Maintainer of this project? Claim this page to edit the listing.


91
Spark score
out of 100
Updated 3 months ago
Version 1.0.0
Models
universal

Add to Favorites

Why it matters

Transform JSON data into a structured CSV format, enabling easier analysis and integration with spreadsheet applications. Supports both direct data strings and files fetched from URLs.

Outcomes

What it gets done

01

Convert JSON data strings to CSV.

02

Convert JSON files from URLs to CSV.

03

Handle various JSON structures and data types automatically.

04

Generate CSV headers from JSON keys.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-json-to-excel-by-wtsolutions | bash

Capabilities

Tools your agent gets

json_to_excel_mcp_from_data

Converts a JSON data string to CSV format string

json_to_excel_mcp_from_url

Converts a JSON file from a URL to CSV format string

Overview

JSON to Excel by WTSolutions MCP Server

Two MCP tools that convert JSON data or a public JSON file URL into Excel-ready CSV, with flat/nested key formatting options. Free tier caps at 6 processed rows; a Pro Code unlocks unlimited processing. Use when an assistant needs to turn JSON into a CSV/Excel table from pasted data or a URL; only stdio/NPX transport is supported as of v0.3.0, and free-tier output is capped at 6 rows.

What it does

JSON to Excel MCP by WTSolutions provides a standardized MCP interface for converting JSON data into CSV format strings that import cleanly into Excel. It offers two tools. json_to_excel_mcp_from_data converts a JSON data string (required data parameter, must be a valid JSON array or object) directly into CSV; if the JSON is an array of objects, each object becomes a CSV row with headers drawn from the object keys, while a single JSON object converts into a key-value CSV. json_to_excel_mcp_from_url does the same conversion but takes a publicly accessible URL pointing to a .json file instead of an inline data string. Both tools accept an optional options object supporting proCode (a Pro subscription code), jsonMode (flat or nested, default flat), delimiter for nested key flattening (accepting ., _, __, or /), and maxDepth for nested JSON (accepting unlimited or 1 through 20).

Data types are handled automatically during conversion: numbers become numeric CSV values, booleans become 'true'/'false' strings, strings are escaped and quoted as needed, and arrays or nested objects are converted to their JSON.stringify string representation within the cell. Both tools return a structured JSON response with isError (boolean), msg ('success' or an error description), and data (the resulting CSV string, empty on error). Documented error messages cover invalid JSON format, empty JSON data, network errors fetching a URL, file-not-found, server internal errors, invalid or unsubscribed Pro Codes, and the free-tier row cap being hit.

When to use - and when NOT to

Use this when an AI assistant needs to turn JSON data - either supplied directly or fetched from a public URL - into CSV output that can be dropped into Excel, for example converting an API response or an uploaded JSON file into a spreadsheet-ready table. The free version processes a maximum of 6 rows of data; anything beyond that requires a valid Pro Code, described in the source's pricing page as enabling unlimited data processing. This is part of a broader JSON to Excel toolkit by WTSolutions that also includes a web app, Excel and WPS add-ins, and a standalone HTTPS API - this MCP server is specifically the AI-model-facing entry point into that same conversion engine. Note that as of v0.3.0, only the stdio (NPX) transport is supported; SSE and Streamable HTTP transports are explicitly not supported in that version.

Capabilities

Using JSON to Excel MCP means agreeing to WTSolutions' service agreement and privacy policy. The JSON schema the tools expect, along with a validator, is documented on the WTSolutions website for pre-checking input before conversion.

How to install

Free-tier configuration via NPX:

{
  "mcpServers": {
    "json-to-excel-mcp": {
      "args": [
        "json-to-excel-mcp"        
      ],
      "command": "npx"
    }
  }
}

For the Pro tier, the same configuration adds an env block with a proCode value to unlock unlimited row processing instead of the free tier's 6-row cap.

Who it's for

Users who need an AI assistant to convert JSON - from pasted data or a public URL - into Excel-ready CSV output, whether occasionally at the free tier's small-row-count scale or at production scale with a Pro subscription.

Source README

JSON to Excel MCP by WTSolutions

中文

Introduction

The JSON to Excel MCP (Model Context Protocol) provides a standardized interface for converting JSON data into CSV format string using the Model Context Protocol. This MCP implementation offers two specific tools for data conversion:

  • json_to_excel_mcp_from_data: Converts JSON data string into CSV format.
  • json_to_excel_mcp_from_url: Converts JSON file from a provided URL (.json format) into CSV format string.

JSON to Excel MCP is part of JSON to Excel toolkit by WTSolutions:

Server Config

Available MCP Servers (SSE and Streamable HTTP):

Using Stdio (NPX)

Server Config JSON:

Case 1 : Free Version (Up to processing 6 Rows of data)

If you are using the free version:

{
  "mcpServers": {
    "json-to-excel-mcp": {
      "args": [
        "json-to-excel-mcp"        
      ],
      "command": "npx"
    }
  }
}

Case 2 : Pro Version

If you are using the pro version (with a valid proCode):

{
  "mcpServers": {
    "json-to-excel-mcp": {
      "args": [
        "json-to-excel-mcp"        
      ],
      "command": "npx",
      "env": {
        "proCode": "type in your proCode here"
      }
    }
  }
}

Using SSE

Not supported starting from v0.3.0

Using Streamable HTTP

Not supported starting from v0.3.0

MCP Tools

json_to_excel_mcp_from_data

Converts JSON data string into CSV format string.

Parameters
Parameter Type Required Description
data string Yes JSON data string to be converted to CSV. Must be a valid JSON array or object.
options object No Optional configuration object for customizing the conversion process.

Note:

  • Input data must be a valid JSON string. JSON schema available at JSON Schema and validator available at JSON to Excel Web App.
  • If the JSON is an array of objects, each object will be treated as a row in the CSV.
  • If the JSON is a single object, it will be converted into a CSV with key-value pairs.
  • The CSV will include headers based on the keys in the JSON objects.
  • This tool returns CSV-formatted data that can be easily converted/imported to Excel.
Options Object

The options object can contain the following properties:

Property Type Default Description
proCode string "" Pro Code JSON to Excel service.
jsonMode string "flat" Format mode for JSON output: "nested", or "flat"
delimiter string "." Delimiter character for nested JSON keys when using jsonMode: "nested", acceptable delimiters are ".", "_", "__", "/".
maxDepth string "unlimited" Maximum depth for nested JSON objects when using jsonMode: "nested". For maxDepth, "unlimited", "1" ~ "20" acceptable.

Note:

  • If you do not have a valid Pro Code, max 6 rows will be processed.
  • Detailed conversion rules can be found in Features.
Example Prompt 1:

Convert the following JSON data into CSV format:

[
  {"Name": "John Doe", "Age": 25, "IsStudent": false},
  {"Name": "Jane Smith", "Age": 30, "IsStudent": true}
]
Example Prompt 2:

Convert the following JSON object into CSV format:

{
  "Name": "John Doe",
  "Age": 25,
  "IsStudent": false,
  "Courses": ["Math", "Science"]
}

json_to_excel_mcp_from_url

Converts JSON data from a provided URL into Excel data.

Parameters
Parameter Type Required Description
url string Yes URL pointing to a JSON file (.json)
options object No Optional configuration object for customizing the conversion process.

Note:

  • The url should be publicly accessible.
  • The JSON file should be in .json format.
  • The JSON file should contain a valid JSON array or object. JSON schema available at JSON Schema and validator available at JSON to Excel Web App.
  • If the JSON is an array of objects, each object will be treated as a row in the CSV.
  • If the JSON is a single object, it will be converted into a CSV with key-value pairs.
  • This tool returns CSV-formatted data that can be easily converted/imported to Excel.
Options Object

The options object can contain the following properties:

Property Type Default Description
proCode string "" Pro Code for JSON to Excel service.
jsonMode string "flat" Format mode for JSON output: "nested", or "flat"
delimiter string "." Delimiter character for nested JSON keys when using jsonMode: "nested", acceptable delimiters are ".", "_", "__", "/".
maxDepth string "unlimited" Maximum depth for nested JSON objects when using jsonMode: "nested". For maxDepth, "unlimited", "1" ~ "20" acceptable.

Note:

  • If you do not have a valid Pro Code, max 6 rows will be processed.
  • Detailed conversion rules can be found in Pro Features.

Example Prompt 1

Convert JSON file to Excel, file URL: https://mcp.wtsolutions.cn/example.json

Example Prompt 2

(applicable only when you do not have a URL and working with online AI LLM)

I've just uploaded one .json file to you, please extract its URL and send it to MCP tool 'json_to_excel_mcp_from_url', for JSON to Excel conversion.

Response Format

The MCP tools return a JSON object with the following structure:

Field Type Description
isError boolean Indicates if there was an error processing the request
msg string 'success' or error description
data string Converted CSV data string, '' if there was an error. This CSV data can be easily imported into Excel.

Example Success Response

{
  "content": [{
    "type": "text",
    "text": "{\"isError\":false,\"msg\":\"success\",\"data\":\"Name,Age,IsStudent\nJohn Doe,25,false\nJane Smith,30,true\"}"
  }]
}

Above is the response from MCP tool, and in most cases your LLM should interpret the response and present you with a JSON object, for example as below.

Note, different LLM models may have different ways to interpret the JSON object, so please check if the JSON object is correctly interpreted by your LLM model.

{
  "isError": false,
  "msg": "success",
  "data": "Name,Age,IsStudent\nJohn Doe,25,false\nJane Smith,30,true"
}

Example Failed Response

{
  "content": [{
    "type": "text",
    "text": "{\"isError\": true, \"msg\": \"Invalid JSON format\", \"data\": \"\"}"
  }]
}

Above is the response from MCP tool, and in most cases your LLM should interpret the response and present you with a JSON object, for example as below.

Note, different LLM models may have different ways to interpret the JSON object, so please check if the response is correctly interpreted by your LLM model.

{
  "isError": true,
  "msg": "Invalid JSON format",
  "data": ""
}

or it is also possible that your LLM would say "Invalid JSON format, please provide a valid JSON string" to you.

Data Type Handling

The API automatically handles different data types in JSON:

  • Numbers: Converted to numeric values in CSV
  • Booleans: Converted to 'true'/'false' strings
  • Strings: Escaped and quoted if necessary
  • Arrays: Converted to JSON.stringify array string
  • Objects: Converted to JSON.stringify object string

Error Handling

The MCP returns descriptive error messages for common issues:

  • Invalid JSON format: When input data is not a valid JSON string
  • Empty JSON data: When input data is an empty JSON string
  • Network Error when fetching file: When there's an error downloading the file from the provided URL
  • File not found: When the file at the provided URL cannot be found
  • Server Internal Error: When an unexpected error occurs
  • Pro Code Invalid: When the provided Pro Code is invalid or not subscribed
  • Max 6 rows processed: When no valid Pro Code is provided, only the first 6 rows of data will be processed

Service Agreement and Privacy Policy

By using JSON to Excel MCP, you agree to the service agreement, and privacy policy.

Pricing

Free version, max 6 rows processed.
Pro version, unlimited data processing.

Please refer to the pricing page for more details.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.