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 分