explaingit

satsuj1n/portfolio-mcp

11TypeScriptAudience · pm founderComplexity · 3/5Setup · moderate

TLDR

A local MCP tool for Claude Desktop that lets you have conversations with your XP Investimentos investment portfolio, import your exported PDF or CSV statements, then ask Claude about holdings, allocation, and bond maturity dates entirely on your own computer.

Mindmap

mindmap
  root((portfolio-mcp))
    What it does
      Portfolio conversations
      Allocation analysis
      Bond maturity tracking
      Rebalancing calculation
    Data sources
      XP Investimentos PDF
      XP Investimentos CSV
      Optional live prices
    Privacy design
      Local database only
      No network calls
      Read-only access
    Setup
      Node.js 20 required
      Claude Desktop config
      One-time import step
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Ask Claude which fixed-income bonds in your XP Investimentos portfolio are maturing in the next 6 months.

USE CASE 2

Compare your current portfolio allocation to a target you define and calculate exactly how much to buy or sell to rebalance.

USE CASE 3

Import your XP Investimentos portfolio export into a local database and query your profit-and-loss summary through Claude Desktop.

Tech stack

TypeScriptNode.jsMCP

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Node.js 20+, Claude Desktop installed and configured, and an XP Investimentos account to export portfolio data as PDF or CSV.

In plain English

This is a tool that lets you have conversations with your investment portfolio using Claude Desktop, the AI chat application from Anthropic. It is specifically built for customers of XP Investimentos, a large Brazilian brokerage, though the README notes that similar setups could work with other brokerages that let you export your data. The way it works: XP already allows you to export your portfolio as PDF or CSV files. You feed those exports into this tool, which reads them, parses them, and stores everything in a local database on your own computer. From that point, when you are chatting in Claude Desktop, Claude can look up your actual holdings and answer questions like which fixed-income bonds are maturing in the next year, how your current allocation compares to a target allocation you define, or what your total portfolio is worth across different asset classes. The design is deliberately local and read-only. Your financial data never leaves your machine. The tool makes no outbound network calls during normal queries (there is an optional, opt-in feature for fetching live market prices from a public API). It cannot place trades or make changes to anything at XP. It communicates with Claude via a standard protocol called MCP (Model Context Protocol), which is how Claude Desktop connects to external data sources. The tool exposes a set of specific capabilities to Claude: importing portfolio PDFs and CSVs, listing positions with details like market value and maturity dates, showing a summary with profit-and-loss figures, comparing your allocation against a target you define and calculating how much you would need to buy or sell to rebalance, and optionally screening assets and suggesting buys for underweighted categories. Installation requires Node.js 20 or later and a one-time configuration step in Claude Desktop's settings file. The demo in the README shows conversations conducted in Portuguese, reflecting its primary audience, though the tool itself works regardless of language.

Copy-paste prompts

Prompt 1
I connected portfolio-mcp to Claude Desktop. How do I import my XP Investimentos CSV export, and what kinds of questions can I ask once the data is loaded?
Prompt 2
Using my portfolio data in portfolio-mcp, compare my current allocation to a target of 60% fixed income, 30% equity, 10% international and tell me what I need to rebalance.
Prompt 3
Which bonds in my portfolio-mcp database mature before December 2025, and what is their combined market value?
Prompt 4
Enable the optional live market prices feature in portfolio-mcp and explain what external API it calls and what data it fetches.
Open on GitHub → Explain another repo

← satsuj1n on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.