OpenChainGraph Suite · OCG v0.8.0 · US Mortgage Agency and Government Loan Pricing · Cluster ㉕

Mortgage Government Loan Fit

Note (dated 2026-08-04): a chain composes independent computations performed in an analytical order. No step's output is carried into the next step by the execution model; each step computes from its own declared inputs. This is true of every chain on this site, including chains whose per-step copy below reads as a data handoff.
Reading mode (RUNBOOK): Run these steps in order. Which calculation runs next, VA funding fee or FHA MIP, is decided by the loan program the first step surfaces, so the order above is a real routing decision.

Gated government loan program router. Step 1 classifies the conforming loan limit and surfaces the target program (VA, FHA, Conventional) into the output payload. A §21.4 fork gate then routes VA loans to the VA funding fee and residual income calculator (statutory table 38 USC §3729 + VA Pamphlet 26-7 Ch.4 residual income by region/family size). All other programs route to the FHA MIP eligibility and cost calculator (HUD Handbook 4000.1 UFMIP 1.75% + annual MIP grid from ML 2023-05). Both branches are reachable; the gate is a total function with mandatory default.

OpenChainGraph · Fork Gate compliance mandate · §21.4 Gate VA Branch · 38 USC §3729 FHA Branch · HUD 4000.1 Hash-Anchored §4 Client-Side · Zero PII
Not legal or compliance advice. Outputs are computed from version-pinned VA, FHA, and FHFA public tables and your inputs only. Consult qualified counsel before relying on any result for loan underwriting or program eligibility decisions.
⚡ §21.4 Fork Gate at Step 1: loan_program == "VA" routes to VA Funding Fee and Residual Income; all other programs (FHA, Conventional, USDA) route to FHA MIP Eligibility. Total function with mandatory default. Both branches are terminal stages.
Chain Topology (§21.4 fork) — CLL + Program Check → GATE: VA path or FHA/default path
§4 Execution Hash · Chain Definition Anchor
execution_hash:computing…
Chain Stages · Fork at Step 1 · 1 Decision Gate (§21.4) · 2 Branches
1 ROOT + FORK node §21.4 gate
Conforming Loan Limit Check art-223-conforming-loan-limit
Classifies conforming/super-conforming/jumbo status and surfaces loan_program (VA / FHA / Conventional / USDA) from input into the output payload. The §21.4 gate reads /loan_program to route: VA to the VA benefit calculator, all others to FHA MIP calculation.
△ Fork Gate: if /loan_program == "VA" → Branch A (VA)  |  else (default) → Branch B (FHA/other)
MCP Call · check_conforming_loan_limit
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "check_conforming_loan_limit",
    "arguments": {
      "loan_amount": 420000,
      "units": 1,
      "state": "TX",
      "loan_program": "VA"
    }
  },
  "id": 1
}
⇃  fork
A BRANCH A · VA node VA path
VA Funding Fee and Residual Income art-225-va-funding-fee-residual
Computes VA funding fee per 38 USC §3729 (first/subsequent use, down-payment tier table) and residual income per VA Pamphlet 26-7 Ch.4 Table 41A (region by family size). Handles disability exemption, IRRRL flat rate (0.50%), and 41% DTI residual review trigger.
MCP Call · compute_va_funding_fee_residual
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "compute_va_funding_fee_residual",
    "arguments": {
      "base_loan_amount": 420000,
      "down_payment_pct": 5.0,
      "loan_purpose": "purchase",
      "va_use_type": "first",
      "funding_fee_exempt": false,
      "family_size": 3,
      "state": "TX",
      "dti_pct": 38.0,
      "gross_monthly_income": 8500,
      "monthly_shelter_expenses": 2200
    }
  },
  "id": 2
}
B BRANCH B · FHA / Default node FHA path
FHA MIP Eligibility art-224-fha-mip-eligibility
Computes FHA mortgage insurance premium eligibility and cost per HUD Handbook 4000.1. UFMIP: 1.75% of base loan amount. Annual MIP grid by loan size vs $726,200 threshold, LTV, and term (ML 2023-05). MIP duration: 11 years if LTV at or below 90%; life-of-loan if above. Applies 31%/43% qualifying ratios and minimum FICO by LTV tier.
MCP Call · compute_fha_mip_eligibility
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "compute_fha_mip_eligibility",
    "arguments": {
      "base_loan_amount": 420000,
      "ltv_pct": 96.5,
      "term_years": 30,
      "fico_score": 640,
      "front_end_dti_pct": 28.5,
      "back_end_dti_pct": 41.0,
      "loan_purpose": "purchase"
    }
  },
  "id": 2
}
Export Chain Artifact
Download the §4 chain definition artifact (hash-anchored JSON). Encodes the complete chain definition including fork gate rules and both branch terminal nodes. Available after hash computation.

Ask your agent

Copy this paragraph into Claude, OpenClaw, or any MCP-aware agent to run this whole workflow on the server and check one field that answers a real question.

Question: For this VA purchase, does the borrower still meet the residual income test if gross income falls to 2000?
Run the AINumbers MCP tool `run_chain` with {"chain":"mortgage-government-loan-fit"} and read `art-225-va-funding-fee-residual.residual_income.meets_requirement`.
Re-run with `inputs` for `art-225-va-funding-fee-residual`, reusing the values that result echoed, with `gross_monthly_income` changed so gross monthly income drops to 2000. Compare the same field.
Verify: call `verify_execution_hash` (https://mcp.ainumbers.co/mcp) with `claimed_hash` set to `composite_execution_hash` and the full `composite_artifact`.
Ledger, for a human re-check: https://ledger.ainumbers.co/
PII rule: send synthetic or anonymised inputs only. The MCP server runs these kernels and logs no payloads.
Chain page: https://ainumbers.co/chaingraph/chains/mortgage-government-loan-fit.html