npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@folioforecast/mcp-server

v2.0.0

Published

MCP server for FolioForecast APIs — enables AI agents to optimize portfolios, manage budgets, and plan retirement. Includes portfolio optimization, budget tracking with CSV import, and retirement planning with projections and Monte Carlo simulations.

Downloads

23

Readme

FolioForecast MCP Server

Portfolio optimization tools for AI agents via the Model Context Protocol.

Connects AI assistants (Claude, GPT, etc.) to FolioForecast's portfolio optimization engine — 20 optimization methods across 165,000+ tickers.

Tools

| Tool | Description | Cost | |------|-------------|------| | optimize_portfolio | Run mean-variance optimization with 20 methods (Sharpe, min-vol, risk parity, Kelly, CVaR, etc.) | 1-2 units | | search_tickers | Search 165,000+ ticker symbols by name or symbol | Free | | stress_test | Crisis scenario analysis (2008 crash, COVID, custom shocks) | 1 unit/scenario | | get_asset_metadata | Fundamental data, sector classification, market cap | 1 unit |

Quick Start

1. Get an API Key

Sign up at folioforecast.com/developers and create an API key.

2. Install

npm install -g @folioforecast/mcp-server

3. Configure Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "folioforecast": {
      "command": "folioforecast-mcp",
      "env": {
        "FOLIOFORECAST_API_KEY": "ff_live_your_key_here"
      }
    }
  }
}

Or run from source:

{
  "mcpServers": {
    "folioforecast": {
      "command": "node",
      "args": ["path/to/mcp-server/dist/index.js"],
      "env": {
        "FOLIOFORECAST_API_KEY": "ff_live_your_key_here"
      }
    }
  }
}

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | FOLIOFORECAST_API_KEY | Yes | Your API key (starts with ff_live_) | | FOLIOFORECAST_API_URL | No | Custom API base URL (default: https://www.folioforecast.com/api/v1) |

Example Prompts

Once configured, try asking Claude:

  • "Optimize a portfolio of AAPL, GOOGL, MSFT, and AGG for maximum Sharpe ratio"
  • "What's the minimum volatility portfolio using SPY, TLT, GLD, and VNQ?"
  • "How would a 60/40 portfolio perform during the 2008 financial crisis?"
  • "Search for gold ETFs and find the best risk-parity allocation"
  • "Compare my portfolio (50% AAPL, 30% GOOGL, 20% AMZN) against the optimal allocation"

Optimization Methods

Basic (1 compute unit)

  • max_sharpe — Maximize risk-adjusted returns
  • min_volatility — Minimize portfolio variance
  • risk_parity — Equal risk contribution
  • equal_weight — Simple 1/N allocation

Target-Based (1 compute unit)

  • min_vol_target_return — Minimum risk for a target return
  • max_return_target_vol — Maximum return for a risk budget

Advanced (2 compute units)

  • min_cvar — Minimize tail risk (Conditional VaR)
  • max_kelly — Kelly criterion (geometric growth)
  • min_tracking_error — Track a benchmark closely
  • max_information_ratio — Best risk-adjusted excess return
  • max_sortino_target_return — Downside-risk adjusted
  • max_omega_target_return — Omega ratio optimization
  • min_drawdown_target_return — Minimize maximum drawdown

Robust (2 compute units)

  • robust_max_sharpe — Sharpe, robust to estimation error
  • robust_min_volatility — Min-var, robust to estimation error
  • robust_min_vol_target_return — Robust target-return
  • robust_max_return_target_vol — Robust target-vol

Development

cd mcp-server
npm install
npm run build
npm start

License

MIT