openfolio-ro-mcp
Read-only OpenFolio server for discovery, broker holdings, percent-grid positions, and server logs.
ro_catalog: discover all OpenFolio read-only HTTP APIs and MCP tools; no inputs.ro_holdings: get current broker holdings (symbol, quantity, cost, market value, PnL) across Longbridge/Futu/IBKR; no inputs.ro_grid: list all percent-grid positions with performance (webhook URL stripped); no inputs.ro_logs: query server logs by requiredmoduleorsearch, optionallevel,limit(max 100, default 50), andoffset. No orders or live quote scan.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openfolio-ro-mcp show my current holdings across all brokers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
openfolio-ro-mcp
Read-only MCP for OpenFolio. It talks to https://codytang.cn/api/external/ro — you do not clone the app.
Need Node 20+ and an API key. Put the key in OPENFOLIO_RO_KEY.
npx -y openfolio-ro-mcpIf your npm registry is a mirror (e.g. Tencent), point npx at the public registry:
npm_config_registry=https://registry.npmjs.org/
Tools: ro_catalog (what exists), ro_holdings (broker positions), ro_grid (%-grids), ro_grid_sweeps (portfolio 30-day param sweep), ro_calendar (FJ economic calendar), ro_fj_news (FJ headlines), ro_logs (server logs), ro_mrmc (watchlist + stored alerts). No orders. No live quote scan.
Cursor / Claude / CodeBuddy
{
"mcpServers": {
"openfolio-ro": {
"command": "npx",
"args": ["-y", "openfolio-ro-mcp"],
"env": {
"OPENFOLIO_RO_KEY": "<key>",
"OPENFOLIO_ORIGIN": "https://codytang.cn",
"npm_config_registry": "https://registry.npmjs.org/",
"NPM_CONFIG_PREFIX": " "
}
}
}
}NPM_CONFIG_PREFIX (a single space) is a Cursor ENOENT workaround under Cursor.app/.../resources/lib. Omit it if npx already works.
Related MCP server: Psagot remote MCP
Codex
[mcp_servers.openfolio_ro]
command = "npx"
args = ["-y", "openfolio-ro-mcp"]
env = { OPENFOLIO_RO_KEY = "<key>", OPENFOLIO_ORIGIN = "https://codytang.cn", npm_config_registry = "https://registry.npmjs.org/" }OPENFOLIO_ORIGIN 默认就是 https://codytang.cn,可省略;只有打别的主机时才改。
Sweeps
ro_grid_sweeps is the 组合扫参 table: best 30-day trigger/callback, PnL, still-in-portfolio flag. Token needs grid. Live positions stay on ro_grid.
Calendar / FJ news
ro_calendar reads stored FJ calendar_events (default next 2 days, min_importance 0). Token needs feeds. Prefer this over scraping FinancialJuice.
ro_fj_news reads recent FJ headlines (limit 1–50, default 10). Same feeds capability.
Logs
ro_logs requires module or search. Default 50 rows, max 100.
MRMC
ro_mrmc returns the watchlist and stored DXDX/DBJGXC alerts. OpenFolio scans the pool every 10 minutes during US regular + extended hours and writes mrmc_alerts (weekly TF skipped). There is no live compute. .vix → .VIX.US. Token needs mrmc. Codex should poll this and notify on new rows.
Available Tools
4 toolsro_catalogOpenFolio RO catalogA
Discovery: JSON of all OpenFolio read-only HTTP APIs (path + summary) and the four 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.
Inputs: no named parameters.
ro_gridPercent-grid positionsA
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.
Inputs: no named parameters.
ro_holdingsBroker holdingsA
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.
Inputs: no named parameters.
ro_logsServer logsA
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.
Inputs: level, limit, module, offset, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct resource: catalog for discovery, holdings for positions, grid for grid performance, logs for system logs. There is zero overlap in purpose, so an agent can reliably select the right tool.
All tools follow the consistent pattern 'ro_<noun>' (ro_catalog, ro_holdings, ro_grid, ro_logs), making the naming predictable and easy to infer.
With just 4 tools, the set is tightly scoped to the read-only portfolio data domain. Each tool serves a clear, non-redundant purpose, and the count is well within the typical ideal range.
The tools cover the core read-only needs: discovery (catalog), holdings, grid positions, and logs. The catalog provides awareness of additional HTTP-only endpoints, so agents can at least know about them. Minor gap: some read-only data (e.g., individual grid trades) is not directly accessible via MCP, but the presence of the catalog mitigates this.
Related MCP Connectors
Read-only market research: index funds, event cards, CLOB data, fund analytics. No orders.
Read-only market charts, OHLC, backtests and a view of your connected broker accounts
Read-only cited financial datasets, bounded research queries and source diagnostics.
Read-only Fillfolio portfolios, holdings, cash, liabilities, activity, spending and budgets.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables read-only access to Addepar portfolio and ownership data for financial reporting, with transparent provenance caveats and compliance-oriented audit logging.-
- FlicenseNot gradedqualityBmaintenanceEnables MCP clients to securely access read-only Psagot Trade account and market information through authenticated HTTP endpoints. It exposes only read-only tools, with no trade-submission capabilities.-
- FlicenseAqualityCmaintenanceEnables read-only, bounded quantitative-research workflows with schema compatibility checking and server capability discovery, without exposing market data or live trading.1-
- AlicenseNot gradedqualityBmaintenanceEnables authenticated, read-only access to stored account, options, and monitoring data for bounded research. It also permits pausing/resuming monitoring, with no brokerage write or proxy capabilities.MIT