The exclusion and housing amount a qualifying taxpayer could claim
One command on the Cross-border tax server, callable over MCP as calculate_feie, filed in the registry as Foreign earned income exclusion. 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 |
|---|---|---|---|
foreign_earned_income | Foreign earned income | The exclusion is capped, so how much of the income it reaches depends on the income. | defaults to 180000 |
qualifying_days | Qualifying days in the period | The exclusion and the housing amount are both prorated over the days the taxpayer qualified. | defaults to 365 |
housing_expenses | Housing expenses | The housing amount is the excess over a base figure, up to a cap tied to the exclusion. | defaults to 45000 |
Requests it answers
- “How much foreign earned income can be excluded?”
- “What does the housing amount add to the exclusion?”
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 internationalThe same command is exposed by taxagent-international, 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. Eligibility for the exclusion is never established here: it turns on where someone lived and worked.
Scripted cases that exercise it
4 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 |
|---|---|---|---|
intl-feie-with-housing | Exclusion plus the housing amount | The housing amount is the excess over a 16% base, capped at 30%, not a deduction for everything spent on rent. | completed |
intl-feie-prorated | A partial qualifying period | 183 days prorates both the exclusion and the housing figures. A day count that is off by one changes the answer. | completed |
intl-feie-housing-below-base | Housing below the base gives nothing | The base is a floor, not a starting allowance. Spending under it produces no housing amount at all. | completed |
intl-rejects-bad-day-count | An impossible qualifying period is refused | 400 days in a year is not a typo the server will absorb. | VALIDATION_FAILED |
Limits it inherits from taxagent-international
- Eligibility for the exclusion. It requires a tax home abroad and either bona fide residence or physical presence, which are facts about where someone lived and worked.
- The foreign tax credit, which is often worth more than the exclusion and cannot be claimed on the same income.
- GILTI, subpart F, PFIC, treaty positions and FBAR.
- High-cost location housing limits.
The server, its other 2 commands and what it deliberately leaves alone are on the Cross-border tax page.