openfolio-ro-mcp

v0.1.6
openfolio-ro-mcp Checked 1 day ago Published 1 month ago

OpenFolio read-only MCP: stdio (npx) or import createServer for HTTP.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ro_catalog OpenFolio RO catalog

Discovery: JSON of all OpenFolio read-only HTTP APIs (path + summary) and the MCP tools. Call this when unsure which RO endpoint exists. Auth is X-API-Key on the server; the MCP process already has the key. No inputs.

ro_holdings Broker holdings

Current broker holdings from OpenFolio RO GET /api/external/ro/holdings: symbol, quantity, cost, market value, PnL per Longbridge/Futu/IBKR. No credentials or webhooks. Use for "现在仓位/持仓怎样". No inputs.

ro_grid Percent-grid positions

All %-grid positions with performance from GET /api/external/ro/grid (webhook_url stripped). Use for 网格赚了没 / 哪些网格开着. One grid's trades/chart are HTTP-only (see ro_catalog). No inputs.

ro_grid_sweeps Portfolio grid sweep

Portfolio 30-day %-grid param sweep from GET /api/external/ro/grid/sweeps (same engine as 组合扫参). Best trigger/callback, grid PnL, in_holdings, last price. Not live grids (use ro_grid). No candles/fills. Needs token capability grid. No inputs.

ro_logs Server logs

OpenFolio GET /api/external/ro/logs. Must pass module (e.g. grid, scheduler, fetcher) or search (substring in message/data). Default 50 rows, max 100. Use for 查某某报错/最近日志. Do not call with empty filters.

ParameterTypeDescription
levelstringFilter by log level
limitintegerRow cap, default 50
modulestringLog module, e.g. grid, scheduler, fetcher
offsetintegerPagination offset
searchstringSubstring match on message or data JSON

ro_calendar FJ economic calendar

OpenFolio FJ economic calendar from GET /api/external/ro/calendar (calendar_events). Default next 2 days, min_importance 0 (keeps low-ImpID US CPI-like rows; include_us_macro keeps them even when min_importance is raised). event_types: economic,earnings,other. Needs feeds. Prefer this over scraping FinancialJuice.

ParameterTypeDescription
daysintegerUpcoming days from now when from/to omitted; default 2
event_typesstringComma list: economic,earnings,other; omit = all
fromstringISO start (UTC); overrides days
include_us_macrobooleanKeep US CPI/NFP/FOMC-like titles when min_importance > 0; default true
limitintegerRow cap, default 200
min_importanceintegerEconomic floor 0–3; default 0
tostringISO end (UTC); overrides days

ro_fj_news FJ headlines

OpenFolio FinancialJuice headlines from GET /api/external/ro/fj-news: id, headline, headline_cn, category, source, published_at. Default 10, max 50. Needs feeds. Prefer this over scraping FinancialJuice.

ParameterTypeDescription
limitintegerRow cap, default 10

ro_mrmc MRMC dip/sell signals

OpenFolio MRMC stored alerts only. Returns watchlist (symbols + configured TFs) and DXDX/DBJGXC rows the scheduler already wrote. Scan is every 10 min during US regular + extended hours (weekly TF skipped). No live quote scan. .vix/VIX → .VIX.US. type=buy is dip. Codex: poll this; notify when alerts.total increases or a new bar_time appears.

ParameterTypeDescription
limitintegerAlert cap, default 50
offsetintegerPagination offset
symbolstringTicker; .vix / VIX / .VIX.US all work
timeframestring日/D/小时/60/2h/4h/30/15/周. Maps to stored TF keys
typestringbuy = DXDX dip, sell = DBJGXC