MCP Hub
Back to servers

firma

Validation Failed

Local-first portfolio tracker for overseas investors. Claude reads and writes your finances via MCP.

Registryglama
Stars
2
Forks
1
Updated
Apr 26, 2026
Validated
Apr 27, 2026

Validation Error:

Process exited with code 1. stderr: npm error could not determine executable to run npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2026-04-27T03_03_59_033Z-debug-0.log

Quick Install

npx -y firma-app

firma

firma

You earned well this year.
Do you know where it went?

Just ask Claude.
A local-first, AI-native CLI for overseas stock investors.

npm version License: MIT Node >= 22 TypeScript firma MCP server MCP-ready

npm install -g firma-app


Track your portfolio, log trades, and analyze monthly cash flow — all from your terminal, all stored on your machine. Drop-in MCP integration means Claude reads, writes, and reasons about your finances directly. No vendor lock-in. No cloud sync. No financial data leaving your laptop.


In conversation with Claude

firma CLI demo

You:     How is my portfolio doing?
Claude:  Total market value is $147,509, up +$55,870 (+60.9%) from cost basis.
         TSLA (392 shares) is driving most of the gain.

You:     Spending feels high this month. How does it compare to last year?
Claude:  March 2026 expenses were $3,050 — up 18% vs. March 2025.
         Savings rate dropped from 41% to 34%.

You:     I just bought 15 shares of AAPL at $211. Log it.
Claude:  Done — AAPL 15 shares @ $211.00 recorded for 2026-04-25.

You:     Give me a full overview of my finances with charts.
Claude:  [renders live portfolio dashboard — holdings, net worth trend, asset mix, cash flow]

Claude rendering a live portfolio dashboard


Why firma

  • Local-first by design. Your transactions, balances, and cash flow live in ~/.firma/firma.db — a single SQLite file. Nothing syncs anywhere unless you ask it to.
  • MCP-native. Every CLI command has a matching MCP tool, so Claude can do everything you can — analyze, log, reconcile — through natural conversation.
  • Built for overseas investors. Multi-currency support (USD, KRW, EUR, JPY, and more), fxratesapi auto-conversion, and Finnhub-powered prices for U.S. equities.
  • Transactions as source of truth. No holdings table to drift out of sync — your portfolio is always derived from your trade log. Buy/sell/deposit/dividend/tax all supported.
  • Developer-first UX. --json output on every read command, scriptable, pipe-friendly. Three clean verb groups: add, show, report.

Get started

# 1. Install
npm install -g firma-app

# 2. Set your Finnhub key (free at finnhub.io)
firma config set finnhub-key YOUR_KEY

# 3. Connect Claude Desktop
firma mcp install
# Restart Claude Desktop — that's it.

# 4. Add your first trade and sync prices
firma add txn
firma sync

Already have data? Skip to firma show portfolio and let Claude take it from there.


Privacy

All financial data is stored in ~/.firma/firma.db — a local SQLite file only you can access. Nothing is sent to Firma servers.

  • Prices → Finnhub, called directly with your own API key
  • Exchange rates → open.er-api.com (no auth required)
  • Claude reads data → local process-to-process via MCP protocol

Your numbers never leave your machine.


CLI reference

Three verb groups: add (input), show (read, --json everywhere), report (aggregated, --json everywhere).

CommandWhat it does
firma add txnRecord a transaction (buy / sell / deposit / dividend / tax)
firma add balance [-p YYYY-MM]Monthly asset & liability snapshot
firma add flow [-p YYYY-MM]Monthly income & expense entry
firma add monthly [-p YYYY-MM]Balance + flow in one flow (month-end)
firma show portfolioHoldings overview with P&L (auto-syncs prices)
firma show txns [ticker]Transaction history with running avg cost
firma show balance / flow [-p YYYY-MM]Stored entries for a period
firma show news / insider / financials / earnings <ticker>Finnhub data
firma reportNet worth trend + cash flow charts
firma report balance / flow / settleTargeted views
firma report -c USDDisplay in USD, EUR, JPY, CNY, or GBP
firma edit txn [id]Edit a transaction
firma edit balance / flow [period]Edit a monthly snapshot (existing values pre-filled)
firma delete txn [id]Delete a transaction
firma delete balance / flow [period]Delete all entries for a period (alias rm)
firma syncFetch latest prices from Finnhub
firma mcp installRegister MCP server in Claude Desktop
firma config set finnhub-key KEYSet Finnhub API key
firma config set db-path PATHUse a custom database location

MCP tools

Available in Claude Desktop after firma mcp install. Same add_* / show_* / report_* shape as the CLI.

ToolWhat it does
add_txn / edit_txn / delete_txnStock transaction CRUD
add_balance / add_flowUpsert (acts as edit when the composite key matches)
delete_balance / delete_flowDrop entries by period (or single composite key)
show_portfolioHoldings with P&L, avg cost, market value
show_txnsTransaction history (filterable by ticker)
show_balance / show_flowStored entries (filterable by period)
show_pricesCached price snapshots
show_news / show_insider / show_financials / show_earningsFinnhub passthroughs
report_settleSingle-period summary with net_worth + net_flow
sync_pricesRefresh prices from Finnhub

Development

See CONTRIBUTING.md for architecture overview and extension points.

Requires Node.js 22+ and Yarn Berry.

corepack enable
yarn install

yarn dev:cli show portfolio    # CLI dev mode
yarn typecheck                 # Full type check

Default DB is ~/.firma/firma.db. To use a separate file during development:

firma config set db-path ./dev.db

License

MIT © Evan Moon

Reviews

No reviews yet

Sign in to write a review