Skip to main content
Glama
JohnGantz-dev

Invoice Query MCP Server

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.

Demo transcript

Summary card

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

list_invoices

Filter by status, customer substring, amount range, category

get_invoice

Fetch one invoice by ID

invoice_summary

Counts and USD totals (optionally filtered)

overdue_invoices

Shortcut for overdue rows + total

Stack

  • TypeScript / Node.js

  • @modelcontextprotocol/sdk (stdio transport)

  • Zod for tool input schemas

  • csv-parse for CSV loading

  • Vitest 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

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    18
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP 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.
    441 npm
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Enables 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.
    30
    19 PyPI
    1
    AGPL 3.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to query a connected accounting platform for organisations, invoices, contacts, chart of accounts, and profit-and-loss reports, supporting bookkeeping, AR/AP, and financial reporting workflows.
    196 npm
    MIT