shuck-file

io.github.Shan-Zhu由 GitHub 帳號 Shan-Zhu 發布v2.0.4更新於 Oct 24, 2026

Any file in, Markdown out — read only what matters.

已驗證STDIO僅桌面檔案與儲存知識與記憶

概覽

AI 產生的概覽

將 Word、PDF、Excel、PowerPoint、CSV 等本機文件轉換為乾淨的 Markdown,大型檔案會回傳分節地圖。

可以做什麼
shuck-file 提供兩個 MCP 工具:shuck 可將文件轉換為 Markdown,支援完整輸出、指定章節、僅表格、關鍵字搜尋、token 預算與輸出路徑等選項;list_formats 則列出支援的格式。小型檔案直接完整輸出,大型檔案會回傳包含章節標題、token 數量與後續建議的文件地圖,讓助理只取用需要的部分。支援的格式為 .docx、.pdf、.xlsx、.pptx 與 .csv。
適用情境
適合助理需要讀取或搜尋本機辦公文件與試算表、又不希望把整個檔案放進上下文的情況。適用於對大型報告或活頁簿進行摘要、關鍵字搜尋或部分擷取的工作流程。
執行需求
以本機程序透過 stdio 執行。需用 pip 安裝 shuck-file Python 套件,它會提供 shuck 命令列工具與 MCP 伺服器,因此需要 Python 環境。未宣告任何帳號、API 金鑰、環境變數或標頭。
安裝前請注意
它會讀取本機檔案,助理因此能存取被指定的任何文件路徑,請只指向你願意曝露的檔案。透過 -o 與 -d 選項可將輸出寫入檔案或目錄,會在磁碟上建立或覆寫檔案。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

🇨🇳 中文

shuck-file

[PyPI] [MCP Registry] [License: MIT]

Any file in, Markdown out — read only what matters.

shuck-file converts documents to clean Markdown for AI agents and LLMs. Small files output directly; large files return a document map with section summaries, token counts, and actionable next steps — so agents only pull what they need.

Why shuck-file?

AI agents need a bridge that's context-aware:

  • Small file → shuck report.docx → full Markdown on stdout
  • Large file → shuck report.docx → document map with sections and extraction options
  • Targeted extraction → shuck report.docx --sections s1,s3 → only what you need
  • Search → shuck report.docx --grep "revenue" → find without reading everything

Supported Formats

FormatExtensionLibraryWhat's Preserved
Word.docxpython-docxHeadings, bold/italic, lists, tables
PDF.pdfpdfplumberText content, page breaks
Excel.xlsxopenpyxlAll sheets as Markdown tables
PowerPoint.pptxpython-pptxTitles, text, tables, speaker notes
CSV.csvstdlibAll rows/columns as a table

Installation

Via pip (recommended)

bash
pip install shuck-file

This installs the shuck CLI command and the MCP server.

From source

bash
git clone https://github.com/Shan-Zhu/shuck-file.gitcd shuck-filepip install -e .

Quick Start

bash
# Convert a documentshuck report.docx
# Force full output (bypass map mode)shuck large-report.pdf --all
# Search within a documentshuck report.pdf --grep "revenue"

Usage

Auto-Routing (default)

Small files output directly, large files return a document map.

bash
# Small file → direct Markdown outputshuck document.pdf
# Large file → document map with sections table + next stepsshuck large-report.pdf

Extraction Options

bash
# Force full output (bypass map mode)shuck report.pdf --all
# Extract specific sectionsshuck report.pdf --sections s1,s3
# Tables onlyshuck report.pdf --tables-only
# Search within documentshuck report.pdf --grep "revenue"
# Token budget (smart compression)shuck report.pdf --budget 4000
# Combinations workshuck report.pdf --sections s2,s3 --budget 2000

Excel/CSV Specific

bash
# Column headers and typesshuck data.xlsx --schema-only
# Headers + first N rowsshuck data.xlsx --sample 5

Power User Subcommands

bash
# Force map mode (even on small files)shuck probe document.docx
# Force full extraction (alias for --all)shuck pull document.docx

Output Control

bash
# Write to fileshuck document.pdf -o output.md
# Write to directory (auto-named)shuck document.pdf -d ./converted/
# Skip YAML frontmattershuck document.pdf --no-frontmatter
# List supported formatsshuck --formats

Map Mode Output

When a file is large, shuck returns a document map:

markdown
# Document Map: quarterly-report.pdf
**6 pages | ~12,400 tokens | 6 sections**
## Sections
| # | Title | Type | Tokens | Density ||---|-------|------|--------|---------|| s1 | Executive Summary | narrative | 450 | high || s2 | Q3 Financial Results | mixed | 2,800 | high || s3 | Revenue Breakdown | tabular | 3,200 | high || ...
## Next Steps
- `shuck quarterly-report.pdf --all` -- full document (~12,400 tokens)- `shuck quarterly-report.pdf --sections s1,s2` -- high-density (~3,250 tokens)- `shuck quarterly-report.pdf --grep "..."` -- search for keywords

MCP Server

shuck-file includes an MCP (Model Context Protocol) server, making it available to any MCP-compatible AI tool.

Claude Code

bash
claude mcp add shuck-file -- shuck-file

Or add to your project's .mcp.json:

json
{  "mcpServers": {    "shuck-file": {      "command": "shuck-file",      "args": []    }  }}

Cursor

Add to ~/.cursor/mcp.json:

json
{  "mcpServers": {    "shuck-file": {      "command": "shuck-file",      "args": []    }  }}

Windsurf

Add to your MCP configuration:

json
{  "mcpServers": {    "shuck-file": {      "command": "shuck-file",      "args": []    }  }}

Any MCP Client

shuck-file registers as an MCP server via the mcp.servers entry point. Tools exposed:

  • shuck — Convert a document to Markdown with all options (mode, sections, grep, budget, etc.)
  • list_formats — List supported document formats

Claude Code Plugin

Install as a Claude Code plugin for the /shuck skill:

bash
claude plugin add /path/to/shuck-file

Architecture

src/shuck_file/├── cli.py                # CLI entrypoint├── server.py             # MCP Server (FastMCP)├── core/│   ├── router.py          # Auto-routing logic│   ├── segmenter.py       # Document segmentation│   ├── mapper.py          # Map mode renderer│   ├── budget.py          # Smart compression│   ├── grep.py            # In-document search│   ├── frontmatter.py     # YAML frontmatter│   └── models.py          # Data models├── extractors/│   ├── base.py            # Base extractor ABC│   ├── docx_ext.py        # Word extractor│   ├── pdf_ext.py         # PDF extractor│   ├── xlsx_ext.py        # Excel extractor│   ├── pptx_ext.py        # PowerPoint extractor│   └── csv_ext.py         # CSV extractorplugin/                    # Claude Code plugin wrappertests/├── test_extractors.py├── test_router.py├── test_segmenter.py├── test_budget.py└── test_grep.py

License

MIT

來源:README.md,提交 05a7d31

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.0.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分