About Fundamental Analysis
Fundamental Analysis is a read-only MCP server that gives AI assistants fundamental finance calculators for valuation, profitability, liquidity, and solvency. Results include the value, formula, inputs, and caveats; the client supplies the figures.
Key features
- 01Calculate P/E and DCF valuation
- 02Calculate Graham Number and Altman Z-Score
- 03Calculate Piotroski F-Score
- 04Analyze margins, liquidity, and leverage
- 05Run all available metrics in one call
- 06Return formulas, inputs, and caveats
Use cases
- 01Assess company valuation from supplied figures
- 02Review profitability and solvency metrics
- 03Check the formulas and inputs behind financial ratios
MCP support
The MCP server exposes financial ratio calculators and an analyze_company tool that runs all metrics allowed by the supplied figures; every tool is read-only.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
10Saved tool list · updated 1d ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| eps | number | Yes | Earnings per share, same period basis as you intend (trailing or forward) |
| price | number | Yes | Share price |
Details
From the project READMEfundamental-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
| Tool | What it returns |
|---|---|
pe_ratio | Price / EPS, with a note when EPS is zero or negative |
dcf_valuation | Enterprise 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_number | sqrt(22.5 x EPS x book value per share), and the price against it |
altman_z_score | Z (public manufacturers) or Z'' (everyone else), with the zone |
return_on_equity | Net income / equity, null when equity is zero or negative |
piotroski_f_score | The 0 to 9 score with each of the nine signals, and which signals a missing prior year leaves unscored |
profit_margin | Gross, operating, net or free cash flow margin as a share of revenue |
liquidity_ratio | Current ratio, or quick ratio without inventory |
leverage_ratio | Debt to equity, or interest coverage (EBIT / interest expense) |
analyze_company | Every 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:
claude mcp add fundamental-analysis -- npx -y fundamental-analysis-mcp
Claude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.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:
{
"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
npm run build # one file, dist/server.js, with the library bundled in
npx 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.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.