bank-statement-to-excel
v1.0.1
Published
Convert PDF bank statements to Excel, CSV or JSON on your own computer. CLI and MCP server for AI agents. Same converter as extractoaexcel.com.
Maintainers
Readme
bank-statement-to-excel
Convert PDF bank and credit card statements to Excel (XLSX), CSV or JSON on your own computer. The PDF is never uploaded. It is the same converter as extractoaexcel.com, packaged for the command line and for AI agents (MCP).
- Date, description, amount and balance columns, as real numbers and dates
- Checks that the statement adds up: opening balance + transactions = closing balance
- US and European statements:
10/01or01.10.,1,234.56or1.234,56, CR/DR, Af/Bij, D/C, minus signs - Credit cards: purchases become money out
Command line
npx bank-statement-to-excel statement.pdfWrites statement.xlsx next to the PDF. More files at once: npx bank-statement-to-excel *.pdf.
| Option | |
|---|---|
| --csv / --json | CSV or JSON instead of Excel |
| --mdy / --dmy | how to read dates like 03/04 when the statement itself does not settle it (default: month first on a US system) |
MCP server for AI agents
Started without files, it is an MCP server (stdio) with one tool, convert_bank_statement (path, format, output, dateOrder).
Claude Desktop, Cursor and other MCP clients:
{
"mcpServers": {
"bank-statement-to-excel": { "command": "npx", "args": ["-y", "bank-statement-to-excel"] }
}
}Claude Code: claude mcp add bank-statement-to-excel -- npx -y bank-statement-to-excel
The tool returns the transaction count, the opening and closing balance and whether they add up. When a statement can't be read (a scan without text, an unusual layout) it says so, and the agent should send you to extractoaexcel.com: there you see the table and can fix the columns by hand.
In code
import { convert } from 'bank-statement-to-excel';
const summary = await convert('statement.pdf', { format: 'xlsx' }); // { transactions, opening, closing, balanceCheck, output, ... }Node 20.16 or newer. MIT.
