akapal-mcp-portfolio
MCP server exposing portfolio and brokerage data through SSE transport, with tools for account summaries, holdings, quotes, market data, and order previews, backed by mock data with live quote fallback.
README
akapal-mcp-portfolio
MCP server that exposes portfolio and brokerage data through Model Context Protocol tools over SSE transport.
Data is currently backed by mock brokerage data (StaticBrokerageService). Live quotes are attempted first via LiveMarketService (yfinance) with automatic fallback to mock data when the live source is unavailable. A real E*TRADE API connection is planned as the next step.
Features
- SSE transport on port
8080(configurable viaPORT), binds to0.0.0.0 - Mock brokerage data — balances, holdings, sector allocation, quotes, market summary, FAQ
- Live quote fallback — real-time quotes when available, mock otherwise
- Order preview — estimates the portfolio impact of a buy/sell order without placing it
- Concentration analysis — flags positions exceeding a 15% threshold
- Keyword search — queries brokerage data and lists public financial sources (Yahoo, Bloomberg, Reuters, Morningstar, SEC)
Requirements
- Python 3.11+
Installation
pip install .
For development:
pip install -e .
Usage
Start the server:
python -m akapal_mcp_portfolio.app
Or via Docker:
docker build -t akapal-mcp-portfolio .
docker run -p 8080:8080 akapal-mcp-portfolio
The server listens on http://0.0.0.0:8080 and serves the MCP SSE endpoint. Point an MCP client (e.g. Claude Desktop, IDE MCP config) at it to discover and call the tools.
Configuration
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
HTTP port for the SSE server |
Tools
| Tool | Description |
|---|---|
get_account_summary |
Active account balances and portfolio performance summary |
get_portfolio_holdings |
All holdings with allocation and performance fields |
get_sector_allocation |
Portfolio allocation by sector |
get_quote(symbol) |
Current quote for a symbol; live first, mock fallback |
get_market_summary |
Market index summary data |
get_faq(query) |
Mock support FAQ entries, optionally filtered by text |
search_financial_info(query, source) |
Keyword search over broker data and public sources |
preview_order_impact(symbol, quantity, side) |
Estimate mock order impact without placing it (side must be BUY or SELL) |
get_concentration_analysis |
Positions exceeding the 15% concentration threshold |
Project Structure
akapal_mcp_portfolio/
├── app.py # FastMCP server, SSE transport, tool definitions
├── models/ # Dataclasses for account, holdings, quote, market, etc.
└── services/
├── static_brokerage_service.py # Mock brokerage data
└── live_market_service.py # Live quotes (yfinance) with fallback
Roadmap
- Connect real E*TRADE API for live brokerage data
- Wire up live financial-news retrieval for the public sources in
search_financial_info
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.