About Portfolio MCP
Portfolio MCP is an MCP server published by Satsuj1n in the Scraping category: a reusable Model Context Protocol server for exposing structured portfolio and professional information to AI assitants. Conduid read 19 tools from its source: calculate_allocation_drift, calculate_mwr, calculate_twr, get_advisor_profile, get_cash_flows, get_crypto_quote and 13 more. No package is published for it, so it installs from a source checkout.
The repository has 12 stars and 1 forks, and its last commit was on 31 May 2026. Conduid has no tagged release on record for it. Its topics include scraping.
Install
git clone https://github.com/Satsuj1n/portfolio-mcpTools (19)
calculate_allocation_driftCompare current vs target allocation from `~/.xp-mcp/allocation.json`. Returns drift %, BRL delta, and BUY/SELL suggestions per class.calculate_mwrMoney-weighted return (MWR / IRR) via bisection over signed cash flows. Reports converged=false cleanly when no sign change. Requires ≥ 2 imports.calculate_twrTime-weighted return (TWR) over XPerformance imports. Modified Dietz chained — GIPS-compliant for portfolios without daily NAV. Requires ≥ 2 imports.get_advisor_profileRead the saved profile. Returns `exists: false` if not configured.get_cash_flowsList cash flows with optional date/kind filters; returns aggregate totals (aporte/resgate/net) over all matching rows.get_crypto_quoteSpot crypto quotes in BRL via Mercado Bitcoin. Per-ticker partial failure, 15-min cache, outbound-gated. Quote-only (not yet a tracked asset_class).get_dividendsIncome / proventosget_market_dataQuotes / fundamentals from brapi.dev for 1-50 tickers, SQLite-cached. Opt-in.get_portfolio_summaryAggregate stats + declared-vs-computed reconciliation gap. Output now includes a `cash_flow_summary` block (YTD + rolling 12m aporte/resgate aggregates) when cash flows have been imported.get_positionsList positions with quantity, market value, indexer, maturity. Optional class filter.get_transactionsHistory of buys/sellsimport_bank_extract_pdfImport a PDF exported from XP's Conta Digital Extrato. Filters for investment-account transfers only (APORTE/RESGATE). Idempotent.import_extract_csvParse a Posição Consolidada / Extrato CSV. Auto-detects delimiter and column aliases.import_nota_corretagemParse broker-note PDFs for transaction historyimport_xperformance_pdfParse XP's official portfolio PDF (XPerformance). Idempotent on re-import.screen_assetsRank B3 FIIs / stocks / ETFs by DY, P/VP, P/L, ROE, market cap. Opt-in.set_advisor_profileSave the advisor profile (risk, horizon, objective, exclusions, outbound gate, brapi token).set_crypto_positionManually track a crypto holding (`CRIPTO` asset_class). Fetches a live quote, stores a snapshot market value (quantity × price). `quantity: 0` removes it. No cost basis / P&L. Outbound-gated.suggest_buysSuggest BUYs per underweight class using profile objective × asset class matrix (FII/ACAO/ETF). Non-screenable classes (TESOURO/RF/FUNDO) reported in `skipped_classes`. Requires `outbound_enabled=true`.Security checks
6 checks have not been run yet.