
Okama Mcp
Brings the okama Python investment library into Claude and other MCP clients as a set of stateless tools. You can backtest portfolios, run Monte Carlo retirement simulations, compute efficient frontiers, and generate PNG charts without writing Python. It exposes search across okama's asset universe, single-asset history and comparisons, correlation matrices, rolling risk and returns, dividend metrics, and optimization tools for max Sharpe, min volatility, and mean-variance portfolios. Supports nested portfolio specs so you can treat a whole allocation as a single component. Runs locally via stdio or self-hosted over HTTP. Built on FastMCP, requires Python 3.11 or newer, and caches expensive portfolio objects by content hash for repeat queries.
- GitHub stars
- 5
- tools
- 39
- transport
- STDIO
- last updated
- Oct 27, 2026
Tools
39 toolsPublic tool metadata for what this MCP can expose to an agent.
search_assetsSearch by name / local name / ticker / ISIN, with exact identifiers and names ranked first; follow next_offset while has_more is true.
Search by name / local name / ticker / ISIN, with exact identifiers and names ranked first; follow next_offset while has_more is true.
No parameter schema in public metadata yet.
list_namespacesShow namespace descriptions plus usage: asset/macro classification, support for asset returns, and available MCP tools.
Show namespace descriptions plus usage: asset/macro classification, support for asset returns, and available MCP tools.
No parameter schema in public metadata yet.
get_asset_infoMetadata for one symbol — name, country, currency, type, date range.
Metadata for one symbol — name, country, currency, type, date range.
No parameter schema in public metadata yet.
get_asset_historyTime series for one asset.
Time series for one asset.
No parameter schema in public metadata yet.
compare_assetsSide-by-side statistics (describe() table: CAGR, risk, drawdowns by period) plus Sharpe & Sortino per asset.
Side-by-side statistics (describe() table: CAGR, risk, drawdowns by period) plus Sharpe & Sortino per asset.
No parameter schema in public metadata yet.
get_correlationsCorrelation matrix of monthly returns.
Correlation matrix of monthly returns.
No parameter schema in public metadata yet.
get_rolling_riskRolling annualized risk per asset.
Rolling annualized risk per asset.
No parameter schema in public metadata yet.
get_asset_returnsReturn metrics per asset: CAGR, cumulative return, mean / real mean return, monthly geometric mean, annual returns table.
Return metrics per asset: CAGR, cumulative return, mean / real mean return, monthly geometric mean, annual returns table.
No parameter schema in public metadata yet.
get_rolling_returnsRolling CAGR and rolling cumulative return per asset.
Rolling CAGR and rolling cumulative return per asset.
No parameter schema in public metadata yet.
get_benchmark_metricsBeta, correlation, annualized tracking difference and tracking error of each asset vs a benchmark/index.
Beta, correlation, annualized tracking difference and tracking error of each asset vs a benchmark/index.
No parameter schema in public metadata yet.
get_dividend_infoLTM dividend yield, 5y mean yield, paying/growing streaks per asset.
LTM dividend yield, 5y mean yield, paying/growing streaks per asset.
No parameter schema in public metadata yet.
analyze_portfolioHeadline metrics (CAGR, annual mean/risk, Sharpe, Sortino) + full describe() for a PortfolioSpec.
Headline metrics (CAGR, annual mean/risk, Sharpe, Sortino) + full describe() for a PortfolioSpec.
No parameter schema in public metadata yet.
get_portfolio_drawdownsDrawdown time series + max drawdown / recovery period.
Drawdown time series + max drawdown / recovery period.
No parameter schema in public metadata yet.
get_portfolio_var_cvarHistorical Value at Risk and CVaR.
Historical Value at Risk and CVaR.
No parameter schema in public metadata yet.
get_portfolio_wealth_indexWealth-index series (cumulative growth of 1000).
Wealth-index series (cumulative growth of 1000).
No parameter schema in public metadata yet.
get_rolling_cagrRolling CAGR time series (optionally inflation-adjusted).
Rolling CAGR time series (optionally inflation-adjusted).
No parameter schema in public metadata yet.
get_cagr_probabilityHistorical probability of CAGR below a target (e.g. of a loss) over N-year periods.
Historical probability of CAGR below a target (e.g. of a loss) over N-year periods.
No parameter schema in public metadata yet.
monte_carlo_forecastForward simulation with one of five cash-flow strategies; returns percentile wealth bands, terminal-wealth stats, survival metrics, and money-weighted IRR distribution.
Forward simulation with one of five cash-flow strategies; returns percentile wealth bands, terminal-wealth stats, survival metrics, and money-weighted IRR distribution.
No parameter schema in public metadata yet.
get_portfolio_irrHistorical money-weighted return (IRR) for a contribution/withdrawal plan.
Historical money-weighted return (IRR) for a contribution/withdrawal plan.
No parameter schema in public metadata yet.
find_the_largest_withdrawals_sizeLargest sustainable withdrawal (Monte Carlo) for a goal: keep real purchasing power, keep nominal balance, or survive N years.
Largest sustainable withdrawal (Monte Carlo) for a goal: keep real purchasing power, keep nominal balance, or survive N years.
No parameter schema in public metadata yet.
get_monte_carlo_cash_flowMonte Carlo distribution of future cash flows over time (percentile bands).
Monte Carlo distribution of future cash flows over time (percentile bands).
No parameter schema in public metadata yet.
finplan_forecastMonte Carlo forecast of the whole multi-stage plan: percentile wealth bands, terminal-wealth stats, survival metrics, success share, stage-boundary balances, and IRR distribution.
Monte Carlo forecast of the whole multi-stage plan: percentile wealth bands, terminal-wealth stats, survival metrics, success share, stage-boundary balances, and IRR distribution.
No parameter schema in public metadata yet.
finplan_backtestReplay the same plan over real history — a glide-path backtest.
Replay the same plan over real history — a glide-path backtest.
No parameter schema in public metadata yet.
get_distribution_fitGoodness-of-fit for the return distribution: fitted parameters, Jarque-Bera, Kolmogorov-Smirnov, and backtesting error.
Goodness-of-fit for the return distribution: fitted parameters, Jarque-Bera, Kolmogorov-Smirnov, and backtesting error.
No parameter schema in public metadata yet.
get_return_momentsSkewness & kurtosis time series — expanding, or rolling when a window is given.
Skewness & kurtosis time series — expanding, or rolling when a window is given.
No parameter schema in public metadata yet.
optimize_students_dfDegrees of freedom for a Student-t that best matches empirical VaR/CVaR.
Degrees of freedom for a Student-t that best matches empirical VaR/CVaR.
No parameter schema in public metadata yet.
get_cagr_distributionSimulated CAGR at each percentile, plus the probability of a CAGR at/below a score.
Simulated CAGR at each percentile, plus the probability of a CAGR at/below a score.
No parameter schema in public metadata yet.
get_dcf_wealth_indexHistorical wealth index with the cash-flow plan (FV nominal or PV discounted).
Historical wealth index with the cash-flow plan (FV nominal or PV discounted).
No parameter schema in public metadata yet.
get_dcf_cash_flow_tsHistorical contribution/withdrawal time series (FV or PV).
Historical contribution/withdrawal time series (FV or PV).
No parameter schema in public metadata yet.
get_dcf_wealth_with_assetsHistorical wealth index for the portfolio and each underlying asset.
Historical wealth index for the portfolio and each underlying asset.
No parameter schema in public metadata yet.
get_survival_periodHistorical longevity: survival period (years) and depletion date.
Historical longevity: survival period (years) and depletion date.
No parameter schema in public metadata yet.
get_initial_investment_valuesPresent value (PV) and future value (FV) of the initial investment.
Present value (PV) and future value (FV) of the initial investment.
No parameter schema in public metadata yet.
build_efficient_frontierFull efficient frontier point table (Risk / Mean return / CAGR + per-asset weights).
Full efficient frontier point table (Risk / Mean return / CAGR + per-asset weights).
No parameter schema in public metadata yet.
get_tangency_portfolioMax-Sharpe portfolio on the efficient frontier.
Max-Sharpe portfolio on the efficient frontier.
No parameter schema in public metadata yet.
get_min_variance_portfolioGlobal Minimum Variance portfolio.
Global Minimum Variance portfolio.
No parameter schema in public metadata yet.
get_most_diversified_portfolioMost Diversified Portfolio (maximises the diversification ratio) on the efficient frontier.
Most Diversified Portfolio (maximises the diversification ratio) on the efficient frontier.
No parameter schema in public metadata yet.
get_inflationInflation series for a currency, with optional cumulative, rolling and describe() outputs.
Inflation series for a currency, with optional cumulative, rolling and describe() outputs.
No parameter schema in public metadata yet.
get_central_bank_rateCentral-bank policy rate for a country, monthly or daily, with optional describe() table.
Central-bank policy rate for a country, monthly or daily, with optional describe() table.
No parameter schema in public metadata yet.
get_indicatorMacro indicator from the RATIO namespace (e.g. CAPE10).
Macro indicator from the RATIO namespace (e.g. CAPE10).
No parameter schema in public metadata yet.
Sponsors
Readme
okama-mcp

MCP (Model Context Protocol) server that exposes the okama investment portfolio toolkit and okama Planner to AI assistants — Claude Desktop, Claude Code, Cursor, Codex, and any other MCP-compatible client.
With okama-mcp installed, you can ask an AI things like:
Details
- Repository
- github.com/mbk-dev/okama-mcp
- Category
- Monitoring & Observability
- Package
okama-mcp- Transport
- STDIO
- Registry
- MCP registry, active