pp-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
pp-mcp
An MCP server that gives Claude (or any MCP client) read-only access to your Portfolio Performance file, so you can ask questions like:
"How did my portfolio do this year, and how much of that was dividends?"
"Which position has the worst IRR since I bought it?"
"Show my allocation by region and how much is unclassified."
"List every fee I paid in 2025."
It loads your file with Portfolio Performance's own Java classes, so returns, IRR, cost basis and allocations are the same numbers the app shows. It never writes anything — see SAFETY.md for how it is kept away from your real file.
Unofficial project, not affiliated with Portfolio Performance. Not financial advice.
How your data is handled
The server reads a read-only copy of your file (a replica), never the file you edit in the app.
It runs locally; the server itself does not send your data anywhere.
What the tools return is sent to your AI provider as part of the conversation, like anything else you share with it. Free-text notes stay out of responses unless a tool is asked for them.
Related MCP server: pp-mcp
Requirements
Portfolio Performance installed (tested with 0.87). Its core jar and its bundled Java runtime are used directly, so no separate Java install is needed.
Python 3.11+, built for the same CPU architecture as Portfolio Performance (an Intel Python cannot load an Apple Silicon Java runtime, and vice versa).
Your portfolio saved as XML (
.xml). The binary and encrypted formats are not supported.
Tested on macOS. Linux and Windows install layouts are detected, but have not been tested yet — reports welcome.
Install
git clone https://github.com/MaxvanderLinden/portfolio_performance_mcp.git
cd portfolio_performance_mcp
python3 -m venv .venv
./.venv/bin/pip install -e .Make a replica of your file
PP_LIVE_FILE="/path/to/your/portfolio.xml" ./scripts/refresh-replica.shThis copies your file to ~/pp-mcp/replica/portfolio.xml and makes the copy read-only. Re-run it
after saving in the app to pick up your changes; the server reloads the replica automatically,
no restart needed. (On Windows, copy the file yourself and mark the copy read-only.)
Check that it loads and that the totals match the app:
./.venv/bin/python -m pp_mcpConnect it to Claude
Claude Code:
claude mcp add portfolio -- "$PWD/.venv/bin/pp-mcp"Claude Desktop — add this to claude_desktop_config.json (Settings → Developer → Edit Config),
using the absolute path to your clone:
{
"mcpServers": {
"portfolio": {
"command": "/absolute/path/to/portfolio_performance_mcp/.venv/bin/pp-mcp"
}
}
}Add an "env": {...} block to that entry if you need any of the settings below.
Configuration
variable | default | meaning |
|
| the replica the server reads |
| macOS | the Portfolio Performance install |
| unset | a Java 21+ runtime, used only if none is bundled with Portfolio Performance |
| none (required) | your real file; read by |
| unset | set to |
|
| where |
The server refuses to start on a writable PP_FILE. That catches the dangerous mistake of
pointing it at your real file instead of the replica.
Tools
tool | returns |
| securities with latest price, |
| current cash balances / market values |
| every position and account with share of total, optionally on a past date |
| filtered by security, account, portfolio, type, date range; a buy or sell is one row with both its portfolio and cash account |
| history plus the latest quote, with a summary of the full range |
| classification schemes and the breakdown by one |
| TTWROR, annualized, IRR, max drawdown, volatility for a period and scope |
| the waterfall: initial value, capital gains, earnings, fees, taxes, final value |
| per-security IRR, TTWROR, realized/unrealized gains, dividends, cost |
| dividend income in the base currency, grouped by year or security |
| the TTWROR curve, sampled monthly/weekly/daily |
Periods accept aliases (1M, 3M, 6M, 1Y, 3Y, 5Y, YTD, MTD, QTD, MAX),
a calendar year (2025), a range (2024-01-01..2024-12-31), or Portfolio Performance's own codes
(L1Y0, D30, T30, S2020-01-01); responses echo the resolved dates.
Rates are fractions: 0.223 is 22.3%. irr and ttwror_annualized are annualized; ttwror is
cumulative over the period. Scopes: client, portfolio, account, security, classification.
Every tool is marked read-only. Large responses are capped and say so (truncated,
total_matching), so narrow with date ranges rather than raising limit.
Staged writes (optional, in development)
A second server, pp-write, adds tools that add records (prices, transactions, …). It never
touches your real file or the replica: every change goes into a staged copy in
~/pp-mcp/staged/ (PP_STAGED_DIR), checked by reloading it with Portfolio Performance's own
classes. Once something is staged, its read tools show the staged copy.
When you are happy with the changes, quit Portfolio Performance and promote them yourself:
PP_LIVE_FILE="/path/to/your/portfolio.xml" ./scripts/promote-staged.shIt refuses if the app is running (or if it cannot tell) or if your file changed since the
replica was taken, asks for confirmation at the terminal, backs up your file, and refreshes the
replica. On Windows, run it from Git Bash or WSL; that path is untested so far. Register pp-write
only while you are editing (claude mcp add portfolio-write -- "$PWD/.venv/bin/pp-write"), and
read SAFETY.md first.
tool | does |
| adds prices to one security for dates that have none; refuses if any date already has one |
|
|
| a new security (name, currency, optional ISIN / ticker / WKN); refuses one whose ISIN, ticker or name is already taken |
| a trade in one portfolio, settled on its reference account (or |
| a dividend on an account ( |
| moves cash between two accounts in the same currency |
| moves shares between two portfolios |
| shares in or out of a portfolio without cash ( |
| a new category in a taxonomy, at the top level or under a |
| puts a |
| what is staged, and whether it can still be promoted |
| moves the staged copy to |
Write tools match securities and accounts exactly (UUID, ISIN, ticker or full name), never by a
fragment, refuse future dates, and refuse a likely duplicate unless allow_duplicate. Every
change must also pass Portfolio Performance's own consistency checks (the ones the app runs when
it opens a file) before it is staged. Existing records, weights included, are never changed.
Troubleshooting
message | fix |
| run |
|
|
| set |
| usually a Python/Java architecture mismatch; use a Python built for the same architecture as Portfolio Performance, or set |
| the file is not downloaded yet; open it in Finder, or run the |
Development
See CONTRIBUTING.md for tests, the demo portfolio and design notes.
License
MIT — see LICENSE. This project loads the Portfolio Performance core jar from your own installation at runtime and does not redistribute it.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your real net worth, spending, transactions, budgets and portfolio from any MCP client.
Read-only Fillfolio portfolios, holdings, cash, liabilities, activity, spending and budgets.
Read-only MCP server over the developer docs for the portfolio's JSON API, MCP, A2A and NLWeb.
Read-only crypto and traditional portfolio: holdings, PNL, FIFO tax figures and market data.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes personal-finance tools like accounts, transactions, spending analysis, budgets, bills, reminders, portfolio, and goals via MCP, enabling any MCP client to query financial data.-
- AlicenseNot gradedqualityCmaintenanceA read-only MCP server that provides filtered account and portfolio data from Portfolio Performance .portfolio files to generate reports.10MIT
- AlicenseAqualityDmaintenanceEnables read-only access to Finary portfolio data, including profiles, organizations, institution connections, portfolios, and transactions, through MCP.5MIT
- AlicenseBqualityCmaintenanceEnables read-only access to Questrade accounts, portfolios, market data, transactions, technical analysis, and order history through MCP.1128 npmMIT