Portfolio Tracker & Analyzer with a built-in MCP server

Portfolio Tracker & Analyzer with a built-in MCP server

portfolio-analyzer•byaakash356a

A local-first stock portfolio tracker and Streamlit dashboard that also ships an MCP server letting Claude Desktop query live portfolio holdings, metrics, technicals, news, and SEC filings.

License: MIT•Runtime: Awaiting documentation review•Category: finance crypto

WHAT IT DOES

  • •Exposes eight MCP tools covering portfolio holdings, portfolio metrics, technical analysis, fundamentals, news, SEC filings, breaking news, and stock comparison.
  • •Technical analysis, news, SEC, and comparison tools work for any ticker, not only portfolio holdings.
  • •Portfolio metrics include returns, Sharpe, max drawdown, and beta versus the S&P 500.
  • •Retrieves recent SEC EDGAR filings such as 8-K, 10-K, and 10-Q documents.

BEST FOR

  • •Asking Claude for a full review of a portfolio including winners, losers, and technical setup.
  • •Checking breaking news or SEC filings for current holdings through Claude.
  • •Comparing multiple stocks side by side to see which looks best technically.

ABOUT PORTFOLIO-ANALYZER

Portfolio Tracker & Analyzer with a built-in MCP server is cataloged as an MCP server attributed to aakash356a. A local-first stock portfolio tracker and Streamlit dashboard that also ships an MCP server letting Claude Desktop query live portfolio holdings, metrics, technicals, news, and SEC filings. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Portfolio Tracker & Analyzer with a built-in MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the MCP server need a separate Claude API key?

No; the MCP server uses the Claude Desktop subscription directly and needs no separate key.

Where does the portfolio data come from?

The tracker pulls live prices and data from Yahoo Finance, with a roughly 15-minute delay on the free feed.

Does it store data in the cloud?

No; it runs entirely on the user's machine with no cloud.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 4b76e38b67ba · 采集于 2026-11-13 11:20:05 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Portfolio Tracker & Analyzer

A local-first stock portfolio tracker with a built-in MCP server for Claude Desktop. Talk to Claude naturally — it pulls live prices, technicals, SEC filings, and news from your portfolio without you opening the app.

Python Streamlit MCP License


What is this?

Two tools in one repo:

ToolWhat it does
📊Streamlit web appVisual dashboard: charts, P&L, technicals, AI summaries
🤖MCP serverConnects Claude Desktop to your live portfolio data

No cloud. No subscription beyond your own API keys. Runs entirely on your machine.


MCP Server — Talk to Claude About Your Portfolio

Once connected, just ask Claude:

"Give me a full review of my portfolio this week."
"What's the technical setup for NVDA right now?"
"Any breaking news or SEC filings for my holdings today?"
"Compare GOOGL, META, and AMZN — which looks best technically?"
"What are the upcoming earnings dates for my holdings?"

Claude calls the right tools, fetches live data, and writes the analysis — all using your existing Claude subscription.

8 tools Claude can call

ToolWhat it does
get_portfolioAll holdings: live price, P&L, allocation weight
get_portfolio_metricsReturns, Sharpe, max drawdown, beta vs S&P 500
get_technical_analysisRSI, MACD, SMA 20/50/200, Bollinger Bands, support/resistance
get_fundamentalsValuation ratios, EPS beat/miss history, next earnings date
get_newsLatest headlines from Yahoo Finance + Google News
get_sec_filingsRecent 8-K/10-K/10-Q filings from SEC EDGAR
get_breaking_newsAll fast sources scored by market impact (1–10)
compare_stocksSide-by-side multi-stock comparison

The technical analysis, news, SEC, and comparison tools work for any ticker — not just your portfolio holdings.

MCP Quick Setup

1. Install dependencies

pip install -r requirements.txt

2. Edit the Claude Desktop config

Mac: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "portfolio-analyzer": {
      "command": "python",
      "args": ["/FULL/PATH/TO/portfolio-analyzer/mcp_server.py"]
    }
  }
}

3. Restart Claude Desktop — look for the 🔨 hammer icon in the chat bar.

See MCP_SETUP.md for the full guide including troubleshooting.


Streamlit App

Setup

# 1. Install dependencies (Python 3.9+)
pip install -r requirements.txt

# 2. Add your OpenRouter API key (for AI summaries)
cp .env.example .env
# Edit .env and add your key from https://openrouter.ai/settings/keys

# 3. Run
streamlit run app.py

Open http://localhost:8501 in your browser.

Pages

Dashboard — Total value, cost basis, P&L, allocation pie chart, holdings table

Manage Holdings — Add/remove positions with ticker validation

Stock Analysis — Candlestick chart with SMA/EMA/Bollinger overlays, RSI, MACD, volume, fundamentals, and an AI memo (Claude Sonnet 4.6)

Performance — Portfolio vs S&P 500 (normalized), volatility, Sharpe, drawdown, beta, returns distribution

Summary — Claude Sonnet 4.6 writes a personal investment memo (daily / weekly / monthly) covering winners/losers, SEC events, macro themes, and recommendations

Monitor — Real-time news alerts from SEC EDGAR, Business Wire, PR Newswire, Yahoo, and Google News — scored by market impact


Project Structure

portfolio-analyzer/
├── app.py               # Streamlit app (6 pages)
├── mcp_server.py        # MCP server for Claude Desktop
├── requirements.txt
├── .env.example         # API key template
├── data/
│   ├── portfolio.json   # Your holdings
│   └── summaries/       # Saved AI summaries
└── src/
    ├── analytics.py     # Portfolio metrics & risk
    ├── data_fetcher.py  # yfinance wrapper with caching
    ├── indicators.py    # SMA, EMA, RSI, MACD, Bollinger
    ├── llm.py           # Claude Sonnet 4.6 via OpenRouter
    ├── news_monitor.py  # Multi-source news fetcher + scorer
    ├── portfolio.py     # Load / save / add / remove holdings
    ├── sec_edgar.py     # SEC EDGAR API client
    ├── snaptrade_integration.py  # Auto-import holdings from your brokerage
    └── summary_pipeline.py  # Weekly/daily/monthly memo pipeline

Adding Holdings

There are three ways to get your positions into the tracker. Pick whichever you prefer.

Connect your broker once and import your real positions (shares + cost basis) automatically — no CSVs, no manual typing. Works with Robinhood, Fidelity, Schwab, Vanguard, E*TRADE, Webull, Wealthsimple, and many more.

1. Create a free SnapTrade account Sign up at dashboard.snaptrade.com and verify your email. The free tier gives real brokerage data for a personal account at no cost.

2. Generate an API key in the dashboard — you'll get a Client ID and a Consumer Key.

3. Add them to your .env:

SNAPTRADE_CLIENT_ID=your-snaptrade-client-id
SNAPTRADE_CONSUMER_KEY=your-snaptrade-consumer-key

4. Install the SDK (already included if you ran pip install -r requirements.txt):

pip install snaptrade-python-sdk

5. In the app: open the 🏦 Connect Brokerage tab on the Manage Holdings page → Connect Brokerage. A SnapTrade window opens; log into your broker there. Back in the app, click Check Connection, then 🔄 Sync Holdings to import.

Your broker credentials go directly to SnapTrade and never touch this app. Your SnapTrade user secret is stored locally in data/.snaptrade_user.json (gitignored). Note: SnapTrade provides shares + average cost basis, but not the original lot purchase date, so imported positions use a placeholder date. Your P&L is accurate.

Option 2 — Upload a CSV export

On the Manage Holdings page, use the 📥 Import CSV tab to upload a holdings export from your broker (Robinhood, Fidelity, Schwab, Vanguard, etc.). The app standardizes common brokerage CSV formats automatically.

If your broker's CSV isn't supported: You can easily generate the portfolio.json file using any AI assistant (like Claude or ChatGPT). Just attach your CSV and ask it to "Convert my brokerage CSV into this JSON format:".

Option 3 — Manual entry / edit the file

Use the 🟢 Buy / 🔴 Sell tabs on the Manage Holdings page, or edit data/portfolio.json directly:

{
  "holdings": [
    {
      "ticker": "AAPL",
      "shares": 10,
      "purchase_price": 150.0,
      "purchase_date": "2024-01-15"
    }
  ]
}

Indicator Cheat-Sheet

IndicatorWhat it tells you
SMA / EMATrend direction. Price above MA = uptrend. SMA 50/200 cross = "golden/death cross".
RSI (14)Momentum. >70 overbought, <30 oversold.
MACDMomentum + trend. Histogram crossing zero = momentum shift.
Bollinger BandsVolatility envelope. Near upper = stretched up; near lower = stretched down.
Sharpe RatioReturn per unit of risk. >1 good, >2 great. Uses 4% risk-free rate.
Max DrawdownLargest peak-to-trough loss.
Beta vs SPYMarket sensitivity. >1 = more volatile than S&P 500.

Notes

  • Yahoo Finance data has a ~15 min delay on the free feed.
  • API responses are cached for 5 min to avoid rate-limit issues.
  • Performance history assumes you held current share counts for the full selected period — it's a "how would my current book have done?" view, not a true time-weighted return.
  • AI features require an OpenRouter API key. The MCP server uses your Claude Desktop subscription directly (no separate key needed).
  • Not investment advice.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Portfolio Tracker & Analyzer with a built-in MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/portfolio-analyzer)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related finance crypto MCP Servers

Alternative and complementary servers in the same category

View all in finance crypto →
USA Spending MCP Server
usaspending-mcp-server•thsmale

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

Repository stats unavailable
Finance & Analytics
Fortnox MCP server — More AI
more-ai-chatgpt-claude-mcp-fortnox•amor3

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

0
Finance & Analytics

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.

Repository stats unavailable
Finance & Analytics