About OFD Reader (China e-invoices)
OFD Reader is an MCP server for agents that need to read Chinese OFD e-invoices and other documents. It extracts invoice fields, page-ordered text, and document metadata without requiring keys.
Key features
- 01Extract invoice fields
- 02Rebuild page-by-page text
- 03Read document metadata
- 04Accept path, URL, or base64 input
Use cases
- 01Extract totals and tax IDs from e-invoices
- 02Read text from official documents
- 03Inspect bank statements and attachments
MCP support
Exposes OFD invoice, text, and metadata tools to MCP clients. It can run locally or use the hosted endpoint.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
3Saved tool list · updated 6d ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | No | http(s) URL of a .ofd file |
| path | string | No | Local file path of a .ofd file |
| base64 | string | No | Base64 file contents (for clients that cannot share a path) |
| maxChars | integer | No |
Details
From the project READMEOFD 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.
npx -y @appmonster/mcp-ofd
Hosted (no install, pass url or base64): https://okagent.kr/api/mcp · REST https://okagent.kr/api/tools.
| Tool | What it does |
|---|---|
ofd_invoice_fields | Invoice 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_text | Full text, page by page, lines rebuilt from glyph positions (template pages included) |
ofd_info | Title, 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:
{ "mcpServers": { "ofd": { "command": "npx", "args": ["-y", "@appmonster/mcp-ofd"] } } }
Part of K-MCP. MIT.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.