What a taxable bond must yield to match this municipal one, counting state tax and the 3.8% surtax the exemption also avoids
One command on the Municipal bonds server, callable over MCP as calculate_muni_yield, filed in the registry as Taxable-equivalent yield. 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 |
|---|---|---|---|
municipal_yield | Municipal yield (e.g. 0.035) | The equivalent yield is this yield grossed up by the taxes the exemption avoids. | defaults to 0.035 |
federal_rate | Federal marginal rate | The gross-up uses the marginal rate the next dollar of interest would otherwise have faced. | defaults to 0.37 |
state_rate | State marginal rate | In-state interest escapes state tax as well. The standard formula leaves this out and understates the equivalent yield by over a point. | defaults to 0.093 |
state_exempt | Exempt in the holder's own state one of yes, no | Out-of-state interest is taxed by the holder's own state, so the same bond is worth less to them. | defaults to yes |
niit_applies | Subject to the 3.8% surtax one of yes, no | Exempt interest escapes the 3.8 per cent surtax too, which adds to the equivalent yield. | defaults to yes |
private_activity | Private activity bond one of no, yes | Interest on a private activity bond is an AMT preference item, so the exemption is not complete. | defaults to no |
amt_applies | Taxpayer is in AMT one of no, yes | The private activity adjustment only matters to a taxpayer who is actually in AMT. | defaults to no |
issue_year | Year the bond was issued (blank = unknown) | Some treatments turn on when the bond was issued. Left blank, the result says what it could not apply rather than assuming a year. | blank means do not apply it |
Requests it answers
- “What taxable yield matches this municipal bond?”
- “Does state tax change a muni's equivalent yield?”
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 muniThe same command is exposed by taxagent-muni, 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. Whether a bond is a private activity bond, and what any state charges, are supplied by the caller rather than looked up.
Scripted cases that exercise it
5 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 |
|---|---|---|---|
muni-naive-understates | What a taxable bond would have to pay | 7.01% against the 5.56% the federal-only formula gives. State tax and the 3.8% surtax are both avoided, and both are routinely left out. | completed |
muni-out-of-state | The same bond, bought out of state | Federally exempt, state taxable. 5.91% instead of 7.01% — a different proposition that looks identical on a screen. | completed |
muni-private-activity-in-amt | A private activity bond held by someone in AMT | The interest is a preference item, so nothing is avoided and the advantage is zero. The answer reverses rather than shades. | completed |
muni-2009-window | The same bond, issued in 2009 | Bonds issued in 2009 and 2010 are excepted from the preference, so the advantage survives AMT. A narrow window with a total effect. | completed |
muni-rejects-percentage-rate | A rate given as 37 instead of 0.37 | Refused rather than producing a yield nobody could sanity-check. | VALIDATION_FAILED |
Limits it inherits from taxagent-muni
- Whether a bond is a private activity bond. That is a fact about the issue, and it decides whether the interest is an AMT preference.
- Any state's treatment of its own or another state's bonds. The holder's state rate is supplied by the caller, not looked up.
- Credit risk, call features, duration and liquidity, none of which a yield comparison sees.
- Original issue discount accrual schedules, and the constant-yield premium schedule the statute requires: amortization is shown straight-line, which reaches the same place at maturity.
- The effect of exempt interest on how much Social Security is taxable, which is real and is why 'tax-free' overstates it.
The server, its other 3 commands and what it deliberately leaves alone are on the Municipal bonds page.