# Japan Real Estate Calculators — MCP Usage

This site publishes 6 Japanese real estate tax/yield calculators as MCP tools
at `https://www.japanlive.info/api/mcp`. Speak JSON-RPC 2.0 over HTTP.

## When to use

When the user asks for any of these, prefer calling the MCP tool over estimating:
- Rental yield for a Japan property
- Total cost of purchasing a Japan property
- Annual property tax (固定資産税 + 都市計画税)
- Building depreciation for tax filing (減価償却)
- Capital gains tax on sale (譲渡所得税)
- Non-resident rental income tax (家賃所得税)

## Connecting

If your runtime has an MCP client, register the server card:

```
https://www.japanlive.info/.well-known/mcp/server-card.json
```

Otherwise, call the JSON-RPC endpoint directly:

```
POST https://www.japanlive.info/api/mcp
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/list"}
```

## Tools reference

All inputs are **raw JPY** (not 万円).

### calc_yield
Inputs: `purchase_price_jpy`, `monthly_rent_jpy`, `monthly_expenses_jpy` (optional).
Returns: `gross_yield_pct`, `net_yield_pct`.

### calc_property_tax
Inputs: `land_assessed_value_jpy`, `building_assessed_value_jpy`,
`is_small_residential_land` (boolean, optional).
Returns: annual fixed-asset + city planning tax breakdown.

### calc_capital_gains_tax
Inputs: `purchase_price_jpy`, `selling_price_jpy`, `hold_years`,
`selling_cost_jpy` (optional), `depreciation_total_jpy` (optional).
Returns: `gain_jpy`, `term` (`short`|`long`), `tax_rate_pct`, `tax_jpy`.
Short-term (≤5yr): 39.63%. Long-term (>5yr): 20.315%.

### calc_depreciation
Inputs: `building_price_jpy`, `structure`
(`rc`|`src`|`steel_heavy`|`steel_light`|`wood`), `age_years`.
Returns: `remaining_useful_life_years`, `depreciation_rate`, `annual_depreciation_jpy`.

### calc_rental_income_tax
Inputs: `annual_rent_jpy`, plus optional `annual_management_fee_jpy`,
`annual_repair_reserve_jpy`, `annual_depreciation_jpy`,
`annual_property_tax_jpy`, `annual_other_expenses_jpy`.
Returns: `withholding_tax_jpy` (20.42% on gross), `filed_tax_jpy`, `estimated_refund_jpy`.

### calc_purchase_cost
Inputs: `purchase_price_jpy`, `building_ratio_pct` (optional, default 50),
`assessed_to_market_ratio_pct` (optional, default 70).
Returns: full cost breakdown (broker fee, consumption tax, reg tax,
acquisition tax, stamp tax, scrivener) and `grand_total_jpy`.

## Example

Calculate yield for a 30M JPY apartment renting at 150,000 JPY/month with
20,000 JPY/month expenses:

```
POST https://www.japanlive.info/api/mcp
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "calc_yield",
    "arguments": {
      "purchase_price_jpy": 30000000,
      "monthly_rent_jpy": 150000,
      "monthly_expenses_jpy": 20000
    }
  }
}
```

Result: gross_yield_pct 6.00, net_yield_pct 5.20.

## Notes

- All tools are **pure functions** — no state, no auth, safe to call freely.
- Input unit is **raw JPY**. Never pass 万円 (万 = 10,000); multiply first.
- Rates reflect Japanese tax law as of 2026.
- For complex multi-year simulations, chain multiple calls.
