The smaller of the current-year and prior-year routes, with the higher prior-year percentage for higher incomes

One command on the Penalties and safe harbours server, callable over MCP as calculate_safe_harbour, filed in the registry as Estimated tax safe harbour. Every result carries the method it used, the rule pack it was pinned to, what is still missing and whether coverage was complete, for a licensed professional to review.

What it needs, and why

Every input is checked before anything is calculated. Nothing is required to start, and a field left blank means do not apply this rather than zero.

InputWhat it asks forWhy it mattersIf you omit it
prior_year_taxLast year's taxOne of the two safe harbours is a percentage of last year's tax.defaults to 80000
current_year_projected_taxThis year's projected taxThe other safe harbour is a percentage of this year's tax, and the smaller of the two is what has to be paid.defaults to 200000
prior_year_agiLast year's AGIAbove an AGI threshold the prior-year route rises from 100 to 110 per cent.defaults to 400000
withholding_and_paymentsWithholding and payments so farWhat has already been paid in is subtracted from the requirement to say what is still owed.defaults to 50000
statusFiling status one of MFJ, SINGLE, HOH, MFSEvery band, threshold and exemption in the calculation is set by filing status.defaults to MFJ

Requests it answers

  • “What must I pay to avoid an underpayment penalty?”
  • “Does the prior-year safe harbour rise with income?”

An agent with these skills loaded picks the command from phrasing like that, asks for whatever input is missing, and reports the figures with the method that produced them.

Run it

scripts/mcp_server.sh --server compliance

The same command is exposed by taxagent-compliance, so Claude, Claude Code, Codex, Cursor and any other MCP client can call it directly. Analysis only. No tool in this server places orders, modifies custodian records or files returns. This server holds no client data: every figure arrives in the call and nothing is stored. Results are estimates over those figures, not a return and not tax advice. Interest is never computed: the rate is set quarterly and compounds daily, so no rate is stored here.

Scripted cases that exercise it

2 of the 71 console cases call this command on a real server over JSON-RPC and assert the outcome. Every one runs on every build, and all of them are listed on the case inventory.

CaseWhat it asksWhat it showsOutcome
comp-safe-harbour-jumpIncome jumped; what must be paid in110% of last year's known tax beats 90% of this year's guess. The prior-year route is what protects a year like this.completed
comp-safe-harbour-fallIncome fell; paying last year's figure would overpayThe current-year route governs when income drops. Taking the prior-year route out of habit ties up cash for a year.completed

Limits it inherits from taxagent-compliance

  • Interest. The underpayment rate is set quarterly and compounds daily, so no rate is stored here and these figures are penalties only.
  • Reasonable cause, first-time abatement and the fraud rate, any of which changes the result substantially.
  • Whether estimated payments were timely by quarter, as opposed to sufficient in total.

The server, its other 3 commands and what it deliberately leaves alone are on the Penalties and safe harbours page.