Skip to main content

Tidy Byte Tools

json-shaper-lite

License: MIT Python 3.10+ MCP server

Free tool that turns key: value notes, CSV/TSV and Markdown tables into clean JSON. Need app logs or US addresses parsed too? The paid version does that: json-shaper on Gumroad

Plain code, not AI, so the same text always gives the same JSON. Runs on your own computer. MIT license. Works with Python 3.10 and newer, on Windows, Mac and Linux.

Install

pip install json-shaper-lite

Or use pipx, which keeps it in its own space:

pipx install json-shaper-lite

Want the newest code from GitHub instead?

pip install git+https://github.com/tidybytetools/json-shaper-lite

Or just download json_shaper_lite.py and run it with python3. That one file uses only Python's standard library. (Installing with pip also adds the mcp package, which the MCP server needs.)

Use it

printf 'Name: Ada\nAge: 36\nActive: yes' | json-shaper-lite
json-shaper-lite export.csv
json-shaper-lite notes.md --format markdown
json-shaper-lite export.csv --json      # {"ok": true, "format": "csv", "data": [...]}

Output:

{"name": "Ada", "age": 36, "active": true}

Numbers come out as numbers, yes/no and true/false as booleans, and empty or "null" as null. The format is detected for you, or you can set it with --format kv|csv|markdown.

From Python:

from json_shaper_lite import shape
shape("x,y\n1,2")  # {'format': 'csv', 'data': [{'x': 1, 'y': 2}]}

When you run it in a terminal it prints one short line about the paid version to stderr after the result. It never goes into your JSON output, it only shows when you are looking at a terminal, and --quiet turns it off.

Known limits

  • It makes flat JSON. It does not flatten or unflatten nested JSON. For that, use a tool like flatten-json.
  • Types are a best guess. A value like 007 or a zip code can turn into a number. Fix those by hand after.
  • One table per run. Two Markdown tables in one file get mixed together. Split them first.
  • No app logs or addresses. Those are in the paid version.

How it compares to other free tools

json-shaper-lite flatten-json csvkit csvjson pandas
Main job messy text → JSON nested JSON → flat (and back) CSV → JSON full data toolkit
Install size one file (pip adds mcp for the MCP server) small medium large
key: value notes yes no no no
Markdown tables yes no no no, not built in
CSV/TSV yes no yes yes
Guesses numbers and true/false yes no yes yes
Nested JSON flatten/unflatten no yes no yes (json_normalize)
MCP server for AI apps yes no no no

If your data is already JSON and just too nested, flatten-json is the better pick.

Use it from Claude Desktop or Cursor (MCP)

There is a small free MCP server built in. It gives your AI app two tools. Both only read. They never write or change files, and they never use the internet. It needs uv.

Run it by hand to check it starts (it waits quietly for an app to talk to it):

uvx json-shaper-lite mcp

Claude Desktop (claude_desktop_config.json) or Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "json-shaper-lite": {
      "command": "uvx",
      "args": ["json-shaper-lite", "mcp"]
    }
  }
}

uvx --from json-shaper-lite json-shaper-lite-mcp starts the same server.

Tools:

  • shape_text_to_json(text, format="auto"): for text in the chat.
  • shape_file_to_json(path, format="auto"): for a text file on your computer (.txt, .csv, .tsv, .md, up to 5 MB).

Both return {"format": "csv", "data": [...]}. format can be auto, kv, csv or markdown.

For AI agents

  • Use when: you have plain text in key: value lines, CSV/TSV, or a Markdown table and need typed JSON.
  • Don't use when: the input is already JSON, it's app logs, or it's nested data. Use the paid version for logs.
  • Input: text on stdin or a file path. Optional --format kv|csv|markdown.
  • MCP: uvx json-shaper-lite mcp gives two read-only tools, shape_text_to_json and shape_file_to_json.
  • Output: with --json, one object: {"ok": true, "format": "csv", "data": [...]}. On error ok is false. Exit code 0 ok, 1 error.
  • Hint lines go to stderr only, and only in a terminal, so stdout is always clean JSON. See also llms.txt.

Lite vs paid

lite (free) json-shaper
key: value notes, CSV/TSV, Markdown tables yes yes
App logs (timestamp, level, message, key=value fields) no yes
One-line US address splitter no yes
tool.json manifest for scripts and AI agents no yes

Tests

pip install "mcp>=1.10,<2"
python3 -m unittest discover tests

The MCP tests are skipped if mcp is not installed.

License

MIT. See LICENSE.

Metadata

Release files for json-shaper-lite 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for json-shaper-lite 1.1.0
File Size Uploaded Provenance Actions
json_shaper_lite-1.1.0.tar.gz 11.4 kB With provenance Details for json_shaper_lite-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for json-shaper-lite 1.1.0
File Interpreter ABI Platform Actions
json_shaper_lite-1.1.0-py3-none-any.whl Python 3 none any Details for json_shaper_lite-1.1.0-py3-none-any.whl

Total release size: 20.3 kB

Release files / json_shaper_lite-1.1.0.tar.gz

Download URL json_shaper_lite-1.1.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bbc69e399a4a38e1e2f7aaf54a8feff165ad2e7437486f80c35509106fd9fcec
BLAKE2b-256 checksum
How to use checksums
ba0e685f88d3baab3394e775bff143b2164b80e7d19188efaf323b4a9f4fdae6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / json_shaper_lite-1.1.0-py3-none-any.whl

Download URL json_shaper_lite-1.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1037f4043c168f08e99d479f33b7e0b1bf4c4063161b73aa26e79a2d916e00b8
BLAKE2b-256 checksum
How to use checksums
02a71835911469be521440fb147f7940cbda4f2351e35c7220ea8ca75c439395
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for json-shaper-lite 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for json_shaper_lite-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page