Connect an AI agent
Give Claude, Cursor, VS Code, Codex, ChatGPT or any MCP client real financial calculations and the real API, in one step.
Language models are unreliable at arithmetic and guess at APIs they have not read. TotalFinance gives your agent both missing pieces: a calculator it can call, with the units, assumptions and diagnostics of every answer, and these docs as tools, so the code it writes uses functions that exist. Both speak the Model Context Protocol (MCP).
Connect in one step
Pick what to connect and your client, then copy one command or one config block.
The TotalFinance MCP server runs the library on your machine: pricing, Greeks, strategies, volatility, technical analysis, risk, bonds and more, read-only by default.
Not on npm yet. Build the server once from a source checkout, then point your client at distribution/mcp/dist/bin.js as below. When the package is published, this becomes a one-line npx command.
git clone https://github.com/InsiderFinance/totalfinance.git
cd totalfinance
pnpm install --frozen-lockfile
pnpm build
node distribution/mcp/dist/bin.js doctorclaude mcp add totalfinance -- node /absolute/path/to/totalfinance/distribution/mcp/dist/bin.jsCalculations run on your machine, so your positions, prices and data never leave it. The calculation server is read-only by default and never fetches quotes or places orders. The docs server is hosted: nothing to install, and it only reads these pages.
What your agent can do
Calculate
Option prices and Greeks, implied volatility, strategy payoffs, expected moves, volatility surfaces, technical indicators, dealer exposures, VaR, performance, bonds, calendars and crypto basis, each with its assumptions.
Read the real API
search_docs, read_page, get_reference and list_calculators: the agent looks up exact signatures, units and defaults before it writes code.
Load whole domains
llms.txt, per-domain bundles sized for a context window, and a Markdown version of every page.
Drive the calculators
In a browser with WebMCP, each calculator on these docs registers itself as a tool.
The calculation server registers 23 read-only tools by default, out of 48 operations. Every calculator on these docs also has an Ask your AI agent panel with a prompt built from your inputs.
Try these prompts
- “Price a 3-month 105 call on a 100 stock at 20% volatility and a 4% rate, then show the Greeks and the assumptions.”
- “Analyze an iron condor on a 100 stock: long 90 put, short 95 put, short 105 call, long 110 call. What are the breakevens and the maximum loss?”
- “Fit an SVI smile to these implied volatilities by strike and check it for arbitrage: …”
- “Here is my daily OHLCV CSV. Compute 14-day RSI and 20-day Bollinger Bands and tell me how many warm-up bars have no value.”
- “Search the TotalFinance docs for value at risk, then write TypeScript that computes 99% historical VaR and expected shortfall from my returns.”
Choose more tools with a profile
Profiles add task-specific tools to the calculation server. Add --profile <name> to the server
command, for example --profile backtesting for backtests or --profile portfolio for ledgers and
P&L explanation:
| Profile | Packs | Registered operations |
|---|---|---|
| default | options, technical_analysis, strategy, volatility, structure, risk, performance, calendar, crypto, fixed_income | 23 |
| options | options, volatility | 9 |
| research | research | 4 |
| strategies | options, strategy, volatility | 11 |
| portfolio | portfolio, risk, performance, artifact | 10 |
| valuation | valuation | 1 |
| backtesting | backtest, performance, artifact | 8 |
| scenarios | scenario, artifact | 3 |
| full | options, technical_analysis, strategy, volatility, structure, risk, performance, calendar, crypto, fixed_income, portfolio, scenario, research, artifact, valuation, backtest, trade | 48 |
Counts are registered operations before permission filtering. A profile never grants write authority.
A profile never grants write authority. The optional paper-trading tools need explicit capabilities, and no live brokerage connection exists. The agent handbook explains permissions, datasets, errors and long-running jobs.
Bring the data
Compute tools calculate on the numbers you or your agent supply; they never fetch quotes, chains or account history. For options flow, dark pool prints and market data, use InsiderFinance.
Go deeper
- Agent handbook: permissions, handles, errors, paper trading and jobs.
- MCP server reference: every flag, profile, budget and the worker-backed job path.
- Operation catalog: every tool with its schema, profile and cost class.