OFD Reader (China e-invoices)

io.github.groove79由 GitHub 帳號 groove79 發布v0.1.0更新於 Oct 29, 2026

Read Chinese OFD documents: e-invoice (fapiao) fields, official documents, statements. No keys.

已驗證STDIO僅桌面檔案與儲存金融

概覽

AI 產生的概覽

在本機讀取中國 OFD 文件:依閱讀順序擷取全文,並解析電子發票結構化欄位,無需金鑰。

可以做什麼
  • 逐頁擷取 OFD 文件全文,依閱讀順序重建文字
  • 擷取電子發票結構化欄位:發票號碼與代碼、開立日期、買賣方名稱與統一編號、未稅金額、稅額、合計
  • 檢視檔案資訊:標題、作者、產生軟體、建立日期、頁數、是否數位簽章、附件與內嵌標籤
  • 支援以本機路徑、URL 或 base64 內容傳入文件
適用情境
當助理需要讀取 OFD 格式的電子發票、公文或銀行對帳單——多數助理無法直接開啟——並取出全文或發票欄位用於記帳、核對時適用。
執行需求
透過 npx 從 npm 套件 @appmonster/mcp-ofd 以本機程序執行,需要 Node.js;README 另提到可用 URL 或 base64 輸入的託管端點。未宣告驗證、環境變數或標頭。僅在文件以 URL 提供時需要網路存取。
安裝前請注意
文件以路徑、URL 或 base64 內容傳給此伺服器,因此發票與對帳單資料會進入該工具;使用託管端點時檔案會傳送至第三方服務。README 表示僅解壓縮 XML 部分、拒絕 XML 實體宣告且不寫入任何內容。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 OFD Reader (China e-invoices),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

其他 MCP 客戶端

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

README

OFD Reader MCP — Chinese e-invoices (发票) and documents

OFD (GB/T 33190) is China's fixed-layout document format — every e-invoice (电子发票 / 数电票), many official documents and bank statements. Most agents can't open it. This server can: text in reading order, and structured invoice fields.

bash
npx -y @appmonster/mcp-ofd

Hosted (no install, pass url or base64): https://okagent.kr/api/mcp · REST https://okagent.kr/api/tools.

ToolWhat it does
ofd_invoice_fieldsInvoice number/code, issue date, buyer & seller name and tax ID, amount before tax, tax, total, check code — from the invoice's embedded tags, else from printed labels
ofd_to_textFull text, page by page, lines rebuilt from glyph positions (template pages included)
ofd_infoTitle, creator, dates, page count, signed or not, attachments

Pass exactly one of path, url, base64. Safe by design: only XML parts are inflated (32 MB per part, 96 MB total), XML entity declarations are refused, nothing is written.

Claude Desktop config:

json
{ "mcpServers": { "ofd": { "command": "npx", "args": ["-y", "@appmonster/mcp-ofd"] } } }

Part of K-MCP. MIT.

來源:packages/ofd/README.md,提交 53af4ba

工具

3

ofd_to_text

Read OFD document

Extract the text of a Chinese OFD document (GB/T 33190: e-invoices 电子发票/数电票, official documents, bank statements) in reading order, page by page. Pass exactly one of path | url | base64.

輸入參數urlpathbase64maxChars

ofd_invoice_fields

Read OFD e-invoice fields

Extract structured fields from a Chinese OFD e-invoice (发票): invoice number and code, issue date, buyer and seller name and tax ID, amount before tax, tax, total. Uses the invoice's embedded tags, else the printed labels. Pass exactly one of path | url | base64.

輸入參數urlpathbase64

ofd_info

OFD file info

Quick facts about an OFD file without the full text: title, author, creator software, creation date, page count, whether it is digitally signed, attachments, embedded tags.

輸入參數urlpathbase64

版本歷史

1
  1. v0.1.0最新Oct 23, 2026

評分

已滿足適用檢查項的 90%

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

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

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

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