Investment Statement MCP Server
Parse and query investment statements from multiple institutions (Questrade, Interactive Brokers, Scotia) using natural language or structured queries. Supports semantic search for dividends, holdings, transactions, and account balances with hybrid SQLite and vector database storage.
README
Investment Statement MCP Server
Parse and query investment statements from multiple institutions using natural language.
Features
- Multi-Institution Support: Currently supports Questrade (Interactive Brokers and Scotia coming soon)
- Hybrid Storage: SQLite for structured queries + LanceDB for semantic search
- Natural Language Queries: Ask questions like "What were my dividends in Q3?" or "Show my SPY holdings"
- Structured Tools: Programmatic access via MCP tools
- Archive Management: Keeps original PDFs and parsed JSON for reference
Installation
# Install dependencies
pip install -e ".[dev]"
Configuration
The server is configured via .mcp.json. Key environment variables:
LANCEDB_PATH: Vector database location (default:./data/lancedb)SQLITE_PATH: SQLite database location (default:./data/statements.db)PDF_ARCHIVE_PATH: Original PDF storage (default:./data/pdfs)JSON_ARCHIVE_PATH: Parsed JSON storage (default:./data/json)MODEL_NAME: Embedding model (default:all-MiniLM-L6-v2)
Usage
Starting the Server
python -m src.server
Indexing Statements
# Via MCP tool
index_statement("/path/to/statement.pdf")
Querying Data
Natural Language Search:
search_statements("What were my total dividends in 2025?", limit=10)
Structured Queries:
get_holdings_by_symbol("SPY")
get_transactions_by_date("2025-01-01", "2025-09-30")
get_account_balance("51516162", "2025-09-30")
Resources
statements://catalog- List all indexed statementsstatements://{statement_id}- Get specific statementstatements://{statement_id}/summary- Account summarystatements://{statement_id}/holdings- Holdings/positionsstatements://{statement_id}/transactions- Transaction history
Supported Statements
Questrade
- ✅ Account Summary (balances, FX rates, TFSA info)
- ✅ Holdings/Positions (securities with cost basis, P&L)
- ✅ Transactions (trades, dividends, deposits, withdrawals)
Interactive Brokers (Coming Soon)
- ⏳ Planned
Scotia (Coming Soon)
- ⏳ Planned
Development
# Run tests
pytest
# Run tests with coverage
pytest --cov=src --cov-report=html
# Format code
black src tests
# Lint code
ruff check src tests
Architecture
- FastMCP 2.0: MCP server framework
- pymupdf4llm: PDF parsing optimized for LLMs
- LanceDB: Vector database for semantic search
- SQLite: Structured metadata storage
- sentence-transformers: Embedding generation
License
MIT
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.