Fundamental Analysis

v0.1.0
io.github.boffincoders/fundamental-analysis-mcp Checked 1 day ago Published 27 days ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

pe_ratio Price to earnings (P/E)

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

ParameterTypeDescription
eps *numberEarnings per share, same period basis as you intend (trailing or forward)
price *numberShare price

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.

ParameterTypeDescription
discountRate *numberDiscount rate or WACC as a decimal, e.g. 0.09 for 9%
projectedFCF *arrayProjected free cash flow for years 1 to N
terminalGrowthRate *numberPerpetual growth after year N as a decimal, e.g. 0.025
cashnumberOptional: cash and equivalents, for the implied share price
sharesOutstandingnumberOptional: shares outstanding, for the implied share price
totalDebtnumberOptional: total debt, for the implied share price

graham_number Graham Number

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

ParameterTypeDescription
bookValuePerShare *numberBook value per share
eps *numberEarnings per share
pricenumberOptional: current share price, to compare

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.

ParameterTypeDescription
ebit *numberEarnings before interest and taxes
model *stringoriginal (public manufacturers) or double_prime (everyone else)
retainedEarnings *numberRetained earnings
totalAssets *numberTotal assets
totalLiabilities *numberTotal liabilities
workingCapital *numberCurrent assets minus current liabilities
bookEquitynumberBook value of equity (double_prime model)
marketValueEquitynumberMarket value of equity (original model)
salesnumberRevenue (original model)

return_on_equity Return on equity (ROE)

Net income as a share of shareholders' equity.

ParameterTypeDescription
equity *numberShareholders' equity (average of the period if you have it)
netIncome *numberNet income for the period

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.

ParameterTypeDescription
netIncome *numberNet income, current year
operatingCashFlow *numberCash flow from operations, current year
totalAssets *numberTotal assets, current year
assetTurnoverValuenumberOptional: revenue / total assets, current year (F9)
currentRatioValuenumberOptional: current ratio, current year (F6)
grossMarginValuenumberOptional: gross margin as a decimal, current year (F8)
longTermDebtnumberOptional: long-term debt, current year (F5)
priorAssetTurnoverValuenumberOptional: revenue / total assets, prior year (F9)
priorCurrentRatioValuenumberOptional: current ratio, prior year (F6)
priorGrossMarginValuenumberOptional: gross margin as a decimal, prior year (F8)
priorLongTermDebtnumberOptional: long-term debt, prior year (F5)
priorNetIncomenumberOptional: net income, prior year (F3)
priorSharesOutstandingnumberOptional: shares outstanding, prior year (F7)
priorTotalAssetsnumberOptional: total assets, prior year (F3, F5)
sharesOutstandingnumberOptional: shares outstanding, current year (F7)

profit_margin Profit margin (gross, operating, net, FCF)

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

ParameterTypeDescription
kind *stringWhich margin
revenue *numberRevenue for the period
costOfRevenuenumberCost of revenue (gross)
freeCashFlownumberFree cash flow (free_cash_flow)
netIncomenumberNet income (net)
operatingIncomenumberOperating income (operating)

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.

ParameterTypeDescription
currentAssets *numberCurrent assets
currentLiabilities *numberCurrent liabilities
kind *stringcurrent or quick (acid test)
inventorynumberInventory (quick)

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.

ParameterTypeDescription
kind *stringWhich ratio
ebitnumberEBIT, operating income (interest_coverage)
interestExpensenumberInterest expense, positive or negative as your data reports it (interest_coverage)
totalDebtnumberTotal debt (debt_to_equity)
totalEquitynumberShareholders' equity (debt_to_equity)

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.

ParameterTypeDescription
analystTargetPricenumberAnalyst target price
annualDividendPerSharenumberDividends per share over one year
bookValuePerSharenumberBook value per share
cashAndEquivalentsnumberCash and equivalents
costOfRevenuenumberCost of revenue, as a positive number
currentAssetsnumberCurrent assets
currentLiabilitiesnumberCurrent liabilities
ebitnumberEarnings before interest and taxes
ebitdanumberEBITDA
epsnumberEarnings per share, trailing twelve months or last fiscal year
expectedEarningsGrowthRatenumberExpected yearly EPS growth as a decimal, e.g. 0.15 (PEG)
freeCashFlownumberOperating cash flow minus capital expenditure
grossProfitnumberGross profit, used when cost of revenue is not given
interestExpensenumberInterest expense, as a positive number
inventorynumberInventory
longTermDebtnumberLong-term debt
marketCapnumberMarket capitalisation (price x shares outstanding)
netIncomenumberNet income
operatingCashFlownumberCash flow from operations
operatingIncomenumberOperating income
pricenumberShare price
retainedEarningsnumberRetained earnings
returnsnumberReturn for the period as a decimal (Sharpe)
revenuePerSharenumberRevenue per share
riskFreenumberRisk-free rate for the same period as a decimal (Sharpe)
sharesOutstandingnumberShares outstanding
stdDevnumberStandard deviation of returns for the same period (Sharpe)
taxRatenumberEffective tax rate as a decimal, e.g. 0.25 (ROIC)
totalAssetsnumberTotal assets
totalDebtnumberShort-term plus long-term borrowings
totalEquitynumberShareholders' equity
totalLiabilitiesnumberTotal liabilities
totalRevenuenumberRevenue for the period
tradeReceivablesnumberTrade receivables
withInsightsbooleanOptional: add a status (Good, Neutral, Bad, N/A) and a one-line reading to each metric
workingCapitalnumberCurrent assets minus current liabilities; worked out from them when left out