Wealthfolio MCP Server
Enables AI-powered portfolio analysis for Wealthfolio, allowing Claude to query and analyze investment holdings, asset allocation, real estate properties, and execute transactions through natural language.
README
Wealthfolio MCP Server
A Model Context Protocol (MCP) server that provides AI-powered portfolio analysis for Wealthfolio through Claude Desktop.
Version 2.0.0 - Production Ready ✅
🚀 Quick Start (3 commands)
git clone <repository-url> WFmcp && cd WFmcp
uv sync
uv run python setup.py # Auto-configures everything
Then restart Claude Desktop. That's it!
✨ Nouveautés v2.0.0
- 🏠 Module Immobilier - 6 nouvelles fonctions pour analyser votre patrimoine immobilier
- 📊 Analyse par comptes - Regroupement par catégories (Investissement, Retraite, etc.)
- 🐛 Corrections majeures - Portfolio summary inclut maintenant l'immobilier
- 🛡️ 100% robuste - Fonctionne avec ou sans addon Real Estate
- 🧪 17 tests - Couverture complète et validation automatique
📚 Documentation:
- 🚀 Quick Start Guide - Démarrage en 5 minutes
- 📋 Changelog - Toutes les nouveautés
- 🔧 Corrections - Bugs corrigés
- 🛡️ Robustness - Guide de robustesse
Overview
This MCP server enables Claude to directly query and analyze your Wealthfolio portfolio data, providing natural language insights into your investments, asset allocation, portfolio performance, and real estate holdings.
14 outils MCP disponibles - Compatible avec ou sans addon Real Estate
Features
Financial Portfolio
- Portfolio Summary: Get total portfolio value and asset allocation breakdown
- Holdings Detail: Detailed list of all financial products with quantities, prices, valuations, gains/losses, and diversification analysis - essential for investment advice
- SQL Queries: Execute custom SELECT queries on your Wealthfolio database
- Natural Language Interface: Ask Claude about your portfolio in plain English
Real Estate Module
- Property Management: Track residential and commercial real estate properties
- Mortgage Analysis: Monitor loans with detailed amortization schedules
- Net Worth Calculation: Combined view of financial assets and real estate
- Property Valuation History: Track property values over time
- Early Payment Simulation: Calculate savings from accelerated mortgage payments
Write Operations
- Create Activities: Add new transactions (buy, sell, dividend, etc.)
- Create Assets: Add new securities to track
- Opening Positions: Bootstrap existing portfolios without manual transaction entry
- Data Import: Bulk import portfolio positions from CSV/Excel
- Database Updates: Execute validated INSERT/UPDATE/DELETE queries
Data Management
- Quote Fetching: Automatically download and update price data from Yahoo Finance
- Batch updates for multiple symbols
- Historical data backfill
- Configurable date ranges and intervals
- Saves time and tokens by automating price updates
Installation
Prerequisites
- Python 3.12 or higher
- uv package manager
- Wealthfolio installed with portfolio data
- Claude Desktop
Automated Setup (Recommended)
The easiest way to install and configure the MCP server:
# 1. Clone the repository
cd ~/dev # or any folder you prefer (Windows: cd C:\Users\YourName\dev)
git clone <repository-url> WFmcp
cd WFmcp
# 2. Install dependencies
uv sync
# 3. Run the setup wizard (auto-detects paths and configures Claude Desktop)
uv run python setup.py
The setup script will:
- ✓ Automatically detect your OS
- ✓ Find your Wealthfolio database
- ✓ Locate Claude Desktop config file
- ✓ Configure everything for you
- ✓ Provide clear next steps
Then just restart Claude Desktop and you're done!
Manual Setup
If you prefer to configure manually, see SETUP.md for:
- Platform-specific paths (Windows/macOS/Linux)
- Complete configuration examples
- Troubleshooting tips
Usage
Once configured, ask Claude questions about your portfolio:
Portfolio Analysis
- "What's my total portfolio value?"
- "Show me my asset allocation"
- "Give me detailed information about all my holdings with current prices and gains"
- "How many accounts do I have?"
- "What are my largest holdings?"
- "Show me recent transactions"
- "Analyze my portfolio diversification and suggest improvements"
Real Estate Analysis
- "Show me all my real estate properties"
- "What's my total net worth including real estate?"
- "List all my mortgage loans"
- "Calculate the amortization schedule for my mortgage"
- "What would happen if I make a 10,000 EUR early payment next month?"
- "What's my loan-to-value ratio?"
- "Show me the valuation history for my Paris apartment"
Quote Management
- "Update the quotes for all my portfolio assets"
- "Fetch the latest prices for AAPL, MSFT, and GOOGL"
- "Download historical quotes for the past 90 days"
- "Update quotes with weekly data for the past year"
Transaction Management
- "Create a buy transaction for 100 shares of AAPL at $150"
- "Add a new asset: Tesla (TSLA) stock"
- "Record a dividend payment of $50 from VTI"
Testing
Run the test suite to verify functionality:
# Test database read operations
uv run python tests/test_database.py
# Test real estate module (read-only)
uv run python tests/test_real_estate.py
# Test write operations (CAUTION: modifies database)
uv run python tests/test_write_operations.py
# Test quote fetching (requires internet connection)
uv run python tests/test_quote_fetching.py
Note: Set the DB_PATH environment variable before running tests, or create a .env file with your database path.
Project Structure
WFmcp/
�� mcp_server.py # Main MCP server implementation
�� tests/
�� __init__.py
�� test_database.py # Database query tests
�� CLAUDE.md # Development guide for Claude Code
�� Roadmap.md # Strategic direction and planned features
�� Backlog.md # Detailed feature backlog and tasks
�� README.md # This file
�� pyproject.toml # Python dependencies
�� .gitignore
Documentation
- CLAUDE.md: Technical documentation for development with Claude Code
- Roadmap.md: High-level strategic direction and quarterly goals
- Backlog.md: Detailed feature backlog with prioritization
- Write Operations Guide: Complete guide to using write operations (create activities, assets, etc.)
- History Reconstruction: Design document for bootstrapping portfolio tracking without complete history
Contributing
Contributions are welcome! Please:
- Check the Backlog.md for open tasks
- Review the Roadmap.md for strategic direction
- Create an issue to discuss significant changes
- Submit pull requests with tests
Security
Data Protection
- Your data never leaves your local machine
- The server communicates with Claude Desktop via stdio (no network access)
- All operations are local to your computer
Write Operation Safeguards
- Validation: All inputs are validated before database writes
- Confirmation Required: Destructive operations require explicit confirmation
- Forbidden Operations: DROP and TRUNCATE commands are blocked
- Account/Asset Checks: Verifies referenced entities exist before creating activities
- Date Validation: Ensures proper date formats
- Rollback on Error: Failed operations don't leave partial data
Best Practices
- Backup Your Database: Before using write operations, backup your Wealthfolio database
- Test First: Use the test suite to verify operations work as expected
- Review Changes: Check data in Wealthfolio after creating activities
- Start Small: Test with a few positions before bulk operations
Read Operations
- SELECT queries with intelligent limits:
- 5000 rows for quotes table (sufficient for 10+ years of daily data)
- 200 rows for other tables
- Results show truncation warning if limit exceeded
- No destructive operations possible with read-only tools
License
[Your chosen license]
Acknowledgments
- Built for Wealthfolio
- Uses Model Context Protocol
- Powered by Claude
Support
For issues or questions:
- Review CLAUDE.md for technical details
- Check existing issues
- Create a new issue with details about your setup and problem
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。