# ofdkit

> ofdkit is a free MCP server for files and documents. Read OFD files and Chinese e-invoices locally: text, invoice fields and folder totals. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, API
- **Repository:** https://github.com/edgar-311/ofdkit
- **MCP Registry name:** io.github.Edgar-311/ofdkit
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [finance and payments](https://ai-powered.com/categories/finance-and-payments)
- **Listing updated:** 2026-11-18

## About

OFD is China's national fixed-layout document standard (GB/T 33190), used for electronic invoices and official documents. ofdkit is a Python library and command-line tool for reading it, and its MCP server lets an assistant open those files without any conversion step. All four tools are read-only.

From an invoice it pulls the number, date, buyer and seller with tax IDs, amounts, tax and line items, and keeps amounts as decimal strings so no precision is lost; warnings flag totals that do not add up. The command line adds a folder or .zip summary exported to Excel, with duplicates highlighted, a check that invoices are made out to the right buyer, and file renaming from invoice contents with preview and undo.

It uses only the Python standard library and tolerates many malformed files. The README is bilingual in Chinese and English and labels the project version 0.4, with the interface still liable to change. The MCP server needs uv.

## Features

- **Invoice field extraction:** Reads number, date, buyer, seller, amounts and line items from an OFD e-invoice.
- **Folder and zip totals:** Summarises many invoices, including tax-platform zip downloads, with totals and duplicate flags.
- **Buyer check:** Flags invoices whose buyer name or tax ID does not match yours.
- **Rename by content:** Renames invoice files from their details, with preview and undo log.
- **Reading-order text:** Extracts text in order, including templates and composite objects.
- **No dependencies:** Runs on the Python standard library alone.

## Good for

- Total a month of reimbursement invoices into Excel
- Check that every invoice names the right company
- Extract invoice data as JSON for accounting software
- Let an assistant read an OFD official document
- Rename downloaded invoices by date, seller and amount

## Install

### Claude Code (Terminal)

```sh
claude mcp add ofdkit -- uvx ofdkit
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "ofdkit": {
      "command": "uvx",
      "args": [
        "ofdkit"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "ofdkit": {
      "command": "uvx",
      "args": [
        "ofdkit"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "ofdkit": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "ofdkit"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "ofdkit": {
      "command": "uvx",
      "args": [
        "ofdkit"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "ofdkit": {
      "command": "uvx",
      "args": [
        "ofdkit"
      ]
    }
  }
}
```

## Tools

- `read_ofd_text`: Extract text in reading order, with optional Markdown and page range.
- `read_ofd_invoice`: Return invoice fields.
- `ofd_info`: Return page count, sizes and metadata.
- `list_ofd_invoices`: Summarise a folder of invoices, optionally checking the buyer.

## FAQ

### What is an OFD file?

A Chinese national standard document format, GB/T 33190, common for e-invoices and official documents.

### Which tools does the MCP server provide?

read_ofd_text, read_ofd_invoice, ofd_info and list_ofd_invoices, all read-only.

### What do I need installed?

Python 3.10 or newer, and uv for the MCP server.

### Does it handle precision in amounts?

Yes, amounts are kept as decimal strings and only real numbers are summed.

### Is ofdkit free?

Yes. ofdkit is free to use.

### How do I add ofdkit to Claude Code?

Run this command in your terminal: claude mcp add ofdkit -- uvx ofdkit

### What are the best alternatives to ofdkit?

The closest alternatives to ofdkit are Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Budget Tracker, SSRS2 and Crypto Feeds.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## 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.
- [SSRS2](https://ai-powered.com/mcp/ssrs2): SSRS2 is an MCP server for files and documents.
- [Crypto Feeds](https://ai-powered.com/mcp/crypto-feeds): Crypto Feeds is a freemium MCP server for finance and payments.
- [Csv](https://ai-powered.com/mcp/csv): Csv is a freemium MCP server for files and documents.
- [Crypto Fng](https://ai-powered.com/mcp/crypto-fng): Crypto Fng is a freemium MCP server for finance and payments.
- [Creditcard](https://ai-powered.com/mcp/creditcard): Creditcard is a freemium MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/ofdkit
