Fundamental Analysis

io.github.boffincoders由 GitHub 账号 boffincoders 发布v0.1.0更新于 Nov 5, 2026

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

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

本地 MCP 服务器,提供只读的基本面分析计算器:市盈率、DCF、格雷厄姆数字、Altman Z、Piotroski F 分数、利润率与各类比率。

可以做什么
  • 用你提供的数字计算估值指标:市盈率、DCF 企业价值与隐含股价、格雷厄姆数字。
  • 评估风险与质量:Altman Z 或 Z'' 及其区间、Piotroski F 分数及九项信号。
  • 计算盈利、流动性与杠杆:净资产收益率、毛利/营业/净利/自由现金流利润率、流动比率或速动比率、负债权益比或利息保障倍数。
  • 一次调用算出数据允许的全部比率,按类别分组,并列出因缺数据而为空的指标,可选附一行解读。
适用场景
适合让助手基于你已有的财务数字做基本面计算,例如快速估值核对、破产风险或质量评分,或得到一组口径一致的比率,而无需从任何来源抓取数据。
运行要求
通过 stdio 在本机运行,通常用 npx 启动 npm 包 fundamental-analysis-mcp,因此需要 Node.js。无需 API 密钥、环境变量或依赖;所有数字须由助手自行提供。
安装前请注意
结果只是对你输入数字的算术运算,并非抓取或核实过的数据,准确性完全取决于传入的数字。输出为附带说明的估算分析,不构成投资建议;不会写入或更改任何内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Fundamental Analysis,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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.

来源:mcp/README.md,提交 41ea4a8

工具

10

pe_ratio

Price to earnings (P/E)

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

输入参数eps必填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.

输入参数cashtotalDebtdiscountRate必填projectedFCF必填sharesOutstandingterminalGrowthRate必填

graham_number

Graham Number

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

输入参数eps必填pricebookValuePerShare必填

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.

输入参数ebit必填model必填salesbookEquitytotalAssets必填workingCapital必填retainedEarnings必填totalLiabilities必填marketValueEquity

return_on_equity

Return on equity (ROE)

Net income as a share of shareholders' equity.

输入参数equity必填netIncome必填

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.

输入参数netIncome必填totalAssets必填longTermDebtpriorNetIncomegrossMarginValuepriorTotalAssetscurrentRatioValueoperatingCashFlow必填priorLongTermDebtsharesOutstandingassetTurnoverValuepriorGrossMarginValue另有 3 个

profit_margin

Profit margin (gross, operating, net, FCF)

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

输入参数kind必填revenue必填netIncomefreeCashFlowcostOfRevenueoperatingIncome

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.

输入参数kind必填inventorycurrentAssets必填currentLiabilities必填

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.

输入参数ebitkind必填totalDebttotalEquityinterestExpense

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.

输入参数epsebitpriceebitdastdDevreturnstaxRateriskFreeinventorymarketCapnetIncometotalDebt另有 24 个

版本历史

1
  1. v0.1.0最新Nov 5, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分