Ordinary tax, long-term gains stacked across the preferential bands, and the 3.8% surtax
One command on the Federal income tax server, callable over MCP as calculate_federal, filed in the registry as Federal estimate. 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.
| Input | What it asks for | Why it matters | If you omit it |
|---|---|---|---|
income | Ordinary income | Ordinary income fills the bands first, which decides where anything stacked on top of it lands. | defaults to 185000 |
status | Filing status one of MFJ, SINGLE, HOH, MFS | Every band, threshold and exemption in the calculation is set by filing status. | defaults to MFJ |
gain | Net long-term gain | Long-term gain is stacked on top of ordinary income and taxed on the preferential schedule, so it is supplied separately. | defaults to 50000 |
nii | Net investment income | The surtax applies to the lesser of net investment income and the excess over the threshold, so neither figure implies the other. | defaults to 50000 |
deduction | Itemized deduction (blank = standard) | Taxable income, and every band above it, moves with the deduction. Left blank, the standard deduction is used. | blank means do not apply it |
Requests it answers
- “What will I owe in federal tax on this income?”
- “How much does a long-term gain add to my federal tax?”
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
python3 -m taxagent federal tax --income 185000 --status MFJ --gain 50000 --nii 50000The same command is exposed by taxagent-federal, 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.
Scripted cases that exercise it
1 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.
| Case | What it asks | What it shows | Outcome |
|---|---|---|---|
federal-estimate | What does $185,000 and a $50,000 gain cost? | Ordinary tax band by band, then the gain stacked on top of taxable income so it lands in the right preferential band. | completed |
Limits it inherits from taxagent-federal
- A return. AMT and the section 199A deduction are computed separately and are not folded into one liability.
- Credits, self-employment tax and the additional Medicare tax.
- State and local tax.
The server, its other 6 commands and what it deliberately leaves alone are on the Federal income tax page.