Skip to main content
Glama
Invoice Query MCP Server

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

Available Tools

4 tools
get_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

    B3.4/5.0

    Scored across 4 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    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
    • F
      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.
      -
    • A
      license
      B
      quality
      C
      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
      B
      quality
      B
      maintenance
      Connects 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.
      34
      MIT