Skip to main content
Glama
RugSec

Portfolio Analytics MCP

by RugSec

Portfolio Analytics MCP

CI Python 3.12 License: MIT

Ask Claude about your investments in plain language. This is an MCP server that gives Claude (or any MCP client) read-only tools for market data and portfolio analysis: prices, FX, ETF costs and exposure, and risk for a whole portfolio of stocks and ETFs, measured in your own currency.

It is built for European investors as much as US ones: it understands ISINs, UCITS ETFs listed on several exchanges, and prices quoted in pence.

What you can ask

"I hold 30k EUR of IE00B4L5Y983, 10 ASML.AS and 25 AAPL. How volatile is this portfolio, and which position contributes most to the risk?"

"Compare the costs of the iShares Core MSCI World and the Vanguard FTSE All-World. Which is cheaper and bigger?"

"How much of my ETF portfolio is in US tech stocks? Do my ETFs overlap?"

"What has VWCE returned since 2021 in euros, compared with the S&P 500?"

Claude picks the right tools, fetches the data and explains the result.

Related MCP server: Financial Risk MCP Server

What's inside

Area

What it gives you

Data source

Portfolio

Risk and return of a mixed portfolio in one currency: volatility, drawdown, beta, risk per position

Yahoo Finance + justETF

ETFs

Costs (TER), fund size, country/sector/stock exposure, listings, similar funds, portfolio look-through

justETF

Markets

Price history, quotes, FX rates, performance statistics, correlations, dividends

Yahoo Finance

20 tools in total, all read-only. No API key or account needed. See the user guide for the full list.

Quickstart

You need uv and Python 3.12.

1. Install

git clone https://github.com/RugSec/portfolio-analytics-mcp.git
cd portfolio-analytics-mcp
uv sync

2. Connect it to Claude

Claude Code:

claude mcp add finance -- /absolute/path/to/portfolio-analytics-mcp/.venv/bin/python -m finance_mcp

Claude Desktop: add this to claude_desktop_config.json, then restart the app. On Windows use .venv\\Scripts\\python.exe.

{
  "mcpServers": {
    "finance": {
      "command": "/absolute/path/to/portfolio-analytics-mcp/.venv/bin/python",
      "args": ["-m", "finance_mcp"]
    }
  }
}

3. Ask a question, for example "What is the TER of IE00B4L5Y983?"

Want to run it as a shared remote server instead? See Remote deployment.

Important to know

  • Not financial advice. The tools report data and statistics; past performance does not predict future results.

  • Personal use only. Yahoo Finance (through the unofficial yfinance library) and justETF are third-party sites. This server makes polite, on-demand requests (rate-limited and cached) and is not meant for bulk downloads or redistributing their data. Check their terms before using it.

  • Quotes can be delayed by up to ~20 minutes, and Yahoo's coverage of European ETF holdings is patchy (the justETF tools fill that gap).

Learn more

  • User guide: every tool, example workflows, configuration, remote deployment and limitations.

  • Contributing: development setup, tests and project layout.

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables read-only querying of JTX Markets account and market data, including balance, positions, orders, trades, funding history, and market summaries, through natural language in MCP-compatible clients.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides real-time financial market lookups (stock quotes, volume, P/E ratios) and deterministic portfolio risk (VaR) calculations as standardized MCP endpoints for AI assistant integration.
    -
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables natural-language financial research across SEC filings, earnings transcripts, financial metrics, stock and crypto market data, stock news, and prediction markets, returning structured, source-backed answers within MCP clients.
    -