How it works
Every asset goes in.
One clear picture comes out.
Most portfolios look diversified on the app screen: twelve tickers, a few colors. X-Ray reads the actual holdings, prices them over the last six months and shows how the account really behaves. Then it plans the fix.
Reads the holdings
Claude or Cursor reads the positions from your broker, or you paste them in the dashboard.
Scores the risk
Position and sector weights, crypto share, correlations, beta, worst drop. One score from 0 to 100.
Runs the fix
The rebalance orders go through Brakeline, so every single one is risk-checked before the broker.
Read-only by design
X-Ray never sends an order. It analyses and plans; execution is a separate, guarded step.
Every finding has numbers
"PLTR is 26% of the account. A 30% drop in PLTR alone costs 7.8% of everything."
Plans that respect your caps
The rebalance never pushes another position or sector over a limit to fix the first one.
What it checks
Eight things the app screen doesn't show.
Defaults follow common diversification rules. Move any limit with a slider in the dashboard and the plan updates live.
position_sizeNo single stock or coin above 15% of the account.
sector_exposureFive tech names are one bet on tech. Sectors are capped as a whole.
crypto_shareBTC, ETH, SOL and crypto stocks can fall 50% in weeks. Kept in proportion.
moves_togetherHoldings with daily correlation of 0.7 or more are grouped and weighed as one.
effective_positionsTwelve tickers, weighted unevenly, can behave like three. X-Ray shows the real number.
betaHow hard the account falls when the market falls.
worst_dropThe deepest fall today's holdings went through over the window.
cash_bufferDry powder for a dip, so you never have to sell to buy.
A real X-Ray
A typical retail account, x-rayed.
Twelve positions, real Yahoo Finance prices, six months of history. Run it yourself: it's the demo account in the dashboard.
- Tech72%
- Biggest positionPLTR 26%
- Beta vs S&P 5002.11
- Volatility37% vs 14%
- Worst drop, 6 mo−20.7%
› X-Ray my portfolio and fix it. xray_report HIGH PLTR is 26.0% of the account HIGH 72.3% in Tech: PLTR, AMD, AAPL, NVDA, META MED AMD is 19.3% of the account MED Beta 2.11: market −10% → account ≈ −21% rebalance_plan SELL 194 PLTR · 37 AMD · 47 NVDA · 24 AAPL · 6 META BUY 61 VTI · 314 BND · 62 GLD risk 63 → 16 · placing each order through Brakeline…
Better together
X-Ray finds it.
Brakeline guards it.
Brakeline is the risk proxy between your agent and your broker: loss limits, size caps, revenge-trade blocks and a kill switch. X-Ray plans the rebalance; Brakeline makes sure every order of it is safe to send.
Plan, then approve
The agent shows you the orders and the score before and after. Nothing moves until you say so.
Checked order by order
Each trade passes Brakeline's daily loss limit, position cap and kill switch before it reaches the broker.
Practice in simulation
Apply the plan to the simulated portfolio first and watch the score drop, with zero real orders.
Developers
One MCP server. Six tools.
Node 20 or newer. Nothing to clone: npm fetches Ballast when your AI app starts it. Runs locally, so your holdings never leave your computer.
Claude Code
claude mcp add ballast -- npx -y ballast-mcp
# and the guard that executes the plan
claude mcp add brakeline -- npx -y brakelineClaude Desktop / Cursor
// mcpServers in the config file
"ballast": {
"command": "npx",
"args": ["-y", "ballast-mcp"]
}Dashboard
npx ballast-mcp dashboard
# then open localhost:6100/appAsk your agent
"X-Ray my portfolio, propose a rebalance
and run it through Brakeline after I approve."Tools: xray_reportget_correlationrebalance_planapply_rebalance_simulatedget_portfolioset_portfolio · npm · GitHub
See what your portfolio
is really made of.
Start with the demo account, then paste your own holdings.
Open X-Ray