Agent Financial Advisor
v0.1.0Compliance, risk, tax and audit checks for AI trading agents: pre-trade, sizing, wash sales, Reg BI.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
rules_digest Current trading rules digest
Free. The current US trading, margin, settlement and tax rules an agent must follow, with effective dates and sources. Includes changes your training data may predate, such as the June 2026 replacement of the Pattern Day Trader rule. Price: free.
| Parameter | Type | Description |
|---|---|---|
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
topic | string |
pre_trade_check Pre-trade compliance and risk check
Run an order past a compliance officer and risk manager before sending it to the broker. Checks buying power, cash-account settlement violations, FINRA intraday margin (post-PDT) or legacy PDT limits, Reg SHO short-sale rules, wash-sale exposure, position concentration, per-trade risk versus stop, liquidity, spread, fat-finger prices, leverage and market hours. Returns approve / approve_with_warnings / reject with reasons and a resized quantity when useful. Price: $0.005.
| Parameter | Type | Description |
|---|---|---|
account * | object | Account state before the order. |
order * | object | |
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
market | object | |
policy | object | Override risk limits. Defaults: {"max_position_pct":0.2,"max_order_risk_pct":0.02,"max_adv_pct":0.05,"max_spread_pct":0.01,"max_gross_leverage":2,"max_limit_deviation_pct":0.1,"allow_short":true,"allo… |
position_size Position sizing
Size a position the way a risk manager would: fixed-fractional risk to a stop, volatility targeting (ATR or annualized vol), or fractional Kelly from your edge statistics. Applies a max-position cap and round lots, and explains the binding constraint. Price: $0.005.
| Parameter | Type | Description |
|---|---|---|
entry_price * | number | |
equity * | number | |
method * | fixed_fractional needs stop_price; volatility needs atr or annual_vol; kelly needs win_rate, avg_win and avg_loss. | |
allow_fractional | boolean | |
annual_vol | number | volatility: annualized volatility of the asset (e.g. 0.35). |
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
atr | number | volatility: average true range in price units. |
atr_multiple | number | volatility: stop distance in ATRs, default 2. |
avg_loss | number | kelly: average loss as a positive number. |
avg_win | number | kelly: average win (any unit, same as avg_loss). |
kelly_fraction | number | kelly: fraction of full Kelly to use, default 0.25. |
lot_size | integer | Round down to this multiple, default 1. |
max_position_pct | number | Cap on position value / equity, default 0.2. |
risk_pct | number | fixed_fractional: fraction of equity to risk, default 0.01. |
side | ||
stop_price | number | fixed_fractional: the protective stop price. Without it the answer is only the position-cap maximum (risk_sized: false). |
target_annual_vol_contribution | number | volatility: target vol contribution as fraction of equity, default 0.02. |
win_rate | number | kelly: probability of a win (0-1). |
tax_lot_plan Tax lot selection and wash-sale check
Act as the tax advisor for a sale: compares FIFO, LIFO, HIFO and minimum-tax lot selection, splits short- and long-term gains, estimates tax, flags wash sales, and notes lots about to turn long-term. With mode=harvest it scans positions for tax-loss harvesting. Price: $0.02.
| Parameter | Type | Description |
|---|---|---|
lots * | array | |
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
as_of | string | mode=harvest: date, default today |
min_harvest_loss | number | mode=harvest: ignore losses smaller than this (USD), default 100. |
mode | ||
prices | object | mode=harvest: {SYMBOL: current price} |
recent_transactions | array | |
sell | object | mode=sell |
symbol | string | |
tax_rates | object |
portfolio_review Portfolio review
A periodic advisor review of a portfolio: weights, concentration (HHI and effective number of holdings), sector and asset-class exposure, drift from targets with the trades to rebalance, and, given return history, volatility, Sharpe, Sortino, drawdown, VaR/CVaR and beta. Ends with prioritized findings. Price: $0.05.
| Parameter | Type | Description |
|---|---|---|
holdings * | array | |
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
benchmark_returns | array | |
cash | number | |
limits | object | |
periods_per_year | number | |
rebalance_band | number | Absolute drift that triggers a rebalance, default 0.05. |
returns | array | Periodic portfolio returns as decimals. |
risk_free_rate | number | |
targets | object | Target weights by symbol or asset_class, summing to 1. |
strategy_audit Strategy audit and overfitting check
An independent performance auditor for a trading strategy or backtest. From a trade list and/or periodic returns it computes win rate, expectancy, profit factor, streaks, Sharpe/Sortino/drawdown, and tests whether the edge is real: t-stat, Probabilistic Sharpe Ratio and the Deflated Sharpe Ratio that corrects for how many variants you tried. Returns a verdict and red flags. Price: $0.1.
| Parameter | Type | Description |
|---|---|---|
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
avg_trial_correlation | number | Average pairwise correlation (0 to 1) between the returns of the variants you tested. Near-duplicate variants (a 20-day vs. 21-day lookback) are not independent trials; with this the audit deflates by… |
n_trials | integer | How many strategy/parameter variants were tested before picking this one. Default 1. |
periods_per_year | number | |
returns | array | Periodic strategy returns as decimals. |
starting_equity | number | For risk-of-ruin and drawdown in dollars from trades. |
trades | array | Closed trades. |
trial_sharpe_variance | number | Variance of per-period Sharpe across trials, if known. |
suitability_check Best-interest suitability review
The compliance review a robo-advisor or advisory agent should run before recommending a portfolio to a person: compares the proposal with the client's age, horizon, risk tolerance, liquidity needs and experience under Reg BI / fiduciary standards, flags complex products, and returns a timestamped, hashed suitability memo for the audit file. Price: $0.03.
| Parameter | Type | Description |
|---|---|---|
allocation * | object | Weights by asset class: equity, bonds, cash, alternatives, crypto... summing to 1. |
client * | object | |
annual_fee_pct | number | All-in annual cost (advisory + fund expenses). |
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
max_single_position_pct | number | |
products | array | Complex products included. |
options_risk_check Options risk and margin check
Check an options book (existing or proposed legs) the way a broker's options desk would: covered, cash-secured, spread or naked; margin requirement under FINRA Rule 4210; cash-account limits; required approval level; early-assignment risk around ex-dividend dates; pin risk; auto-exercise of expiring in-the-money longs and the capital it needs; max loss; and net Greeks. Returns approve / approve_with_warnings / reject with reasons. Price: $0.01.
| Parameter | Type | Description |
|---|---|---|
account * | object | |
legs * | array | |
underlying * | object | |
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
as_of | string | Date of the check (YYYY-MM-DD); defaults to today in New York. |
policy | object | Overrides: pin_band_pct, max_requirement_pct_of_equity, max_delta_dollars_pct_of_equity, assignment_dte, low_extrinsic. |
advisor_memo Advisor memo (written by Claude)
Send a planned trade, options position or portfolio and get a written decision memo: proceed, proceed with changes, or do not proceed, with the risks, the exact changes to make, the rules that apply and a dated note for your audit file. Runs pre_trade_check, position_size, tax_lot_plan, options_risk_check and portfolio_review on whichever sections you send, then Claude writes the memo; it never overrides a failed check. Paid only (credits or x402), except that each API key's first memo is free; the daily free calls and the anonymous trial don't cover it. Price: $0.1, paid only.
| Parameter | Type | Description |
|---|---|---|
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |
context | string | Optional: your plan and thesis in plain words (up to 2000 characters). |
options | object | An options_risk_check request. |
portfolio | object | A portfolio_review request. |
sizing | object | A position_size request. |
tax_lots | object | A tax_lot_plan request, for a planned sale. |
trade | object | A pre_trade_check request: {account, order, market?, policy?}. |
get_api_key Get a free API key
Free. Creates an API key for this agent (25 free calls a day, then prepaid credits) and attaches it to this MCP session, so the next calls use it automatically. Call this when the anonymous trial runs out. Save the key and add ?key=<key> to the MCP URL (or send Authorization: Bearer <key>) to keep using it in later sessions.
| Parameter | Type | Description |
|---|---|---|
label | string | Optional name for the key, such as your agent's name. |
my_account Check this agent's key
Free. Shows the API key's free calls left today and when they reset, prepaid credit balance, whether its one free advisor_memo is still available, and how to add credits.
| Parameter | Type | Description |
|---|---|---|
api_key | string | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. |