financetoolkit

MCP serverMonitoring & ops

financetoolkit lets your AI calculate more than 200 financial metrics directly from raw company statements. Because the numbers are computed from the statements themselves rather than pulled from third-party endpoints, every result is transparent. Once added, your AI can turn raw financial statements into the metrics you need, on demand.

Use financetoolkit in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add financetoolkit and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use financetoolkit

Details

Available today. Use it from your connected AI after setup.

Add financetoolkit, then give your AI a company's raw statements and ask for the metrics you want to see.

financetoolkitStart free

What your AI can do with it

  • Calculate over 200 financial metrics from raw company statements
  • Derive metrics from the statements themselves instead of third-party data endpoints
  • Show how each metric was calculated
  • Answer questions about a company's financials with metrics computed on demand
  • Monitor the financial metrics that matter to you

Install financetoolkit

The server’s own address, for the clients that take one directly. Or connect Ahel once and every client you use reads it from one address, with the account kept on Ahel rather than in each client’s config.

  • Claude Code

    claude mcp add --transport http --scope user financetoolkit 'https://financetoolkit.jeroenbouma.com/mcp'

    Run it once in your project, then open /mcp to approve any sign-in the server asks for.

  • Claude Desktop

    https://financetoolkit.jeroenbouma.com/mcp

    Add a custom connector in Settings, paste this address, and approve the sign-in.

  • Cursor

    cursor://anysphere.cursor-deeplink/mcp/install?name=financetoolkit&config=eyJ1cmwiOiJodHRwczovL2ZpbmFuY2V0b29sa2l0Lmplcm9lbmJvdW1hLmNvbS9tY3AifQ==

    Open the link and Cursor adds the server at that address.

  • ChatGPT

    https://financetoolkit.jeroenbouma.com/mcp

    In Settings, enable Developer mode, create an MCP app, and paste this address. Your plan and workspace must allow custom apps.

  • Codex

    codex mcp add financetoolkit --url 'https://financetoolkit.jeroenbouma.com/mcp'

    Run it once, then sign in with codex mcp login financetoolkit if the server asks for an account.

From the project's README

As published by jerbouma/financetoolkit in README.md.

While browsing a variety of websites, I repeatedly observed significant fluctuations in the same financial metric among different sources. Similarly, the reported financial statements often didn't line up, and there was limited information on the methodology used to calculate each metric.

For example, Microsoft's Price-to-Earnings (PE) ratio on the 6th of May, 2023 is reported to be 28.93 (Stockopedia), 32.05 (Morningstar), 32.66 (Macrotrends), 33.09 (Finance Charts), 33.66 (Y Charts), 33.67 (Wall Street Journal), 33.80 (Yahoo Finance) and 34.4 (Companies Market Cap). All of these calculations are correct, however the method of calculation varies leading to different results. Therefore, collecting data from multiple sources can lead to wrong interpretation of the results given that one source could apply a different definition than another. And that is, if that definition is even available as often the underlying methods are hidden behind a paid subscription.

This is why I designed the FinanceToolkit, this is an open-source toolkit in which all relevant financial methods (500+) are written down in the most simplistic way allowing for complete transparency of the method of calculation (proof). This enables you to avoid dependence on metrics from other providers that do not provide their methods. With a large selection of financial statements in hand, it facilitates streamlined calculations, promoting the adoption of a consistent and universally understood methods and formulas.

Beyond Equities, it supports Options, Currencies, Cryptocurrencies, ETFs, Mutual Funds, Indices, Money Markets, Commodities, Key Economic Indicators and more, allowing you to obtain historical data as well as important performance and risk measurements such as the Sharpe Ratio and Value at Risk.

Complementing this is the Finance Database 🌎, a database featuring 300.000+ symbols containing Equities, ETFs, Funds, Indices, Currencies, Cryptocurrencies and Money Markets. By utilising both, it is possible to do a fully-fledged competitive analysis with the tickers found from the FinanceDatabase inputted into the FinanceToolkit.


🔌 The Finance Toolkit is also available as an MCP Server

Query 500+ methods from Claude, Copilot, Cursor, Windsurf or any MCP-compatible client without writing code.

  • Hosted: connect to https://financetoolkit.jeroenbouma.com/mcp — OAuth handles the rest on first use.
  • Local: uvx --from "financetoolkit[mcp]" financetoolkit-mcp-setup — sets up your client config and API key automatically. See MCP Server Documentation for manual setup.

Also on Smithery, Glama, MCP Servers and more.


Table of Contents

  1. Installation
  2. Functionality
  3. MCP Server
  4. Questions & Answers
  5. Contributing
  6. Mentions
  7. Contact

Installation

Before installation, consider starring the project on GitHub which helps others find the project as well.

To install the Finance Toolkit it simply requires the following:

pip install financetoolkit -U

Then within Python use:

from financetoolkit import Toolkit

companies = Toolkit(
    tickers=['AAPL', 'MSFT'],
    api_key="FINANCIAL_MODELING_PREP_KEY",  # replace with your actual API key
)

To be able to get started, you need to obtain an API Key from FinancialModelingPrep. This is used to gain access to 30+ years of financial statement both annually and quarterly. Note that the Free plan is limited to 250 requests each day, 5 years of data and only features companies listed on US exchanges.


Obtain an API Key from FinancialModelingPrep here.


Through the link you are able to subscribe for the free plan and also premium plans at a 15% discount. This is an affiliate link and thus supports the project at the same time. I have chosen FinancialModelingPrep as a source as I find it to be the most transparent, reliable and at an affordable price. I have yet to find a platform offering such low prices for the amount of data offered. When you notice that the data is inaccurate or have any other issue related to the data, note that I simply provide the means to access this data and I am not responsible for the accuracy of the data itself. For this, use their contact form or provide the data yourself.

By default, the Finance Toolkit prioritizes Financial Modeling Prep for data retrieval. If data acquisition from Financial Modeling Prep is unsuccessful (e.g., due to plan restrictions or API key issues), the toolkit automatically switches to Yahoo Finance as a secondary source. To disable this fallback behavior and exclusively use Financial Modeling Prep, set enforce_source="FinancialModelingPrep" during Toolkit initialization. This configuration ensures that an error is raised if Financial Modeling Prep data cannot be accessed. Alternatively, you can set enforce_source="YahooFinance" to exclusively use Yahoo Finance as the data source.

The same enforce_source argument is also accepted per call on get_historical_data, get_treasury_data and the four statement functions (get_balance_sheet_statement, get_income_statement, get_cash_flow_statement and get_statistics_statement), where it overrides whatever the Toolkit was initialised with.

Functionality

This section is an introduction to the Finance Toolkit. Find with the link below fully-fledged code documentation as well as Jupyter Notebooks in which you can see many examples ranging from basic examples to creating custom ratios to working with your own datasets.


Find a variety of How-To Guides including Code Documentation for the FinanceToolkit here.


A basic example of how to use the Finance Toolkit is shown below. Every code snippet in the sections that follow builds on this same companies instance.

from financetoolkit import Toolkit

# Initialize the Toolkit for Apple and Microsoft
companies = Toolkit(["AAPL", "MSFT"], api_key="FINANCIAL_MODELING_PREP_KEY", start_date="2017-12-31")

Each ratio, indicator and metric has a corresponding function that can be called directly, for example ratios.get_return_on_equity or technicals.get_relative_strength_index. Every module also has one or more collect_ functions that return a whole category at once, e.g. ratios.collect_profitability_ratios, useful when you want everything in one call instead of assembling it metric by metric.

Three capabilities cut across nearly the whole toolkit:

  • rolling and trailing windows. Many metrics return one value per reporting period by default. Pass rolling=<n> to compute the metric over a sliding window instead, or trailing=<n> for a trailing sum/average (e.g. a trailing 4-quarter sum to annualize a quarterly flow) — turning a snapshot into a proper time series.
  • growth and lag. Pass growth=True on almost any get_ or collect_ function to return the period-over-period growth instead of the raw value. lag (an int or list of ints, default 1) controls how many periods back that growth is measured against, e.g. lag=4 for year-over-year growth on quarterly data. Combine with trailing (e.g. trailing=4, growth=True) to get TTM growth.
  • standardize (Z-Score). Most get_* methods across Economics, Ratios, Technicals, Risk, Performance, Models, Options and Fixed Income accept standardize=True, converting raw values into standard deviations from their own historical mean/std. Useful for ranking, scoring, or spotting an unusual reading across metrics that otherwise live on incompatible scales.

Every module below also has a How-To Guide notebook and full code documentation (formulas, parameters, worked examples) linked in its own section, see the documentation hub for the complete index.

Discovering Instruments & News

Before analyzing a ticker you often need to find it. The Discovery module is standalone and covers among other things lists of companies, cryptocurrencies, forex, commodities, ETFs and indices.

from financetoolkit import Discovery

# Initialize the standalone Discovery module
discovery = Discovery(api_key="FINANCIAL_MODELING_PREP_KEY")

# Find US semiconductor companies worth more than $100 billion
semiconductors = discovery.get_stock_screener(
    industry="Semiconductors",
    country="US",
    exchange="NASDAQ",
    market_cap_higher=100_000_000_000,
    is_etf=False,
)

The screener returns twelve companies, of which the five largest are shown below:

SymbolNameMarket CapBetaPriceDividend
NVDANVIDIA Corporation56778868200002.217234.420.28
AVGOBroadcom Inc.16885660026961.457354.922.60
MUMicron Technology, Inc.12127446289502.2221073.810.53
AMDAdvanced Micro Devices, Inc.10289575180002.476631.030.00
INTCIntel Corp.6049773296552.231119.940.00

And below all twelve are ranked by market cap.

Furthermore, you can find in this module stock screeners, sector/industry performance and news feeds and more. Find the Notebook here and the full instrument discovery documentation here.

Obtaining Historical Data

Obtain historical data on a daily, weekly, monthly or yearly basis. This includes OHLC, volumes, dividends, returns and cumulative returns for each corresponding period.

# Obtain historical market data for all tickers
historical_data = companies.get_historical_data()

# Select the results for Apple
historical_data.xs('AAPL', axis=1, level=1)

For example, a portion of the historical data for Apple is shown below.

dateOpenHighLowCloseAdj CloseVolumeDividendsReturnCumulative Return
2018-01-0242.5443.07542.31543.06540.781.02224e+08001
2018-01-0343.132543.637542.9943.057540.771.17982e+080-0.00020.9998
2018-01-0443.13543.367543.0243.257540.968.97384e+0700.00471.0044
2018-01-0543.3643.842543.262543.7541.439.46401e+0700.01151.0159
2018-01-0843.587543.902543.482543.587541.278.22711e+070-0.00391.012

And below the cumulative returns are plotted which include the S&P 500 as benchmark:

Metrics such as Volatility, Excess Return and Excess Volatility are calculated as dedicated Risk and Performance methods rather than columns on this table to create more efficient and flexible functionalities. Find the Notebook here and the full historical data documentation here.

Obtaining Financial Statements

Obtain an Income Statement on an annual or quarterly basis. This can also be a balance statement or cash flow statement.

# Obtain the Income Statement for all tickers
income_statement = companies.get_income_statement()

# Select the results for Apple
income_statement.loc['AAPL']

For example, the first 5 rows of the Income Statement for Apple are shown below.

2017201820192020202120222023
Revenue2.29234e+112.65595e+112.60174e+112.74515e+113.65817e+113.94328e+113.83285e+11
Cost of Goods Sold1.41048e+111.63756e+111.61782e+111.69559e+112.12981e+112.23546e+112.14137e+11
Gross Profit8.8186e+101.01839e+119.8392e+101.04956e+111.52836e+111.70782e+111.69148e+11
Gross Profit Ratio0.38470.38340.37820.38230.41780.43310.4413
Research and Development Expenses1.1581e+101.4236e+101.6217e+101.8752e+102.1914e+102.6251e+102.9915e+10

And below the Earnings Before Interest, Taxes, Depreciation and Amortization (EBITDA) are plotted for Apple and Alphabet since 2017. Their fiscal years line up closely, so both show the same latest reported year. Find the Notebook here and the full financial statement documentation here.

Obtaining Financial Ratios

Get Profitability Ratios based on the inputted balance sheet, income and cash flow statements. This can be any of the 80+ ratios within the ratios module.

# Collect all Profitability Ratios for all tickers
profitability_ratios = companies.ratios.collect_profitability_ratios()

# Select the results for Microsoft
profitability_ratios.loc['MSFT']

For example, see some of the profitability ratios of Microsoft below.

2017201820192020202120222023
Gross Margin0.61910.65250.6590.67780.68930.6840.6892
Operating Margin0.24820.31770.34140.37030.41590.42060.4177
Net Profit Margin0.23570.15020.31180.30960.36450.36690.3415
Interest Coverage Ratio13.998216.582120.342925.378234.783547.427552.0244
Income Before Tax Profit Margin0.25740.33050.34720.37080.4230.42220.4214

And below a few of the profitability ratios of Microsoft, each with its latest value, the change over the period and its trend.

The 80+ ratios are divided into five categories: Efficiency (asset/inventory/receivables turnover, cash conversion cycle, R&D/SG&A/SBC-to-revenue), Liquidity (current, quick and cash ratios, working capital), Profitability (margins, ROE/ROA/ROIC, cash vs. effective tax rate), Solvency (debt-to-equity, debt-to-capital, interest and dividend coverage) and Valuation (P/E, PEG, Forward P/E, EV multiples, buyback and shareholder yield). It's also possible to define fully custom ratios calculated automatically from the balance sheet, income and cash flow statements. Find the Notebook here and the full ratio-by-ratio documentation here.

Obtaining Financial Models

Get an Extended DuPont Analysis based on the inputted balance sheet, income and cash flow statements.

# Get the Extended DuPont Analysis for all tickers
extended_dupont_analysis = companies.models.get_extended_dupont_analysis()

# Select the results for Apple
extended_dupont_analysis.loc['AAPL']

For example, this shows the Extended DuPont Analysis for Apple:

2017201820192020202120222023
Interest Burden Ratio0.95720.97250.97250.9880.99761.00281.005
Tax Burden Ratio0.78820.83970.86430.86610.8690.83560.8486
Operating Profit Margin0.27960.27450.25270.24440.29850.3020.2967
Asset Turnovernan0.71680.73890.82881.08411.12061.0868
Equity Multipliernan3.07243.56334.25095.2556.18626.252
Return on Equitynan0.49360.55920.73691.47441.75461.7195

The five components of the Extended DuPont Analysis multiply into the Return on Equity (ROE): interest burden × tax burden × operating margin × asset turnover × equity multiplier. Below they are shown for each year, ending in the resulting ROE.

The models module covers 10+ models in total, for example DuPont Analysis, WACC, Economic Value Added (EVA), Altman Z-Score, Beneish M-Score and the Graham Number. Find the Notebook here and the full model-by-model documentation here.

Obtaining Options and Greeks

Get the Black Scholes Model for both call and put options including the relevant Greeks, in this case Delta, Gamma, Theta and Vega. This can be any of the First, Second or Third Order Greeks.

# Get Delta for all tickers across strikes and expirations
delta = companies.options.get_delta(expiration_time_range=180)

# Select the results for Apple
delta.loc['AAPL']

For example, see the delta of the Call options for Apple for multiple expiration times and strike prices below (Stock Price: 185.92, Volatility: 31.59%, Dividend Yield: 0.49% and Risk Free Rate: 3.95%):

1 Month2 Months3 Months4 Months5 Months6 Months
1750.76860.71780.69670.68570.67940.6759
1800.66590.640.63180.6290.62850.6291
1850.55220.55830.56480.5710.57670.5816
1900.43710.47620.49770.5130.52490.5342
1950.32980.39710.43240.45620.4740.4875

Which can also be plotted together with Gamma, Theta and Vega as follows:

Shortened here. Read the whole README on GitHub.

Signals

GitHub stars
5k
Forks
625
Last commit
Sep 2026
Advanced
Delivery
financetoolkit MCP server → your Ahel connector (mcp.ahel.ai) → your AI.
Item type
mcp-server
Key
io-github-jerbouma-financetoolkit
Source
github.com/jerbouma/financetoolkit
Hosted endpoint
https://financetoolkit.jeroenbouma.com/mcp