Home / Servers / Data Formats

Data Formats MCP server

Convert, query and validate CSV, JSON, YAML and XML.

Converters and validators for the formats data arrives in: CSV and TSV, JSON, YAML, XML, INI, .env, query strings and Markdown tables, plus JSONPath queries, JSON Schema validation, structural diffs, flattening and TypeScript type generation.

Why use the hosted one: Quoting, escaping and edge cases are handled by real parsers, so a model never has to rewrite a CSV by hand.

Connect

Run in your terminal
claude mcp add --transport http hj-data https://mcp.hjlabs.in/mcp/data \
  --header "Authorization: Bearer YOUR_API_KEY"

Create an API key and put it in place of YOUR_API_KEY. Step-by-step guides: claude.ai and ChatGPT connectors, Claude Code, Cursor, VS Code, Claude Desktop, Windsurf, Zed, OpenAI Codex CLI, Gemini CLI.

All 26 tools

ToolWhat it does
csv_to_jsonParse CSV or TSV (RFC 4180 quoting, delimiter auto-detected or given) into an array of JSON objects keyed by the header row, or arrays of arrays if there is no header. Numbers and booleans are converted unless you say…
json_to_csvTurn an array of JSON objects into CSV (or TSV): columns from the keys (in first-seen order, or the ones you list), values quoted when needed, nested values as JSON.
json_to_yamlConvert JSON to YAML (block style, 2-space indent). Use for config files and readable output.
yaml_to_jsonParse YAML (YAML 1.2, including anchors, multi-document files and block scalars) into JSON. Errors say the line and column.
xml_to_jsonParse XML into JSON: attributes become "@name" keys, text content "#text" (or the value itself for leaf elements), repeated child elements become arrays. Comments, CDATA and declarations are handled.
json_to_xmlSerialise JSON as XML: object keys become elements, "@key" entries become attributes, "#text" becomes text content, arrays repeat the element. Inverse of xml_to_json.
json_queryPick values out of JSON with a JSONPath expression. Supported: $.a.b, $.a[0], $.a[-1], $.a[*], $.a[1:3], $..name (recursive), $.items[?(@.price > 10)] (filters with == != > < >= <= contains =~), $["key with spaces"], …
json_schema_validateValidate a JSON value against a JSON Schema and list every violation with its path. Supports type, properties, required, additionalProperties, patternProperties, items, enum, const, min/max (numbers, lengths, items, p…
json_diffCompare two JSON values structurally and list what was added, removed or changed, with the path of each difference. Order of object keys does not matter; order of array items does.
json_flattenFlatten nested JSON into a single-level object with dotted paths as keys (a.b.0.c), handy for spreadsheets, env vars and diffs.
json_unflattenRebuild nested JSON from a flat object with dotted path keys (the inverse of json_flatten). Numeric path parts become array indexes.
json_sort_keysSort every object's keys alphabetically, recursively, and pretty-print. Use to make two JSON documents comparable or to produce a canonical form.
json_to_typescriptGenerate TypeScript interfaces from a JSON sample. Arrays of objects are merged, so keys missing from some items become optional. Give the root a name.
json_to_markdown_tableRender an array of JSON objects as a Markdown table, with the columns you choose or all keys found.
markdown_table_to_jsonParse a Markdown table (pipe syntax) into an array of JSON objects keyed by the header row; numbers and booleans are converted.
ini_parseParse an INI / .cfg / .properties-style file into JSON: sections become objects, "key = value" pairs become properties, comments (; and #) are ignored.
dotenv_parseParse a .env file into a JSON object: KEY=value lines, quoted values with escapes, "export" prefixes and comments handled. Values are always strings.
dotenv_from_jsonWrite a flat JSON object as .env lines, quoting values that need it. Nested values are flattened with underscores and keys upper-cased.
query_string_parseParse a URL query string (or a full URL) into a JSON object. Repeated keys and key[] become arrays; + and percent-encoding are decoded.
query_string_buildBuild a percent-encoded query string from a JSON object; arrays repeat the key, null and undefined are skipped.
sql_formatFormat a SQL statement for reading: keywords upper-cased, one clause per line, list items indented. Best-effort: it does not parse SQL, so unusual dialect syntax may be spaced oddly, but strings are never altered.
json_validateCheck whether a text is valid JSON. If not, say where it breaks (position, line, column) and the likely cause: trailing comma, single quotes, unquoted key, comments.
json_statsDescribe the shape of a JSON document: depth, counts of objects, arrays, strings, numbers, the distinct key names and array lengths. Use before writing code against unfamiliar data.
tsv_to_jsonParse tab-separated values into JSON objects keyed by the header row (a shortcut for csv_to_json with a tab delimiter).
json_pickKeep only some keys of each object in a JSON array (or of one object), optionally renaming them. Lighter than json_query when you just want certain columns.
json_group_byGroup an array of objects by a key (dotted paths allowed) and optionally aggregate a numeric field per group: count, sum, avg, min, max.

Try asking

Convert this CSV export to JSON, then pull out every row where price is over 100.

Usage and limits

Every account gets a free daily allowance of tool calls; connecting, listing and searching are not counted. See the limits. Only a tool that runs costs a call.

Other hosted servers