---
title: Claude Integration
description: One setup command turns Claude Desktop into your personal wealth analyst. It reads your portfolio, net worth, cash flow, market data, and stated goals, then ties every answer to that real picture instead of generic advice.
---

export const netWorthExchange = [{
  user: 'Am I on track to hit $1M net worth by end of year?',
  ai: <p>
    Your current net worth is <code>$441K</code>, growing at roughly{' '}
    <code>+$6,400/month</code> on average over the past year.
    At that pace you'd reach $1M in about <code>87 months</code>, around July
    2033, not by the end of this year. To hit it by December you'd need to save{' '}
    <code>+$46K/month</code>, nearly 7x your current rate.
  </p>,
}];

export const exposureExchange = [{
  user: 'TSLA earnings are next week. What do analysts expect, and how exposed am I?',
  ai: <p>
    TSLA reports on <code>Apr 30 AMC</code>. Consensus EPS estimate is <code>$0.43</code>.
    Last quarter they missed, reporting <code>$0.41</code>.
    You hold <code>392 shares</code> at avg cost <code>$245.68</code>, currently
    up <code>+60.97%</code>. TSLA is about <code>82%</code> of your total portfolio value.
    A 5% move would swing your portfolio by roughly <code>±$7,500</code>.
  </p>,
}];

export const visualizationExchange = [{
  user: 'Give me a full overview of my finances with charts.',
  ai: "I'll pull your portfolio, balance history, and cash flow data together. Here's an interactive dashboard with net worth trend, asset allocation, and monthly savings rate all in one view.",
  aiNote: <em>↳ Claude renders an interactive React artifact with charts. No code needed from you.</em>,
}];

export const loggingExchange = [{
  user: 'I just bought 10 shares of NVDA at $875. Log it.',
  ai: <p>
    Done. NVDA <code>10 shares @ $875.00</code> recorded for today.
    Your NVDA position is now <code>166 shares</code> at avg cost <code>$134.51</code>,
    up <code>+$121,618 (+548%)</code>.
    (<code>add_txn</code> called automatically.)
  </p>,
}];

export const promptGroups = [
  {
    label: 'Bulk import',
    rows: [
      { cmd: 'import-trades',  desc: 'Attach a CSV or brokerage export. Claude shows the column mapping, waits for your confirmation, then writes every row in one bulk call. It handles hundreds of rows at once.' },
      { cmd: 'import-balance', desc: 'Attach a net-worth spreadsheet, with rows as months and columns as balance categories. Same mapping-confirm-bulk flow, just stretched across multiple months.' },
      { cmd: 'import-flow',    desc: 'Attach an income/expense spreadsheet. Same flow as import-balance, but targeted at the cash-flow tables.' },
    ],
  },
  {
    label: 'Workflow',
    rows: [
      { cmd: 'month-end',     desc: 'Walks through every balance and cash flow category for the current period, then submits everything in one batch and shows the settlement summary.' },
      { cmd: 'morning',       desc: "Pulls today's brief and shows only what needs attention: concentration risk, upcoming earnings, macro signal changes, and the top mover." },
      { cmd: 'analyst',       desc: 'Activates a financial analyst mode. Claude starts with concentration risk, frames each number against net worth or runway, and folds portfolio, cash flow, and macro into one view.' },
      { cmd: 'setup-profile', desc: "Captures your goals (birth year, retirement target, target net worth, risk tolerance, notes) so future analysis has something real to anchor to. All five fields are optional, and Claude skips anything you don't want to share." },
    ],
  },
  {
    label: 'Decision support',
    rows: [
      { cmd: 'pre-mortem', desc: 'Five plausible ways a position could go wrong over the next 12 months. Each failure mode is tied to your actual data, with dollar impact and one concrete mitigation.' },
      { cmd: 'rebalance',  desc: 'Compares your current allocation against the target, flags drift, and suggests specific trades. It checks the original trade reasons, tax cost on sells, and wash-sale risk before making a recommendation.' },
      { cmd: 'tax-harvest',desc: 'Scans unrealized losses, applies the 30-day wash-sale rule, suggests similar but not identical replacements, and estimates tax savings by bracket.' },
      { cmd: 'scenario',   desc: <>Models a market shock (&quot;S&amp;P -20%&quot;), a single-ticker move, or a macro shift on your actual portfolio. It states the beta assumptions up front so you can override and rerun.</> },
    ],
  },
];

export const tips = [
  {
    icon: '▲',
    title: 'Ask for visualizations',
    desc: 'Claude Desktop can render React components as artifacts. Ask it to "show a chart of my net worth over time," and it will build an interactive visualization using your actual data.',
  },
  {
    icon: '↗',
    title: 'Combine data sources in one question',
    desc: <>Claude can call multiple tools in a single response. &ldquo;How does my savings rate correlate with my TSLA position?&rdquo; It will pull both cash flow and portfolio data to answer.</>,
  },
  {
    icon: '✎',
    title: 'Log trades conversationally',
    desc: <>You don't need the CLI to add trades. Just tell Claude and it calls <code>add_txn</code> directly. Handy when you're already in a Claude conversation.</>,
  },
];

export const toolReadPortfolio = [
  { cmd: 'show_portfolio',     desc: 'Holdings with P&L and average cost' },
  { cmd: 'show_txns',          desc: 'Transaction history, optionally filtered by ticker' },
  { cmd: 'show_dividend',      desc: 'Estimated annual dividend income + per-ticker yield' },
  { cmd: 'show_concentration', desc: 'HHI concentration by ticker, currency, sector, country — carries per-dimension derisk/rebalance recommendations' },
  { cmd: 'show_snapshot',      desc: 'Portfolio value history (per-ticker or daily total)' },
  { cmd: 'show_benchmark',     desc: 'Portfolio return vs SPY/QQQ (or custom benchmarks) over the same period' },
  { cmd: 'show_risk',          desc: 'Volatility, drawdown, Sharpe, Sortino, beta (requires snapshot history)' },
  { cmd: 'show_profile',       desc: 'User goals: birth year, retirement target, target net worth, risk tolerance, notes' },
  { cmd: 'set_profile',        desc: 'Update profile fields (partial: only provided fields change). All optional.' },
];

export const toolReadBalance = [
  { cmd: 'show_balance',    desc: 'Balance sheet entries (filterable by period)' },
  { cmd: 'show_flow',       desc: 'Cash flow entries (filterable by period)' },
  { cmd: 'report',          desc: 'Aggregated trends — pick target: balance, flow, combined, or settle (month-end summary)' },
];

export const toolReadMacro = [
  { cmd: 'get_brief',          desc: 'Daily brief: holdings + movers + news + earnings + macro + signals + auto-generated insights — plus a weekly stance, ranked moves (recommendations), and a freshness indicator (cached per day)' },
  { cmd: 'show_macro',         desc: 'Curated FRED macro snapshot (8 indicators + dynamic FX) plus Economic Stress Index and macro regime bias — carries the per-dimension tactical recommendation' },
  { cmd: 'fetch_fred_series',  desc: 'Raw FRED time series by ID (any of 800K+ series)' },
  { cmd: 'search_fred_series', desc: 'Search the FRED catalog by keyword' },
  { cmd: 'show_fx',            desc: 'Inspect the cached FX series — coverage summary, or per-currency historical rates' },
];

export const toolReadResearch = [
  { cmd: 'show_earnings',   desc: 'Upcoming earnings + EPS history' },
  { cmd: 'show_insider',    desc: 'Insider buy/sell transactions' },
  { cmd: 'show_financials', desc: 'SEC-reported quarterly financials' },
  { cmd: 'show_news',       desc: 'Recent company news articles' },
];

export const toolWrite = [
  { cmd: 'add_txn',         desc: 'Record transactions — one object or an array (for spreadsheet import); a stock in any of 9 markets, or a non-stock asset (crypto, commodity, real estate); type buy / sell / deposit / dividend / tax' },
  { cmd: 'edit_txn',        desc: 'Update fields of an existing transaction by id' },
  { cmd: 'delete_txn',      desc: 'Delete a transaction by id' },
  { cmd: 'add_price',       desc: 'Set the current value of a non-stock holding (crypto, commodity, real estate) — they have no price feed' },
  { cmd: 'add_balance',     desc: 'Upsert balance sheet entries — one object or an array across months (acts as edit when key matches)' },
  { cmd: 'add_flow',        desc: 'Upsert cash flow entries — one object or an array across months (acts as edit when key matches)' },
  { cmd: 'add_monthly',     desc: 'Batch upsert balance + flow entries for a single period' },
  { cmd: 'delete_balance',  desc: 'Delete balance entries for a period (or a single category)' },
  { cmd: 'delete_flow',     desc: 'Delete flow entries for a period (or a single category)' },
  { cmd: 'add_snapshot',    desc: "Sync prices and record today's portfolio snapshot" },
  { cmd: 'edit_snapshot',   desc: 'Edit fields of a snapshot entry' },
  { cmd: 'delete_snapshot', desc: 'Delete all snapshot entries for a date' },
];

export const toolActions = [
  { cmd: 'sync', desc: 'Sync data — pick scope: prices (Finnhub stock prices), fx (FRED FX rate cache backfill), or all' },
];

<Section label="What You Can Ask">
  <ChatDemo header="Net worth projection"                     exchanges={netWorthExchange}      marginBottom="1.5rem" />
  <ChatDemo header="Portfolio exposure + earnings research"   exchanges={exposureExchange}      marginBottom="1.5rem" />
  <ChatDemo header="AI visualization (Claude Desktop artifact)" exchanges={visualizationExchange} marginBottom="1.5rem" />
  <ChatDemo header="Natural language transaction logging"     exchanges={loggingExchange} />
</Section>

<Section label="Prompts">
Type <code>/</code> in Claude Desktop to access guided workflows. Firma
ships ten prompts that lock in the right sequence of tool calls so
you don't have to think about it.

  <CommandTable groups={promptGroups} />

  <Note>
    You don't need to remember the slash commands. Claude calls{' '}
    <code>setup_status</code> at the start of any conversation, and that
    response includes the same reasoning frameworks with trigger conditions,
    so Claude applies pre-mortem on a risky buy, harvest on year-end taxes,
    or scenario analysis on a macro question without you typing anything.
    The slash commands stay available when you want to invoke a framework explicitly.
  </Note>
</Section>

<Section label="How It Works">
MCP (Model Context Protocol) is an open standard for connecting AI models
to local tools and data sources. Firma ships a <code>firma-mcp</code> binary
that implements an MCP server. Running <code>firma mcp install</code> writes
it into Claude Desktop's config:

  <Terminal
    command="firma mcp install"
    rows={[
      { type: 'beat', text: 'MCP registered at ~/Library/Application Support/Claude/claude_desktop_config.json' },
      { type: 'meta', text: 'Restart Claude Desktop to activate the firma MCP server.' },
    ]}
    marginBottom="1.25rem"
  />

After restarting Claude Desktop, firma appears in the tools panel. Claude calls
firma tools automatically when you ask financial questions, so you do not need to invoke them manually.
</Section>

<Section label="Tips">
  <FeatureList items={tips} />
</Section>

<Section label="Available Tools">
  <CommandTable groups={[
    { label: 'Read: Portfolio',           rows: toolReadPortfolio },
    { label: 'Read: Balance & Cash Flow', rows: toolReadBalance },
    { label: 'Read: Macro & Brief',       rows: toolReadMacro },
    { label: 'Read: Research',            rows: toolReadResearch },
    { label: 'Write',                     rows: toolWrite },
    { label: 'Actions',                   rows: toolActions },
  ]} />
</Section>
