MCP Portfolio Server
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., "@MCP Portfolio ServerGet my eToro and IBKR portfolios and merge them"
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.
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.
Related MCP server: IB Portfolio Tracker MCP Server
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 holdingsCall
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 syncUsage
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.pyConfiguration
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_idLicense
MIT License
Disclaimer
This project is for personal/educational use and is not affiliated with eToro or Interactive Brokers.
This server cannot be deployed
Maintenance
Related MCP Connectors
Unified financial infrastructure connecting AI agents directly to trade live/demo brokerage accounts, Web3 non-custodial wallets, real-time market data across equities, ETFs, crypto, forex, options, DeFi swaps, and prediction markets, institutional research feeds, and algorithmic strategy backtesters.
Stocks, crypto, FX, and portfolio math in one tool — no per-source API juggling.
Agentic brokerage access to a US brokerage account: quotes, orders, positions, cash and documents.
Connect your portfolio to Claude, ChatGPT, or Codex to analyze it and make smarter investments.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI clients to track investment portfolios by retrieving positions, calculating profit and loss, and refreshing price data via Yahoo Finance. It allows users to monitor overall performance and query specific ticker details through natural language interactions.4-
- AlicenseNot gradedqualityDmaintenanceConnects Claude AI to Interactive Brokers accounts to enable real-time portfolio tracking, position management, and historical market data retrieval. It also integrates financial news and sentiment analysis from multiple sources, including Finnhub and IB native feeds.MIT
- FlicenseNot gradedqualityDmaintenanceIntegrates Interactive Brokers and TradeStation APIs for portfolio management, market data, and trading operations, with TradingView market scanning.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage Trading212 brokerage accounts, including portfolio analysis, order placement (demo mode), and investment pie management.5MIT