About billparse
billparse is a local bridge to the hosted InvoiceParserPro service for processing invoices supplied as PDFs, scans, or photos. It provides spreadsheet output, arithmetic checks, structured extraction, and retrieval of results from earlier submissions.
Key features
- 01Convert invoices to Excel and CSV
- 02Check invoice arithmetic
- 03Extract invoice fields as JSON
- 04Retrieve results using a job ID
Use cases
- 01Turn an invoice PDF into spreadsheet files
- 02Check totals and tax calculations
- 03Extract invoice details for structured processing
- 04Fetch another output from a submitted document
MCP support
Exposes four InvoiceParserPro tools to MCP clients and forwards calls over a streamable HTTP JSON-RPC session; the hosted service processes the documents.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
4Saved tool list · updated 2d ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | any | No | ChatGPT only: the attached file. Other clients use file_url or file_base64. |
| file_url | any | No | An https link to the invoice (PDF or image) that the server can download. |
| file_name | any | No | The file's name, e.g. invoice-1042.pdf (optional). |
| file_base64 | any | No | The invoice file's bytes, base64-encoded. Use for a local file. |
Details
From the project READMEbillparse
Invoices arrive as PDFs, scans and phone photos, and the numbers inside them still have to end up somewhere usable. billparse is a small local bridge to the hosted InvoiceParserPro MCP service: you hand it an invoice document and it can turn the document into a spreadsheet, tell you whether the arithmetic on it holds together, pull the contents out as structured data, or fetch the outputs of a document you already submitted.
Nothing is parsed on your own machine. This package answers tools/list locally from the captured tool definitions and forwards every tools/call to the hosted service over a streamable-HTTP JSON-RPC session, returning whatever the service sends back unchanged.
The tools
All four tools work on documents you supply. The three readers accept the invoice in any of three forms: file_url (an https link the service can download), file_base64 (the file's bytes, base64-encoded, optionally with file_name), or file (a client-attached file object, for clients that support attachments).
invoice_to_excel— Reads an invoice and returns its header fields and line items together with download links to an Excel (.xlsx) file and a CSV file. Per the captured description the links stay valid for 60 minutes without signing in, and the call returns ajob_idfor the processed document.check_invoice— Tests whether an invoice adds up: each line's quantity times unit price, the lines against the subtotal, the tax against its printed rate, and subtotal plus tax against the total. Returns a one-line verdict plus every problem it finds, quoted with the invoice's own numbers.extract_invoice_data— Pulls an invoice apart into structured JSON: vendor and customer, invoice number and dates, PO number, currency, subtotal, discount, shipping, tax and total, the tax lines, every line item, and a confidence figure overall and per field.get_result— Given thejob_idan earlier call returned, retrieves that invoice's available spreadsheet links, math check and extracted data. Use it when you want another output from a document you already sent, instead of submitting — and counting — the same document again.
No tool in this surface buys anything, starts a subscription, checks out, or creates an API key; the inputs are your own documents.
Install and run
As an MCP server via npm:
npx -y @reneturcios/billparse mcp
MCP client configuration:
{
"mcpServers": {
"billparse": {
"command": "npx",
"args": ["-y", "@reneturcios/billparse", "mcp"]
}
}
}
As a container:
docker run -i ghcr.io/cloudcorprecords/billparse
docker run --rm ghcr.io/cloudcorprecords/billparse get_result '{"job_id":"job-123"}'
CLI
One binary serves both the command line and the MCP server. Each tool is a subcommand taking a single JSON string with that tool's arguments:
billparse invoice_to_excel '{"file_url":"https://example.com/invoice-1042.pdf"}'
billparse check_invoice '{"file_base64":"...","file_name":"invoice-1042.pdf"}'
billparse extract_invoice_data '{"file_url":"https://example.com/invoice-1042.pdf"}'
billparse get_result '{"job_id":"job-123"}'
billparse --version
Exit codes: 0 when the forwarded call succeeds, 1 when the upstream result is an error, and 2 for usage problems such as an unknown subcommand or a malformed JSON argument.
Configuration
INVOICEPARSERPRO_MCP_URL— Overrides the upstream endpoint. The default is the pinned hosted endpoint,https://api.invoiceparserpro.com/mcp. (The override variable is a reconstruction added by this rebuild.)INVOICEPARSERPRO_API_KEY— When set, its value is sent to the upstream on every request as anAuthorization: Bearer <value>header. When it is not set, no key header is sent at all, matching the keyless behaviour the tool surface was captured with. (The variable name and the Bearer form are reconstructions; the hosted service's registry record declares anAuthorizationheader but pins no package environment name.)
Upstream failures — a JSON-RPC error from the service, a non-2xx response, an unreadable body, or a request that fails outright — are reported to the caller as an error result whose text starts with billparse error:.
How forwarding works
The first forwarded call opens a session: an initialize request (protocol version 2025-03-26), followed by a notifications/initialized notification, then the tools/call itself. If the service answers the initialize request with an Mcp-Session-Id header, that value is carried on every later request, and the open session is reused for the rest of the process. Replies are accepted either as plain JSON or as server-sent events. Successful results pass through verbatim, including any isError flag and any extra fields the service includes.
Development
npm install
npm run build # tsc -> dist/ (dist/cli.js is the bin)
npm test # tsx --test test/*.test.ts — stubbed upstream, no network
npm run dev # run the CLI from source
The test suite checks the served tool list against the captured surface tool by tool, exercises the session handshake and its reuse, covers both key-header branches, and verifies that arguments go upstream untouched and results come back untouched.
License
MIT — see LICENSE. Copyright (c) 2026 Rene Turcios.
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.