# OFD Reader (China e-invoices)

> OFD Reader (China e-invoices) is an open-source MCP server for files and documents. Read Chinese OFD documents: e-invoice (fapiao) fields, full text and file metadata. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, self-hosted
- **Website:** https://okagent.kr/mcp
- **Repository:** https://github.com/groove79/kmcp/tree/HEAD/packages/ofd
- **MCP Registry name:** io.github.groove79/mcp-ofd
- **Categories:** files and documents, finance and payments
- **Listing updated:** 2026-11-15

## About

OFD is China's fixed-layout document format, used for e-invoices, many official documents and bank statements, and most assistants cannot open it. This server reads it. ofd_invoice_fields pulls invoice number and code, issue date, buyer and seller names and tax IDs, amount before tax, tax, total and check code, from embedded tags where present and otherwise from printed labels. ofd_to_text returns the full text page by page, rebuilt from glyph positions. ofd_info gives title, creator, dates, page count, whether it is signed and any attachments.

Pass exactly one of a local path, a URL or base64 content. Safety limits are stated: only XML parts are decompressed (32 MB each, 96 MB total), XML entity declarations are refused, and nothing is written to disk. No API keys are needed. It runs locally via npx, or as part of the hosted K-MCP endpoint, and is MIT licensed.

## Features

- **Invoice field extraction:** Reads invoice numbers, parties, tax IDs and amounts.
- **Page-by-page text:** Rebuilds reading-order text from glyph positions.
- **Document metadata:** Shows title, dates, page count and signature status.
- **Three input modes:** Accepts a path, URL or base64 data.
- **Defensive parsing:** Size limits and refused XML entities; nothing written.
- **No keys:** Works without credentials.

## Good for

- Extract totals and tax IDs from a Chinese e-invoice
- Read an OFD bank statement as text
- Check whether an OFD file is signed
- Feed supplier invoices into bookkeeping

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-ofd -- npx -y @appmonster/mcp-ofd
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-ofd": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@appmonster/mcp-ofd"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `ofd_invoice_fields`: Extracts invoice fields such as number, date, parties, tax IDs and amounts
- `ofd_to_text`: Returns full document text page by page
- `ofd_info`: Returns title, creator, dates, page count, signature status and attachments

## FAQ

### Do I need an API key?

No keys are needed.

### What inputs does it take?

Exactly one of path, url or base64.

### Is it safe with untrusted files?

The README says only XML parts are inflated within size limits, entity declarations are refused and nothing is written.

### What licence?

MIT.

### Is OFD Reader (China e-invoices) free?

Yes. OFD Reader (China e-invoices) is open source, so you can use and self-host it for free.

### How do I add OFD Reader (China e-invoices) to Claude Code?

Run this command in your terminal: claude mcp add mcp-ofd -- npx -y @appmonster/mcp-ofd

### What are the best alternatives to OFD Reader (China e-invoices)?

The closest alternatives to OFD Reader (China e-invoices) are Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Budget Tracker, ASTra and Quantivex Research.

## Alternatives

- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Budget Tracker](https://ai-powered.com/mcp/budget-tracker-2): Budget Tracker is a freemium MCP server for finance and payments.
- [ASTra](https://ai-powered.com/mcp/astra): ASTra is a freemium MCP server for files and documents.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.
- [Provyan](https://ai-powered.com/mcp/provyan): Provyan is a free MCP server for finance and payments.
- [TribuJus](https://ai-powered.com/mcp/tribujus): TribuJus is an open-source MCP server for legal and government.
- [CARTESIAN ECU](https://ai-powered.com/mcp/cartesian-ecu): CARTESIAN ECU is a paid MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/ofd-reader-china-e-invoices
