Invoice Query MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Invoice Query MCP Server show me overdue invoices and the total amount due"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Invoice Query MCP Server
Portfolio showcase only. All customers and invoices are fictional sample data. This is not a production product and does not represent a real client engagement.
TypeScript Model Context Protocol (MCP) server that turns a sample invoice CSV into agent-ready tools (list_invoices, get_invoice, invoice_summary, overdue_invoices). Built for Claude Desktop / MCP clients with Zod-validated inputs, Vitest coverage, and a reproducible demo transcript. Shows how to package small, useful data tools for AI agents without dumping whole spreadsheets into the prompt.


Problem
Agents and chat tools often need structured access to tabular finance data (open invoices, overdue balances, customer lookups) without stuffing an entire spreadsheet into the context window.
Related MCP server: Invoice-MCP
Solution
A focused MCP server that loads a sample invoice CSV and exposes four tools:
Tool | Purpose |
| Filter by status, customer substring, amount range, category |
| Fetch one invoice by ID |
| Counts and USD totals (optionally filtered) |
| Shortcut for overdue rows + total |
Stack
TypeScript / Node.js
@modelcontextprotocol/sdk(stdio transport)Zod for tool input schemas
csv-parsefor CSV loadingVitest for unit tests
Quick start
npm install
npm test
npm run build
npm run demo # writes demo/transcript.txt
npm start # stdio MCP server (for Claude Desktop / MCP clients)Claude Desktop config snippet
{
"mcpServers": {
"invoice-query": {
"command": "node",
"args": ["/absolute/path/to/invoice-query-mcp/dist/src/server.js"]
}
}
}Optional: set INVOICE_CSV_PATH to point at a different CSV with the same columns.
Sample data
See data/sample-invoices.csv — twelve fictional local-business invoices used only for demos.
License
MIT © John Gantz
Available Tools
4 toolsget_invoiceGet invoice by IDB
Fetch a single sample invoice by invoice_id (e.g. INV-1003).
Inputs: invoice_id (required).
invoice_summaryInvoice summaryB
Aggregate counts and totals for the sample invoice set, optionally filtered first.
Inputs: status.
list_invoicesList invoicesB
List sample invoices with optional filters (status, customer substring, amount range, category).
Inputs: status, category, max_amount, min_amount, +1 more.
overdue_invoicesList overdue invoicesB
Shortcut tool returning only overdue sample invoices.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
list_invoices, get_invoice, and invoice_summary target clearly different shapes (collection, single record, aggregate). The only real overlap is overdue_invoices, which is a convenience shortcut that list_invoices already covers via its status filter, but the description makes the shortcut intent clear.
All names use consistent snake_case, but the set mixes verb_noun (list_invoices, get_invoice) with bare noun phrases (invoice_summary, overdue_invoices). It remains readable and predictable, just not a single uniform pattern.
Four tools is a small but reasonable surface for a read-only sample-invoice query service; each tool has a role. It sits near the thin end, and overdue_invoices is arguably redundant rather than additive.
For a query-only server, the surface covers listing with filters, single-record retrieval, and aggregation, which handles most read workflows. Minor gaps: no pagination or sorting controls on list_invoices, and no way to query overdue by customer/category except by re-filtering the full set.
Maintenance
Related MCP Connectors
Create invoices, clients, and Stripe payment links from any agent. 7 tools. No email or deletes.
Free invoice drafts, templates and direct PDF generation for AI agents. No account needed.
Query your books, company data, business health, and ship invoices from your AI assistant.
Create, send and track invoices from a conversation in Claude, ChatGPT or any MCP client that supports OAuth. Draft an invoice from one sentence or from last month's invoice for the same client, finalize it, email it to your client and send payment reminders for overdue ones. See revenue by month and by client, download PDFs and e-invoices (ZUGFeRD, XRechnung), and export DATEV packages for your tax advisor. Invoices follow the tax rules of 25 countries, including reverse charge and the small-business VAT exemption. New invoices are drafts, and nothing is emailed until you ask. Pay per invoice with no subscription: the first invoice is free.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables LLM agents to manage QuickBooks Online invoices, customers, and payments via typed tools with OAuth 2.1 authentication, rate limiting, and retries, plus read-only resources for company and receivables summaries.18MIT
- FlicenseNot gradedqualityBmaintenanceMCP server that gives AI agents read access to subscription/SaaS invoice history, ingested from Gmail and stored in Postgres and MongoDB, with tools for listing invoices, retrieving PDFs, and summarizing spend.-
- AlicenseBqualityCmaintenanceEnables AI assistants to query and manage self-hosted accounting data—invoices, balances, and books—through natural language, with read-only tools by default and optional scoped write operations.3019 PyPI1AGPL 3.0
- AlicenseBqualityBmaintenanceConnects AI assistants to an Invoice Ninja v5 instance so users can query clients, invoices, quotes, payments, expenses, dashboard totals, and 25+ native reports in natural language. It runs read-only by default with opt-in writes, secret and bearer-link redaction, and LLM-friendly Markdown or compact JSON output.34MIT