MCP Portfolio Server
Fetches and normalizes investment portfolio data from eToro and Interactive Brokers (IBKR), enabling AI agents to consolidate, aggregate, and visualize holdings across brokers.
README
MCP Portfolio Server
A lightweight MCP server with standalone functions to fetch and normalize investment portfolio data from eToro and Interactive Brokers (IBKR) that saves time consuming effort of importing and extracting portfolio data in spreadsheets.
Overview
This project provides three reusable Python files:
etoro_portfolio.py— fetches and normalizes eToro portfolio dataibkr_portfolio.py— fetches and normalizes IBKR portfolio dataportfolio_mcp_server.py— runs as an MCP server
The files themselves do not automatically aggregate positions across brokers. Instead, their outputs are designed to be easily consolidated and visualized using any agent such as Claude, Gemini, or ChatGPT.
MCP Server
The portfolio_mcp_server.py exposes the eToro and IBKR portfolio functions as MCP tools. When running, it allows AI agents (such as Claude, Gemini, or ChatGPT with MCP support) to:
- Call
get_etoro_portfolioto retrieve normalized eToro holdings - Call
get_ibkr_portfolioto retrieve normalized IBKR holdings
These tools return structured portfolio data (symbol, quantity, market value, unrealized P&L, asset class) that the agent can then use to:
- Merge and deduplicate positions across brokers
- Calculate portfolio-level aggregates (total market value, cost basis, P&L, % allocation)
- Classify assets and generate allocation breakdowns
- Create consolidated tables and visualizations (e.g., donut charts, bar charts)
Because the server only provides the raw normalized data, any further data consolidation, aggregation, or visualisation is performed by the agent using the tool outputs.
Installation
git clone https://github.com/<username>/mcp-portfolio-server.git
cd mcp-portfolio-server
uv sync
Usage
eToro
from etoro_portfolio import get_etoro_portfolio
portfolio = get_etoro_portfolio()
IBKR
from ibkr_portfolio import get_ibkr_portfolio
portfolio = get_ibkr_portfolio()
MCP Server
mcp dev portfolio_mcp_server.py
Configuration
Store credentials in a .env file (excluded from the repository):
ETORO_PUBLIC_KEY=your_public_key
ETORO_PRIVATE_KEY=your_private_key
IBKR_TOKEN=your_flex_token
QUERY_ID=your_query_id
License
MIT License
Disclaimer
This project is for personal/educational use and is not affiliated with eToro or Interactive Brokers.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.