Skip to main content
Glama
late-interest

late-interest

late-interest

UK statutory late payment interest and fixed compensation for business-to-business invoices, as a TypeScript library, a command-line tool and an MCP server. No network calls, no runtime data fetching; one small dependency pair (@modelcontextprotocol/sdk, zod) used only by the MCP server.

It runs the same tested code and the same verified Bank of England Bank Rate table as the free calculator at claimlateinterest.co.uk, which shows the working step by step and can raise the claim invoice and chase the debt for you.

Not legal advice. This package gives general information about the Late Payment of Commercial Debts (Interest) Act 1998 and does not take your contract or circumstances into account. It assumes a business-to-business debt with no contractual late payment rate. Check the sources below, and take advice if a lot is at stake or the debt is disputed. No warranty (see the MIT licence).

What it calculates

Part

Rule

Source

Interest

8% a year over the Bank of England Bank Rate, simple interest, daily rate = yearly ÷ 365, from the day after the due date

Act s.4, GOV.UK

Which Bank Rate

The rate in force on 30 June (interest starting 1 Jul to 31 Dec) or 31 December (interest starting 1 Jan to 30 Jun) immediately before interest starts, then fixed

Rate of Interest (No. 3) Order 2002, art. 4

Fixed compensation

£40 under £1,000; £70 from £1,000 to £9,999.99; £100 from £10,000. Once per debt

Act s.5A, GOV.UK

Not covered: consumer debts, contractual rates, part-payments, public-authority customers, the 60-day "grossly unfair" cap on payment terms, and extra recovery costs above the fixed sum (s.5A(2A)). Interest and compensation carry no VAT.

Bank Rate data: Bank of England, Open Government Licence v3.0. The table is bundled with each release (currently verified to 24 September 2026; the next Monetary Policy Committee decision is 5 November 2026). The package warns when a result depends on a rate it cannot know yet. The website keeps its table up to date automatically; update this package after a rate change.

Related MCP server: mcp-business-docs

Install and use

npm install late-interest        # library
npx late-interest 2500 --due 2026-06-30 --paid 2026-09-28

Library

import { lateInterest, fixedCompensation, bankRateOn } from "late-interest";

const r = lateInterest({ amount: 2500, dueDate: "2026-06-30", paidDate: "2026-09-28" });
// { daysLate: 90, bankRatePercent: 3.75, statutoryRatePercent: 11.75,
//   interest: 72.43, compensation: 70, total: 142.43, pence: { ... },
//   warnings: [], sources: { ... }, notLegalAdvice: "...", moreInfo: "https://claimlateinterest.co.uk/" }

fixedCompensation("999.99").compensation;  // 40
bankRateOn("2025-12-31").bankRatePercent;  // 3.75

Leave out paidDate for an unpaid invoice and it counts to today (UK time). Amounts may be numbers or strings like "£2,500.00"; totals are also given in whole pence (pence) so you can add them exactly. Bad input throws an Error with a plain message.

CLI

late-interest <amount> --due YYYY-MM-DD [--paid YYYY-MM-DD] [--json]
late-interest compensation <amount> [--json]
late-interest rate <YYYY-MM-DD> [--json]
late-interest history [--since YYYY-MM-DD] [--csv | --json]
late-interest mcp

Exit code 0 on success, 2 for bad input (message on stderr).

MCP server (Claude Desktop, Cursor and other MCP clients)

late-interest mcp (or the late-interest-mcp command) starts an MCP server over stdio. Nothing to install first: npx fetches it.

Claude Desktop: open Settings → Developer → Edit Config (the file is claude_desktop_config.json: ~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows), add the server, save and restart Claude Desktop:

{
  "mcpServers": {
    "late-interest": {
      "command": "npx",
      "args": ["-y", "late-interest", "mcp"]
    }
  }
}

Needs Node.js 18.17 or later on your PATH. Then ask Claude something like "An invoice for £2,500 was due on 30 June 2026 and paid on 28 September 2026. How much statutory interest and compensation can I claim?"

The same block works in Cursor (~/.cursor/mcp.json) and other MCP clients.

Tools (all read-only, no network): calculate_late_payment_interest, late_payment_fixed_compensation, bank_rate_on_date, bank_rate_history. Every answer includes the sources, the not-legal-advice text and a link back to the site.

How it stays the same as the website

src/core/calc.ts and src/core/baseRates.ts are copies of the calculator and Bank Rate table behind claimlateinterest.co.uk, made by scripts/sync-core.mjs (the only edit is .js on relative imports). The website's own test suite fails if the copies drift, and a new release of this package follows each Bank Rate change.

Develop

npm install
npm test        # builds, then unit tests, CLI tests and an end-to-end MCP test over stdio

Licence

MIT. Source: github.com/DannyWolfofTech/late-interest. Issues: github.com/DannyWolfofTech/late-interest/issues. Website: claimlateinterest.co.uk.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Sourced, date-aware UK tax and payroll rates, deadlines and UK business checks, with GOV.UK sources.

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

      https://billstride.com/api/mcp
    • Search and read UK legislation at any date, resolve citations, list amendments, track changes.

    • **UK Source Intelligence — GOV.UK Change Monitoring & Historical Evidence for AI Agents** UK Source Intelligence (UKSI) is an MCP-compatible monitoring service that helps AI agents and developers detect, investigate and verify changes to official GOV.UK content. Unlike a simple website-change notification tool, UKSI retains observed wording, timestamps and SHA-256 fingerprints, allowing agents to compare genuine historical versions and provide traceable evidence to their human users. **Key capabilities:** - Nine pre-monitored GOV.UK pages. - Monitor additional supported GOV.UK pages. - Compare previously observed and updated wording. - Retrieve historical snapshots, timestamps and source fingerprints. - Verify exact quotations against official government content. - Access information through 12 MCP tools or an API. - Free public evidence demonstration without registration. **Free trial — 14 days** - No payment required. - 10 API requests per day. - One custom monitored GOV.UK page. **Introductory access — £4.99 one-time payment** - 30 days of access. - 100 authenticated API requests per day. - Three custom monitored GOV.UK pages. - No subscription or automatic renewal. **Ideal for:** AI developers, compliance researchers, accountants, regulatory monitoring workflows and organisations requiring verifiable historical GOV.UK source evidence. **Limitations:** Monitoring begins when a page is registered; historical records cannot be reconstructed from before monitoring began. Coverage is restricted to supported GOV.UK content, and monitoring intervals are not guaranteed. UKSI is not a substitute for professional legal or regulatory advice. Website: https://uk-source-intelligence.pages.dev/ MCP endpoint: https://uk-source-intelligence-mcp.mazdamen.workers.dev/mcp

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to search and inspect an invoice ledger, generate VAT summaries, run OCR on local documents, and use reusable prompts for chasing overdue invoices and reconciling entries.
      2
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to call deterministic Singapore legal deadline arithmetic instead of guessing, covering Rules of Court 2021 procedural periods, Limitation Act anniversaries, contractual deemed receipt, and working-day utilities. Each tool returns a full derivation trace and requires an explicit rule id, so the rule choice and holiday data provenance stay visible in the transcript.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables searching and reading UK legislation as it stands now, as enacted, or on any date, resolving citations to canonical items and provisions, listing amendments and effects, and tracking daily changes via the legislation.gov.uk publication log.
      141 npm
      2
      Apache 2.0