@insiderfinance/totalfinance-mcp
v0.1.9
Published
TotalFinance MCP server for AI agents. Read-only by default; explicit capabilities for paper-trading workflows.
Maintainers
Readme
@insiderfinance/totalfinance-mcp
TotalFinance MCP server: exposes the TotalFinance engine to AI agents via the Model Context Protocol. Read-only by default.
The TotalFinance calculations as tools for AI agents: option pricing and Greeks, strategies, volatility, technical indicators, portfolio P&L, risk, bonds and backtests. The server runs on your machine over stdio and is read-only by default. Your agent supplies the market inputs; every result carries its assumptions and diagnostics, and any warning (such as a volatility of 22 that was probably meant as 0.22) is repeated in the text the model reads.
Install
Requires Node 22.13 or later. There is nothing to install globally; check that it runs:
npx -y @insiderfinance/[email protected] doctorConnect your agent
The agents page has the same setups, plus one-click installs where a client supports them.
Claude Code
Run in your terminal:
claude mcp add totalfinance -- npx -y @insiderfinance/[email protected]Claude Desktop
Add to Settings → Developer → Edit Config (claude_desktop_config.json):
{
"mcpServers": {
"totalfinance": {
"command": "npx",
"args": [
"-y",
"@insiderfinance/[email protected]"
]
}
}
}Restart Claude Desktop to load the server.
Cursor
Add to your Cursor MCP settings (~/.cursor/mcp.json):
{
"mcpServers": {
"totalfinance": {
"command": "npx",
"args": [
"-y",
"@insiderfinance/[email protected]"
]
}
}
}VS Code
Add to your workspace root (.mcp.json):
{
"mcpServers": {
"totalfinance": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@insiderfinance/[email protected]"
],
"tools": [
"*"
]
}
}
}To use it in every workspace, put the same entry in ~/.copilot/mcp-config.json.
Codex
Run in your terminal:
codex mcp add totalfinance -- npx -y @insiderfinance/[email protected]Or add to your Codex config (~/.codex/config.toml):
[mcp_servers.totalfinance]
command = "npx"
args = ["-y", "@insiderfinance/[email protected]"]Choose the tools
Without options the server lists the 23 default tools. A profile picks a focused set; profiles never grant permissions:
| Profile | Tools |
| ------- | ----: |
| default | 23 |
| options | 9 |
| research | 4 |
| strategies | 11 |
| portfolio | 10 |
| valuation | 1 |
| backtesting | 8 |
| scenarios | 3 |
| full | 42 |
npx -y @insiderfinance/[email protected] --profile options
npx -y @insiderfinance/[email protected] doctor --profile fullSome clients limit how many tools they load at once, so prefer a focused profile to full. doctor reports the Node version check, the tools a configuration exposes and why any are excluded, the attached store and the input budgets. Tool lists and resource lists are paged: follow nextCursor.
Saved reports, background jobs and paper trading
These are off unless you turn them on:
--store /absolute/path/to/foldersaves large results as reports the agent can read back as resources.--store-read-onlyonly reads an existing folder.--jobs(with a writable--store) runs long calculations such as backtests in a background worker. The agent starts one withtotalfinance_job_submit, then checkstotalfinance_job_status, readstotalfinance_job_resultor stops it withtotalfinance_job_cancel.--capability <name>(repeatable) allows write tools.--capability trade:paperadds paper-trading tools, which simulate orders locally and never reach a broker. The capabilities you pass replace the defaults (portfolio:read,analytics:run,trade:propose), so list every one you need.
npx -y @insiderfinance/[email protected] --profile backtesting --store /absolute/path/to/folder --jobs
npx -y @insiderfinance/[email protected] --profile full --store /absolute/path/to/folder --capability portfolio:read --capability analytics:run --capability trade:propose --capability trade:paperThe MCP guide is the full reference: every tool, resource and prompt, the result envelope, errors, budgets and the job lifecycle.
Use it as a library
Embed the server or its tool definitions in your own host:
import { defaultTools } from '@insiderfinance/totalfinance-mcp';
const toolNames = defaultTools().map((t) => t.name); // the read-only compute toolsThis example runs in CI (docs/examples/readme-snippets.test.ts) — it cannot rot.
API
@insiderfinance/totalfinance-mcp exposes 24 runtime exports (28 including types). See the generated etc/mcp.api.md for the full surface.
License
Apache-2.0. Part of the TotalFinance monorepo. Analytics only — not investment advice.
