Fundamental Analysis

io.github.boffincodersPublished by GitHub account boffincodersv0.1.0Updated Nov 5, 2026

Read-only fundamental analysis: P/E, DCF, Graham, Altman Z, Piotroski and margins, with formulas

VerifiedSTDIODesktop onlyFinanceData & Analytics

Overview

AI-generated overview

Local MCP server of read-only fundamental analysis calculators: P/E, DCF, Graham Number, Altman Z, Piotroski F-Score, margins and ratios.

What you can do
  • Compute valuation metrics from figures you supply: P/E, DCF enterprise value and implied share price, Graham Number.
  • Score risk and quality: Altman Z or Z'' with its zone, Piotroski F-Score with each of the nine signals.
  • Work out profitability, liquidity and leverage: return on equity, gross/operating/net/free cash flow margin, current or quick ratio, debt-to-equity or interest coverage.
  • Run every ratio the given figures allow in one call, grouped by category, with missing metrics named and optional one-line insights.
When to use it
Useful when you want an assistant to crunch fundamental analysis from numbers you already have, such as a quick valuation check, a bankruptcy-risk or quality score, or a consistent set of ratios, without pulling data from any source.
Requirements
Runs locally over stdio, typically started with npx from the npm package fundamental-analysis-mcp, so Node.js is needed. No API key, no environment variables and no dependencies; the assistant must supply all figures itself.
Before you install
Results are arithmetic on the inputs you provide, not fetched or verified data, so accuracy depends entirely on the figures passed in. Outputs are analytical estimates with stated caveats, not investment advice; nothing is written or changed.

Installation

In SourceWeft

  1. Open Fundamental Analysis in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

fundamental-analysis-mcp

An MCP server that gives an AI assistant the calculators from fundamental-analysis: P/E, DCF, Graham Number, Altman Z-Score, Piotroski F-Score, return on equity, profit margins, and liquidity and debt ratios, plus one tool that runs every ratio your figures allow in a single call.

Every result returns four things: the value, the formula that produced it, the inputs it used and the caveats you need before acting on it. The assistant brings the figures. The server fetches nothing, needs no API key and has no dependencies.

Tools

ToolWhat it returns
pe_ratioPrice / EPS, with a note when EPS is zero or negative
dcf_valuationEnterprise value from projected free cash flow, the terminal value's share of it, and an implied share price when you pass debt, cash and shares
graham_numbersqrt(22.5 x EPS x book value per share), and the price against it
altman_z_scoreZ (public manufacturers) or Z'' (everyone else), with the zone
return_on_equityNet income / equity, null when equity is zero or negative
piotroski_f_scoreThe 0 to 9 score with each of the nine signals, and which signals a missing prior year leaves unscored
profit_marginGross, operating, net or free cash flow margin as a share of revenue
liquidity_ratioCurrent ratio, or quick ratio without inventory
leverage_ratioDebt to equity, or interest coverage (EBIT / interest expense)
analyze_companyEvery ratio the figures allow, grouped as valuation, profitability, liquidity, solvency, efficiency, risk and quality, with the metrics that came back null named. Add withInsights for a status and a one-line reading per metric

Every tool is read-only: it computes and answers, and changes nothing.

Set up

Claude Code:

bash
claude mcp add fundamental-analysis -- npx -y fundamental-analysis-mcp

Claude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json):

json
{  "mcpServers": {    "fundamental-analysis": {      "command": "npx",      "args": ["-y", "fundamental-analysis-mcp"]    }  }}

Example

Ask: "Graham Number for EPS 4 and book value 25 a share, price 40?" The graham_number tool answers:

json
{  "value": 47.43,  "priceVsGraham": 0.84,  "formula": "Graham Number = sqrt(22.5 * EPS * book value per share)",  "inputs": { "eps": 4, "bookValuePerShare": 25, "price": 40 },  "caveats": ["22.5 is 15 times earnings by 1.5 times book, Graham's limits for a defensive investor. It ignores growth, so it is strict on growth companies and on asset-light businesses."]}

Build and test

bash
npm run build   # one file, dist/server.js, with the library bundled innpx vitest run mcp   # from the repository root

MCP registry

server.json describes the server for the official MCP registry as io.github.boffincoders/fundamental-analysis-mcp, and mcpName in package.json carries the same name so the registry can check the npm package. Publish to npm first, then run mcp-publisher publish from this folder.

Licence

MIT. Maintained by Boffin Coders.

Source: mcp/README.md at commit 41ea4a8

Tools

10

pe_ratio

Price to earnings (P/E)

Price to earnings ratio from a share price and earnings per share.

Parametersepsrequiredpricerequired

dcf_valuation

Discounted cash flow (DCF)

Present value of projected free cash flows plus a Gordon-growth terminal value. Optionally converts enterprise value to an implied share price.

ParameterscashtotalDebtdiscountRaterequiredprojectedFCFrequiredsharesOutstandingterminalGrowthRaterequired

graham_number

Graham Number

Benjamin Graham's ceiling price for a defensive investor, from EPS and book value per share.

ParametersepsrequiredpricebookValuePerSharerequired

altman_z_score

Altman Z-Score

Bankruptcy risk score. The original model (1968) is for US public manufacturers; the Z'' model is for non-manufacturers, private and non-US companies.

ParametersebitrequiredmodelrequiredsalesbookEquitytotalAssetsrequiredworkingCapitalrequiredretainedEarningsrequiredtotalLiabilitiesrequiredmarketValueEquity

return_on_equity

Return on equity (ROE)

Net income as a share of shareholders' equity.

ParametersequityrequirednetIncomerequired

piotroski_f_score

Piotroski F-Score

Nine pass or fail accounting signals (profitability, leverage and liquidity, efficiency) added into a 0 to 9 score. Signals that compare two years are scored only when both years are given.

ParametersnetIncomerequiredtotalAssetsrequiredlongTermDebtpriorNetIncomegrossMarginValuepriorTotalAssetscurrentRatioValueoperatingCashFlowrequiredpriorLongTermDebtsharesOutstandingassetTurnoverValuepriorGrossMarginValue+3 more

profit_margin

Profit margin (gross, operating, net, FCF)

One margin as a share of revenue: gross, operating, net or free cash flow.

ParameterskindrequiredrevenuerequirednetIncomefreeCashFlowcostOfRevenueoperatingIncome

liquidity_ratio

Liquidity ratio (current, quick)

Whether short-term assets cover short-term liabilities: the current ratio, or the quick ratio that leaves out inventory.

ParameterskindrequiredinventorycurrentAssetsrequiredcurrentLiabilitiesrequired

leverage_ratio

Leverage ratio (debt to equity, interest coverage)

How much debt a company carries against its equity, or how many times its operating profit covers its interest.

ParametersebitkindrequiredtotalDebttotalEquityinterestExpense

analyze_company

Company analysis (every ratio at once)

Every ratio the figures allow, in one call: valuation, profitability, liquidity, solvency, efficiency, risk (Altman Z, Z'', Piotroski) and quality. Every figure is optional; a metric whose figures are missing comes back null and is named. With withInsights, each metric also gets a status and a one-line reading.

ParametersepsebitpriceebitdastdDevreturnstaxRateriskFreeinventorymarketCapnetIncometotalDebt+24 more

Version history

1
  1. v0.1.0LatestNov 5, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts