@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
Maintainers
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-server3. 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 returnsmin_volatility— Minimize portfolio variancerisk_parity— Equal risk contributionequal_weight— Simple 1/N allocation
Target-Based (1 compute unit)
min_vol_target_return— Minimum risk for a target returnmax_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 closelymax_information_ratio— Best risk-adjusted excess returnmax_sortino_target_return— Downside-risk adjustedmax_omega_target_return— Omega ratio optimizationmin_drawdown_target_return— Minimize maximum drawdown
Robust (2 compute units)
robust_max_sharpe— Sharpe, robust to estimation errorrobust_min_volatility— Min-var, robust to estimation errorrobust_min_vol_target_return— Robust target-returnrobust_max_return_target_vol— Robust target-vol
Development
cd mcp-server
npm install
npm run build
npm startLicense
MIT
