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 分