# US 401k & IRA Optimizer MCP

> US 401k & IRA Optimizer helps you plan for retirement wealth by finding the best tax-advantaged order of contributions. This MCP analyzes your current and projected marginal tax rates against accounts like 401k, HSA, and IRA to maximize your financial shield. It quantifies potential tax savings and projects long-term portfolio growth based on a strategic funding sequence.

## Overview
- **Category:** finance
- **Price:** Free
- **Tags:** 401k, ira, tax-strategy, retirement-planning, hsa, wealth-management

## Description

Figuring out the best way to fund retirement accounts can feel impossible because every decision—from which account you hit first to how much you contribute—affects your taxes years down the line. This MCP gives you specialized insight into tax arbitrage strategies. It analyzes your current income against projected future rates, telling you the most efficient order for funding accounts like 401k and HSA. You can calculate exactly how much tax money you save by following a specific plan or project what your total portfolio balance will look like over decades. Because this is so complex, Vinkius hosts it as an MCP, letting your AI client connect directly to the engine without needing complicated setups.

## Tools

### determine_optimal_sequence
Figures out the best order you should fund your retirement accounts for maximum tax efficiency.

### calculate_tax_savings
Quantifies how much money in taxes you'll save annually and over time using specific contributions.

### project_wealth_growth
Forecasts the total value of your retirement portfolio decades into the future based on your contribution plan.

## Prompt Examples

**Prompt:** 
```
I have a 24% current tax rate and expect 15% in retirement. I have an employer match and am HSA eligible. What should my contribution order be?
```

**Response:** 
```
Your optimal contribution sequence is: Employer Match, HSA, then Traditional 401k/IRA.
```

**Prompt:** 
```
How much tax will I save if I contribute $10,000 to a pre-tax account and I have 20 years until retirement?
```

**Response:** 
```
Based on your current income and the proposed strategy, you will achieve an annual tax avoidance of $2,400.
```

**Prompt:** 
```
Project my wealth if I invest $15,000 annually for 30 years at a 7% return, split between 401k and IRA.
```

**Response:** 
```
Your projected total portfolio value after 30 years is $1,465,238.45, with specific balances distributed across your allocated accounts.
```

## Capabilities

### Determine Optimal Funding Sequence
The tool calculates and recommends the most efficient order for contributing funds across multiple retirement accounts.

### Calculate Tax Shield Value
It provides estimated annual and cumulative tax savings based on your planned contributions.

### Project Future Portfolio Balance
The engine forecasts your long-term retirement assets using your proposed contribution plan and assumed returns.

## Use Cases

### Pre-Year-End Contribution Planning
A user needs to know if they should funnel money into their traditional 401k or their IRA first before the deadline. They run determine_optimal_sequence, and it tells them that due to their specific income bracket, tackling the HSA first provides a better tax benefit.

### Evaluating New Income Streams
A professional starts freelancing and needs to know how much of their new income can be sheltered from taxes. They use calculate_tax_savings with their projected annual earnings, getting an immediate estimate of tax avoidance.

### Goal Setting for Early Retirement
A couple wants to retire in 20 years and need a target number. They run project_wealth_growth using their current savings rate and desired retirement income, giving them the required annual contribution figure.

## Benefits

- Stop leaving money on the table. Use calculate_tax_savings to see exactly how much tax avoidance you get for every dollar contributed.
- Know the precise order to fund your accounts. determine_optimal_sequence tells you if you should prioritize an HSA contribution over a 401k match.
- Gain clarity on long-term wealth. project_wealth_growth gives you a clear number, showing what your portfolio could actually be in 30 years.
- Simplify complex tax law. Instead of reading dense IRS documents, you run the numbers through this MCP and get an immediate action plan.
- Handle multiple accounts simultaneously. It models contributions across 401k, IRA, HSA, and more, all in one place.

## How It Works

The bottom line is you stop guessing about your retirement money and start planning based on proven tax strategy.

1. Provide the MCP with your current tax rate, expected future tax rates in retirement, and all applicable accounts (e.g., 401k, HSA, IRA).
2. The system runs simulations to determine which account order provides the greatest immediate and long-term tax advantage.
3. You get back a prioritized action plan—the optimal contribution sequence—along with projected dollar values for savings and total wealth growth.

## Frequently Asked Questions

**What should I use determine_optimal_sequence for?**
You use determine_optimal_sequence when you need to know the most tax-efficient order of operations. It weighs your current and projected tax brackets against all available accounts like 401k, HSA, and IRA.

**How do I estimate my total savings with calculate_tax_savings?**
You use calculate_tax_savings to quantify the dollar value of your tax shield benefits. It gives you a solid number for annual or cumulative tax avoidance based on your plan.

**Can I project my future wealth using project_wealth_growth?**
Yes, that's what project_wealth_growth does. You input your contribution amount and timeframe, and it forecasts the total size of your portfolio after decades.

**Is determine_optimal_sequence better than using a financial advisor?**
It’s a powerful tool for immediate analysis. It models tax law mechanics instantly, giving you data to take to an advisor or use as a starting point yourself.

**What specific inputs are required for `calculate_tax_savings` to run an accurate model?**
You must provide your current marginal tax rate, expected contribution amounts, and the account type (e.g., pre-tax vs. Roth). The MCP uses these variables to calculate the true tax shield benefit across different years.

**If my income changes yearly, can `determine_optimal_sequence` handle fluctuating tax brackets?**
Yes, you don't have to assume a flat rate. You input projected tax scenarios for each year or decade. This allows the tool to build an optimal contribution sequence that adapts to anticipated changes.

**Is the optimization strategy provided by `determine_optimal_sequence` limited only to US-based retirement accounts?**
This MCP is specialized for U.S. tax code, covering standard vehicles like 401k, IRA, and HSA. It cannot model international or foreign pension structures.

**What are the recommended time limits when running `project_wealth_growth`?**
The tool works best projecting wealth over typical retirement timelines, usually 20 to 50 years. Keep inputs focused within this range for the most reliable forecast.

**How does the optimizer decide which account to fund first?**
The engine follows a strict hierarchy: it always prioritizes Employer Match first, followed by HSA eligibility. Then, it uses `determine_optimal_sequence` to compare your current and future tax rates to decide between Traditional or Roth vehicles.

**Can I use this for HSA planning?**
Yes. The tool checks your `hasHsaEligibility` and prioritizes HSA contributions due to their triple tax advantage.

**What inputs do I need for wealth projection?**
For `project_wealth_growth`, you will need your annual contribution amount, years until retirement, expected return rate, and a breakdown of how much to allocate to each account.