
Sugo
io.github.Muralnick由 GitHub 帳號 Muralnick 發布v0.1.2更新於 Nov 7, 2026
Local, offline conversion of PDFs, Office files and screenshots into compact Markdown.
概覽
Sugo 在本機把 PDF、Office 檔案與截圖轉成精簡的 Markdown,並透過 MCP 向助理提供文件轉換與 token 節省估算工具。
- 可以做什麼
- 轉換文件與圖片:把 PDF、DOCX、XLSX、PPTX、XML 以及 PNG/JPEG/WEBP 截圖轉為 Markdown,圖片使用本機 OCR
- 估算節省:依各 LLM 供應商回報一次轉換省下的 token 數量
- 清理並記錄:移除重複頁首頁尾、頁碼、隱藏文字與追蹤參數,並記錄每處刪除及其原因
- 輸出 RAG 素材:產生 Markdown 或供向量資料庫使用的 JSON Lines 分塊
- 適用情境
- 適合需要讓助理讀取本機文件或截圖、又不希望上傳到雲端服務的情境,也適合用清理後的 Markdown 取代原始擷取文字或圖片以降低 token 成本。
- 執行需求
- 以本機程序方式透過 uvx 執行 PyPI 套件 sugo-cli;需要 Python 3.12 至 3.14,並佔用約 400 MB 磁碟空間用於 PDF 函式庫、OCR 引擎與模型。MCP 伺服器啟動時需指定根目錄,只會讀取你指定的資料夾。無需帳號、API 金鑰或網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Sugo,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Sugo
Documents, reduced. Feed your LLM the sauce, not the water.
[PyPI version] [CI] [Python 3.12, 3.13 and 3.14] [AGPL-3.0-or-later] [Runs 100% offline]
Quick start · What it does · Comparison · MCP · Roadmap · 🇮🇹 Italiano
Sugo turns PDFs, Office files, screenshots and images into clean, compact Markdown for RAG systems, AI agents and LLM chats. It removes what only costs tokens (repeated headers and footers, page numbers, hidden text, tracking parameters, app chrome around a screenshot) and keeps the content, the tables and the structure. Everything runs on your computer: no cloud API, no telemetry, nothing sent anywhere.
In Italian, il sugo del discorso means "the gist", and a sugo is a sauce you reduce until only the concentrated flavour remains. That is what Sugo does to your documents.
What it does
A small generated three-page PDF, as a plain text extractor gives it to your model (pages 1 and 3 look the same):
What sugo report.pdf prints:
The header is kept once instead of on every page; the page numbers, the repeated "Confidential" and the tracking parameters are gone; the text is the same. sugo stats measures the difference: 180 → 97 tokens, 46% saved on this small generated example; real documents with less page furniture save much less (see below). Every removal is recorded with the cleaner that made it and the reason, so you can always check what was dropped. Text that cannot be read is marked as illegible, never guessed.
Across a benchmark corpus in five languages, no text went missing in any document (on 3 screenshots the OCR misread a few characters, 1–7%). Savings depend heavily on the document:
And it stays fast on an ordinary computer, not just a new one: on a 2010 desktop with 2 cores and no GPU, a 100-page PDF converts in 3.6 s and a phone screenshot in 13.7 s (full numbers in TESTING).
How it compares
Measured against two well-known alternatives, on the same 31-document benchmark corpus (26 synthetic documents made by the Sugo project plus 5 real EU-regulation PDFs), with the same tokenizer and the same ground truth — full method, raw numbers and limits in docs/comparisons:
A tool that drops content also "saves" tokens on paper — that's data loss, not compression. Every number above is paired with what actually survived the conversion.
Fair caveats: the corpus is small and mostly synthetic, and it was built by the Sugo authors, so treat it as a sanity check, not a verdict. On the report PDFs Docling saves slightly more tokens than Sugo (about 38–48% vs 33–38%) without losing content; it is also several times slower on this corpus. Raw data and the full per-document table are in the linked comparison.
Status
[!NOTE] v0.1.1 is out, on PyPI as
sugo-cli(v0.1.0 was the first signed release). It is still 0.x: contracts may change, with notice, before 1.0. Releases are built reproducibly, with an SBOM, Sigstore attestations and PyPI Trusted Publishing.
See the roadmap for the full plan.
Quick start
Sugo needs Python 3.12, 3.13 or 3.14. The install is about 400 MB on disk, because the PDF library, the OCR engine and its models come with it. The easiest way to install it is with uv:
Or with pip:
If sugo is "not recognized" or "not found" after installing with pip, pip put it in a folder your system does not search. This happens on Windows when pip installs for your user only ("Defaulting to user installation"). Either install with uv tool install sugo-cli and run uv tool update-shell once, or add the folder pip names in its warning (on Windows, %APPDATA%\Python\Python3XX\Scripts) to your Path, then open a new terminal.
[!TIP] The package is called
sugo-clibecause the namesugoon PyPI is held by an unrelated, empty project (a name transfer request is open). The installed command is stillsugo;sugo-cliworks too. Older instructions withsugo-cli[lite]still work: everything is now included by default.
To run the latest development version from source instead:
Convert a file and print its Markdown:
More things you can do:
Add --json for output a script can read.
Use it from an AI agent (MCP)
Sugo can serve agents such as Claude Code or Codex over MCP. It reads only inside the folders you name:
The agent gets two tools: convert_document and estimate_savings.
Uninstall
Remove the program the same way you installed it:
Or, if you used pip:
If you added Sugo to an agent, remove it there too, for example claude mcp remove sugo.
Uninstalling the program does not delete the files Sugo created. They are only on your computer, and you can delete them by hand:
If you set SUGO_CACHE_DIR, the cache is in that folder instead. The cache holds text from the documents you converted, so delete it if those documents were private. Apart from these two folders and the files you asked it to write (such as -o output or receipts), Sugo keeps nothing else on disk.
On an old computer
Measured on 2026-11-03 on a 2010 desktop: Intel Core i5-650 (2 cores, 4 threads, no AVX), 8 GB RAM, SSD, no usable GPU. Weaker than the 8 GB, 4-core machine Sugo targets.
Native documents run well within the targets even on this machine. OCR is accurate but slow on a CPU without AVX; making it faster is on the roadmap. Details and scripts are in TESTING.
Supported files
Old .doc, .xls and .ppt files and password-protected files are not read: save a new copy first.
How it works
Each reader turns a file into the same structure of pages and blocks. Cleaners only propose changes; the core applies them and marks each removed block with who removed it and why, instead of deleting it. That is what makes the output checkable and reproducible. The full design is in ARCHITECTURE.
Promises
These are written down in PRINCIPLES and checked by tests:
- Local by principle. Conversion never needs the internet. No cloud API, no telemetry.
- No guessing. Unreadable text is marked as illegible, never filled in.
- Nothing silently lost. Every removal is recorded, with its reason.
- Honest metrics. Savings are measured, and Sugo also tells you when sending the original image would be cheaper.
- Safe with untrusted files. Size and time limits, XML parsed safely, models verified by checksum. See the threat model.
Documentation
Contributing and security
See CONTRIBUTING. Please report vulnerabilities privately, as described in SECURITY, not in public issues.
License
AGPL-3.0-or-later (see ADR-010).
來源:README.md,提交 198f727
工具
0版本歷史
1- v0.1.2最新Nov 7, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分