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 分