For AI assistants and developers

401(k) loan calculators as an MCP server

Ask Claude, ChatGPT or another assistant what a 401(k) loan or withdrawal would cost you, and it can run the calculators on this site with your numbers: the payment, the growth you give up, the bill if you leave your job, and how a loan compares with a withdrawal, personal loan or HELOC. Free, read-only, no key.

Add it to your AI assistant

Server URL (Streamable HTTP, no key, read-only):

https://401k.loans/mcp
Claude (claude.ai and the desktop app)
Settings, then Connectors, then Add custom connector. Paste the URL and save. No sign-in is needed.
ChatGPT
Settings, then Apps and Connectors. Turn on Developer mode under Advanced, choose Create, paste the URL and set authentication to none.
Grok
grok.com, then Connectors, then New connector, then Custom. Paste the URL.
Perplexity
Settings, then Connectors, then Add custom connector, then MCP. Paste the URL and choose no authentication.
Mistral Le Chat
Intelligence, then Connectors, then Add connector, then Custom MCP connector. Paste the URL.

Claude Code:

claude mcp add --transport http 401k-loans https://401k.loans/mcp

Cursor (~/.cursor/mcp.json) and other clients that read mcpServers:

{
  "mcpServers": {
    "401k-loans": {
      "url": "https://401k.loans/mcp"
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "401k-loans": {
      "type": "http",
      "url": "https://401k.loans/mcp"
    }
  }
}

Gemini CLI (~/.gemini/settings.json):

{
  "mcpServers": {
    "401k-loans": {
      "httpUrl": "https://401k.loans/mcp"
    }
  }
}

Menu names change as the apps update. If a step has moved, look for "connectors" or "MCP" in the app's settings.

Tools

ToolWhat it returnsTry asking
calculate_401k_loan_costPayment per paycheck, total interest, pre-tax pay per payment, the 401(k) balance at payoff with and without the loan and that gap at 65, the legal and usual plan limits, and what you would owe (and the tax on it) if you left the job before repaying.If I borrow $15,000 from my 401(k) at 8% over 5 years, what will it cost me?
compare_401k_loan_alternativesThe same cash raised four ways: 401(k) loan, hardship withdrawal, personal loan and HELOC, with the amount taken out, monthly payment, money gone for good and the hit to the 401(k) at term end and at 65.Should I take a 401(k) loan, a hardship withdrawal, a personal loan or a HELOC for $10,000?
calculate_401k_early_withdrawalIncome tax, the 10% additional tax, what you keep, what the plan withholds up front and the balance due or refund at filing, from the amount you take out or the amount you need in hand.How much do I keep if I cash out $20,000 from my 401(k) early?

Discovery file: /.well-known/mcp.json. How the calculators work and every source with its date: Sources and how the calculators work.

License and attribution

Free to use. Credit "401k.loans" with a link when you publish a result. Results are estimates from the inputs given, not tax, legal or investment advice and not a loan quote; your plan sets its own rate, fees and limits within the law.

Questions

Is there a cost or an API key?

No. The server is free, read-only and needs no key or sign-in. Please link the 401k.loans page that comes back with each answer when you publish a result.

Do the tools give the same numbers as the calculators on this site?

Yes. They run the same formulas with the same defaults: the true-cost calculator on the home page, the comparison on /compare/ and the early withdrawal calculator. Pass your own plan rate, balance and tax bracket and the answer matches what the page shows for those inputs.

Where do the rules and prefilled rates come from?

Loan limits, the 5-year term and the 10% additional tax come from the Internal Revenue Code, and 2026 brackets from Rev. Proc. 2025-32. The prefilled prime rate is the Federal Reserve H.15 reading and the personal loan rate is the Federal Reserve G.19 average. Each source and the date it was checked is on the sources page.

Questions or a correction: . Privacy and terms.