Tidy Byte Tools

io.github.tidybytetools由 GitHub 帳號 tidybytetools 發布v0.1.1更新於 Nov 19, 2026

One local MCP server: repair JSON, PDF tables to CSV, docs to Markdown, hashes and more. No API key.

概覽

AI 產生的概覽

一個本機 MCP 伺服器,打包了離線資料清理工具:JSON 修復與整形、Base64、雜湊、Markdown 分塊、PDF/HTML 轉 Markdown 以及連結檢查。

可以做什麼
  • 修復文字或本機檔案中損壞或不完整的 JSON,並把筆記、CSV/TSV 或 Markdown 表格轉成具型別的 JSON
  • 對貼上的文字或本機檔案進行 Base64 編碼與解碼,並用 SHA-256、SHA-1、MD5 和 SHA-512 對文字或檔案計算雜湊
  • 列出 Markdown 大綱、依標題分塊並取出單一章節,還可把分塊存成 JSONL 檔案
  • 把文字型 PDF 和已儲存的 HTML 轉成 Markdown,並把 PDF 中的表格匯出為 CSV
  • 檢查一組 URL 的狀態碼與重新導向結果
適用情境
適合需要在本機對雜亂資料做確定性、非模型式清理的情境:修復格式錯誤的 JSON、為 RAG 分塊準備文件、擷取 PDF 表格,或檢查文件與 README 中的連結。
執行需求
以本機 stdio 程序執行;需要 Python 3.10 或更新版本,可從 PyPI 安裝或用 uvx 直接啟動。不需要 API 金鑰或環境變數。只有連結檢查工具需要網路,其餘工具可離線使用。
安裝前請注意
多數工具僅讀取,但 save_chunks_jsonl、設定了輸出路徑的 convert_to_markdown 以及 extract_pdf_tables 會寫入你指定的檔案。連結檢查工具會向你提供的 URL 發出 HTTP 請求。超過 5 MB 的檔案會被拒絕,沒有文字層的掃描版 PDF 不受支援。README 提到另有付費雲端版本和 API。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Tidy Byte Tools,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Tidy Byte Tools]

Tidy Byte Tools

[License: MIT] [Python 3.10+] [MCP server] [Tests] [Version]

One install for our free local tools: fix broken JSON, pull tables out of a PDF, turn documents into Markdown, and more. It also starts one MCP server with all of those tools, so an AI assistant can use them on your computer. No API key.

This does not replace the individual lite repos. It is a doorway that installs them together.

Try it

This command is not valid JSON (the keys have no quotes, and there is a trailing comma):

bash
printf '{name: "Ada", city: "Austin",}' | tidy-byte-tools json-repair -q

-q hides a one-line tip about the paid cloud version. Real output from that command (0.1.0, 17 Nov 2026):

json
{  "name": "Ada",  "city": "Austin"}

[A terminal run of tidy-byte-tools json-repair turning messy JSON into valid JSON]

Install

Needs Python 3.10 or newer. Install it from PyPI:

bash
pip install tidy-byte-tools

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

bash
pipx install tidy-byte-tools

That also installs the eight lite tools. All of them come from PyPI. (hash-lite's PyPI name is tidy-hash-lite.)

Use it

bash
printf '{name: "Ada", city: "Austin",}' | tidy-byte-tools json-repairtidy-byte-tools pdf-table-pull report.pdftidy-byte-tools doc2md page.html -o page.mdtidy-byte-tools --help

tbt is a short name for the same command. Installing the package also gives you the original commands (json-repair-lite, doc2md-lite, and so on).

From Python, import a lite package directly:

python
from json_repair_lite import repair_onerepair_one("{name: 'Ada',}")["value"]  # {'name': 'Ada'}

Use it from Claude Desktop, Cursor, or VS Code

The MCP server talks over stdio. After you install the package, add one of these configs. If you would rather not install it first, uvx can run it straight from PyPI.

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

json
{  "mcpServers": {    "tidy-byte-tools": {      "command": "uvx",      "args": [        "--from",        "tidy-byte-tools",        "tidy-byte-tools-mcp"      ]    }  }}

If the package is already installed, you can use "command": "tidy-byte-tools-mcp" and leave out args.

VS Code (.vscode/mcp.json):

json
{  "servers": {    "tidy-byte-tools": {      "command": "uvx",      "args": [        "--from",        "tidy-byte-tools",        "tidy-byte-tools-mcp"      ]    }  }}

The server exposes 15 tools. Base64 tools are named base64_convert_text and base64_convert_file so they are not confused with the document converter. Most tools only read. save_chunks_jsonl, convert_to_markdown (when you set an output path), and extract_pdf_tables can write the files you ask for. check_links requests the URLs you give it.

You can also start the server yourself with tidy-byte-tools mcp.

The tools in this install

CommandWhat it doesLite repo
json-repairRepair broken or incomplete JSON, including output from language modelsjson-repair-lite
json-shaperTurn notes, CSV/TSV, or Markdown tables into typed JSONjson-shaper-lite
base64Encode or decode Base64 for text and local filesbase64-lite
hashHash text or files with SHA-256, SHA-1, MD5, and SHA-512hash-lite
md-chunkSplit Markdown into chunks by heading, for RAGmd-chunk-lite
doc2mdTurn a PDF or HTML file into clean Markdowndoc2md-lite
pdf-table-pullPull tables out of a PDF into CSVpdf-table-pull-lite
link-checkCheck web links for status codes and redirectslink-check-lite

Paid cloud tools and the API

If you want the same kind of work in the cloud, pay per use:

The site is https://tidybytetools.github.io.

Limits

  • These tools run on your computer. They are not a hosted service.
  • link-check needs a network. The other tools work offline.
  • The PDF tools read text PDFs. A scanned page with no text layer will not give useful tables or Markdown.
  • This wrapper does not change how each lite tool works. See that tool's README for its flags and limits.
  • In the Official MCP Registry as io.github.tidybytetools/tidy-byte-tools. You can also install the latest code from GitHub: pip install git+https://github.com/tidybytetools/tidy-byte-tools.

License

MIT. See LICENSE. Changes and ideas are welcome — see CONTRIBUTING.md.

來源:README.md,提交 8febf74

工具

15

repair_json_text

Repair broken JSON text

Repair broken or incomplete JSON, including output from language models. Use this when you have JSON in the conversation that may be missing quotes, have trailing commas, or be cut off. It is plain code, not an AI model: it can close missing brackets and fix common syntax issues, but it cannot invent the data you meant to write. Already-valid JSON is returned as-is, with wasValid true and repaired false. Do not use it for a file on disk (use repair_json_file for files). json_lines: if true, each non-empty line is a separate document. If false (default), the whole text is tried as one JSON value first. If that cannot be repaired and there are several lines, each line is then tried on its own. For one document, returns {"wasValid", "repaired", "value", "text"}. For several documents, returns {"count", "failed", "documents": [...]}.

輸入參數text必填json_lines

repair_json_file

Repair JSON in a local file

Read a local JSON file and repair it if it is broken or incomplete. Use this when the JSON is in a file on this computer, so you don't have to paste it. The file is only read, never changed. Files larger than 5 MB are rejected; use the Apify version for bigger jobs. Do not use it for files that are not JSON text. path: full path to a UTF-8 text file, up to 5 MB. json_lines: if true, each non-empty line is a separate document. If false (default), the whole text is tried as one JSON value first. Returns the same object as repair_json_text.

輸入參數path必填json_lines

shape_text_to_json

Turn text into JSON

Turn pasted text (key: value notes, CSV/TSV or a Markdown table) into typed JSON. Use this when you have plain-text records or a table in the conversation and need clean JSON you can trust, without guessing values yourself. It is plain code, not an AI model, so the same text always gives the same JSON and nothing is made up. Do not use it when the text is already JSON, is nested data, is app logs, or is a file on disk (use shape_file_to_json for files). format: "auto" (default) picks for you. Or force "kv" (key: value or key=value lines, a blank line starts a new record), "csv" (comma, semicolon, tab or | separated, first row is the header) or "markdown" (a | pipe | table, first row is the header). Returns {"format": <format used>, "data": <JSON>}. data is a list of records for CSV and tables. For key: value text it is one object, or a list when blank lines split it into several records. Keys become lower_snake_case. Numbers become numbers, yes/no and true/false become booleans, empty or "null" becomes null.

輸入參數text必填format

shape_file_to_json

Turn a text file into JSON

Read a local text file (key: value notes, .csv, .tsv or a Markdown table) and return typed JSON. Use this when the data is in a file on this computer, so you don't have to paste it. The file is only read, never changed. Do not use it for Excel (.xlsx), PDF or other binary files, for files that are already JSON, or for app logs. path: full path to a UTF-8 text file, up to 5 MB. format: "auto" (default) picks for you. Or force "kv" (key: value or key=value lines, a blank line starts a new record), "csv" (comma, semicolon, tab or | separated, first row is the header) or "markdown" (a | pipe | table, first row is the header). Returns {"format": <format used>, "data": <JSON>}, the same as shape_text_to_json.

輸入參數path必填format

base64_convert_text

Encode or decode Base64 text

Encode pasted text to Base64, or decode Base64 (or a data URI) back to text. Use this when you have text or a Base64 string in the conversation. It is plain code, not an AI model, so the same input always gives the same output and nothing is made up. Do not use it for a file on disk (use convert_file for files), and do not use auto on short or unusual strings if you already know the direction — pass encode or decode instead. Returns a result object. Encoded results include "action", "base64", "bytesIn", and "dataUri" plus "mime" when data_uri is true. Decoded results include "action", "bytesOut", "isText", and "text" (UTF-8 text, or null if the bytes are not text).

輸入參數text必填actiondata_uriurl_safe

base64_convert_file

Encode or decode a local file as Base64

Read a local file and encode its bytes to Base64, or decode a Base64 text file. Use this when the data is in a file on this computer, so you don't have to paste it. The file is only read, never changed. Files larger than 5 MB are rejected; use the Apify version for bigger jobs. For decode, the file must be UTF-8 text containing Base64 (or a data URI), not a binary file. path: full path to a file, up to 5 MB. Returns the same result object as convert_text. If the decoded bytes are not UTF-8 text, "isText" is false and "text" is null.

輸入參數path必填actiondata_uriurl_safe

hash_text

Hash a text string

Hash pasted text with SHA-256, SHA-1, MD5, and optional SHA-512. Use this when you have text in the conversation and need its checksum. The text is hashed as UTF-8 bytes. It is plain code, not an AI model, so the same text always gives the same hashes. This tool does not look the hash up in a malware list or a password list. Do not use it for a file on disk (use hash_file for files). algorithms: a list from sha256, sha1, md5, sha512. Default is sha256, sha1 and md5. MD5 and SHA-1 are not safe for new security work; prefer SHA-256 or SHA-512 when you can. Returns {"ok", "bytes", "encoding": "utf-8", "hashes", and a hex field for each algorithm, plus a Base64 field when include_base64 is true}.

輸入參數text必填algorithmsinclude_base64

hash_file

Hash a local file

Hash a local file's raw bytes with SHA-256, SHA-1, MD5, and optional SHA-512. Use this when the data is in a file on this computer, so you don't have to paste it. The file is only read, never changed. Files larger than 5 MB are rejected; use the Apify version for bigger jobs. This tool does not look the hash up in a malware list or a password list. path: full path to a file, up to 5 MB. algorithms: a list from sha256, sha1, md5, sha512. Default is sha256, sha1 and md5. MD5 and SHA-1 are not safe for new security work; prefer SHA-256 or SHA-512 when you can. Returns {"ok", "bytes", "hashes", and a hex field for each algorithm, plus a Base64 field when include_base64 is true}.

輸入參數path必填algorithmsinclude_base64

chunk_markdown

Split Markdown into chunks

Split a Markdown file or Markdown text into chunks by heading, for search, embeddings or RAG. Use this when you need a long Markdown document (docs, notes, a README) broken into pieces that each know where they came from. A chunk never mixes two sections. Each chunk has heading_path (like ["Guide", "Install"]), anchor (the GitHub-style #link), start_line and end_line (1-based, in the file), part and parts (when a big section had to be split), chars and text. Code blocks and tables are kept whole when they fit; when they don't, each piece gets the fence or table header again. Plain code, not AI: same input, same chunks. Do not use it for PDF or Word files (convert them to Markdown first), to just see the headings (use outline_markdown), or to read one section (use get_section). Sizes are characters, not tokens. Returns {"source", "total", "start", "chunks": [...], "next_start"}. next_start is null when there are no more chunks.

輸入參數pathtextlimitstartmax_charsprefix_pathoverlap_chars

outline_markdown

List Markdown headings

List every heading in a Markdown file or text, with its level, path, anchor, line number and size. Use this when you want a quick map of a long document before you read or chunk it, or to find the exact heading or anchor to pass to get_section. Headings inside code blocks and YAML front matter are ignored. Both "# Title" and underlined (=== / ---) headings are found. Do not use it to get the text itself (use get_section or chunk_markdown). Returns {"source", "count", "headings": [{"level", "title", "path", "anchor", "line", "end_line", "chars"}]}. chars is the size of that heading's own text, not counting the sections under it.

輸入參數pathtext

get_section

Get one Markdown section

Return the text of one section of a Markdown file or text, found by heading title or anchor. Use this when you only need one part of a long document, like the "Install" section of a README, so you don't have to read the whole file. If two headings have the same title, the first one is returned and "matches" tells you how many there are; use the anchor (from outline_markdown) to pick another. Do not use it to split the whole document (use chunk_markdown). Returns {"title", "heading_path", "level", "anchor", "start_line", "end_line", "chars", "matches", "text"}. If nothing matches, the error lists the headings.

輸入參數pathtextanchorheadinginclude_subsections

save_chunks_jsonl

Save chunks to a JSONL file

Split a Markdown file into chunks and save them as a JSONL file (one chunk per line). Use this when the chunks are going into a search index, vector database or another program, and you want a file instead of a long chat reply. The chunks are the same as chunk_markdown gives. It writes only the one .jsonl file and replaces it if it is already there. It never changes the Markdown file. Do not use it to look at chunks in the chat (use chunk_markdown). Returns {"output_path", "chunks", "bytes", "biggest_chunk_chars"}.

輸入參數path必填max_charsoutput_pathprefix_pathoverlap_chars

convert_to_markdown

Convert PDF or HTML to Markdown

Turn a local text PDF or saved HTML file into clean Markdown. Use this when you want to read, quote, summarize or index a document as text, for example before RAG chunking or pasting into a prompt. Tables are kept as Markdown tables. Do not use it for scanned PDFs or photos (there is no OCR), for live web URLs (save the page as .html first), or when you only need the tables as CSV data (use a PDF table extractor instead). path: full path to a .pdf or .html file on this computer. tables: PDF tables. "lines" (default) finds tables with border lines, "text" also tries tables lined up by spaces, "off" gives plain text. output_path: optional. If set, the Markdown is saved there and that path is returned. An existing file at that path is replaced. If empty, nothing is written and the Markdown text is returned. Tables come back as Markdown tables. Scanned (image-only) PDF pages have no text and are skipped.

輸入參數path必填tablesoutput_path

extract_pdf_tables

Extract PDF tables to CSV

Pull the tables out of a local text PDF. Use this when you need the rows and columns of a table from a PDF on this computer, for example to load them into a spreadsheet, pandas or a database. Do not use it for scanned PDFs or photos (there is no OCR), for PDFs on the web (download the file first), or when you want the whole document as text (use a PDF-to-Markdown or text tool instead). path: full path to a PDF on this computer. pages: optional, like "1,3-5". Empty means all pages. strategy: "auto" (default, tries borders first, then spacing), "lines" (tables with ruled borders) or "text" (tables lined up by spacing). Try "text" if "auto" misses a table that has no border lines. output_dir: optional. If set, each table is saved there as a CSV and the file paths are returned. Files named pageN_tableM.csv that already exist there are replaced. If empty, nothing is written and the CSV text of each table is returned. Scanned (image-only) pages have no text and are skipped. Returns [] if no tables.

輸入參數path必填pagesstrategyoutput_dir

版本歷史

1
  1. v0.1.1最新Nov 19, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分