Skip to main content
Glama
enpalco

MCP Portfolio Server

by enpalco

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 data

  • ibkr_portfolio.py — fetches and normalizes IBKR portfolio data

  • portfolio_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_portfolio to retrieve normalized eToro holdings

  • Call get_ibkr_portfolio to 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.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables 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
  • A
    license
    -
    quality
    D
    maintenance
    Connects 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
  • F
    license
    -
    quality
    B
    maintenance
    Enables AI agents to query Taiwan stock holdings across multiple brokerages including Fubon, SinoPac, MasterLink, and E.SUN. It provides a standardized interface for accessing portfolio data and brokerage accounts through the Model Context Protocol.
  • F
    license
    -
    quality
    D
    maintenance
    Integrates Interactive Brokers and TradeStation APIs for portfolio management, market data, and trading operations, with TradingView market scanning.

View all related MCP servers

Related MCP Connectors

  • Read-only live access to Australian bank (CDR/open banking) and global brokerage data for AI agents.

  • Connect AI agents to bank accounts, transactions, balances, and investments.

  • Connect your Toro account to AI via Brazil's Open Finance: balances, statements, cards, investments.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/enpalco/mcp-portfolio-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server