FinChat
Enables AI agents to manage personal finances through MCP tools for transaction management, spending analytics, and goal tracking.
README
FinChat - MCP-Powered Personal Finance Assistant
FinChat is an AI-powered personal finance assistant built using the Model Context Protocol (MCP). It exposes financial management and analytics capabilities as reusable tools that can be discovered and executed by MCP-compatible AI clients.
The project demonstrates how Large Language Models (LLMs) can interact with external systems through structured tools to perform tasks such as transaction management, spending analysis, financial insights generation, and savings goal tracking.
Note: This project currently uses synthetic/dummy financial data for demonstration purposes. It does not connect to real bank accounts or personal financial information.
✨ Features at a Glance
- Transaction Management – Add, retrieve, and query financial transactions
- Spending Analytics – Analyze spending by category and generate financial insights
- Goal Tracking – Set, update, and monitor progress toward savings goals
- MCP Integration – Discover and execute tools through standardized protocol
- AI-Ready – Works seamlessly with MCP-compatible AI clients (Claude, Cursor, etc.)
🚀 Project Overview
Traditional chatbots can answer questions but often lack access to user-specific data and external capabilities.
FinChat addresses this by providing an MCP server that exposes financial tools to AI agents. Instead of hardcoding every workflow, the AI agent can understand user requests, select the appropriate tool, execute it, and generate meaningful responses.
Example User Interaction:
User: "How much did I spend on groceries in July?"
Agent Workflow:
User Request → AI Agent → MCP Tool Discovery →
get_spending_summary() → Financial Analysis → Response
🏗️ Architecture
User Input
|
▼
MCP-Compatible AI Client
(Claude / Cursor / Agent)
|
▼
MCP Protocol
|
▼
FinChat MCP Server
|
┌───────┼───────┐
▼ ▼ ▼
Transactions Analytics Goals
| | |
└───────┼───────┘
▼
Financial Data Storage
(Synthetic JSON)
🔌 Why Model Context Protocol (MCP)?
MCP provides a standardized interface for AI applications to discover and interact with external tools.
Benefits:
- ✓ Standardized tool discovery and execution
- ✓ Structured tool inputs and outputs
- ✓ Separation between AI reasoning and application logic
- ✓ Reusable tools across different AI clients
- ✓ Easier development of agent-based applications
🧠 MCP Server Design
The project follows a clean separation-of-concerns architecture:
mcp_server.py tools/
├─ Register tools ├─ add_transactions.py
├─ Expose schemas ├─ query_transactions.py
└─ Handle I/O ├─ spending_summary.py
├─ financial_insights.py
├─ set_financial_goal.py
├─ update_financial_goal.py
└─ get_goal_progress.py
This keeps the MCP layer independent from the underlying financial logic.
🛠️ Tech Stack
| Category | Technology |
|---|---|
| Protocol | Model Context Protocol (MCP) |
| Framework | FastMCP |
| Language | Python 3.8+ |
| Data Storage | JSON (development), SQLite (planned) |
| IDE | VS Code |
🔌 Available MCP Tools
Transaction Management
add_transactions
Adds financial transactions into the system.
Example:
User: "Add a $50 grocery expense at Walmart today"
get_transactions
Retrieves stored financial transactions with filtering capabilities.
Example queries:
- "Show my transactions from July"
- "Show all restaurant expenses"
📊 Spending Analytics
get_spending_summary
Generates spending summaries and category-based analysis.
Example queries:
- "How much did I spend this month?"
- "Show my grocery spending in July"
- "Break down expenses by category"
get_financial_insights
Analyzes spending behavior and generates financial observations.
Example queries:
- "Where am I spending the most?"
- "What expenses can I reduce?"
- "Analyze my spending patterns"
🎯 Financial Goal Management
set_financial_goal
Creates new financial goals.
Example:
User: "I want to save $50,000 by 2028"
Stores:
- Goal name
- Target amount
- Current savings
- Target date
update_financial_goal
Updates an existing financial goal.
Example:
User: "I saved another $5,000 toward my savings goal"
get_goal_progress
Tracks progress toward financial goals.
Example queries:
- "How much progress have I made?"
- "How much do I need to save monthly?"
📂 Project Structure
FinChat/
│
├── mcp_server.py # MCP server entry point
│
├── tools/ # Business logic & calculations
│ ├── add_transactions.py
│ ├── query_transactions.py
│ ├── spending_summary.py
│ ├── financial_insights.py
│ ├── set_financial_goal.py
│ ├── update_financial_goal.py
│ └── get_goal_progress.py
│
├── data/ # Data storage
│ ├── transactions.json
│ └── financial_goals.json
│
├── requirements.txt
├── pyproject.toml
└── README.md
⚙️ Installation & Setup
1. Clone the repository:
git clone <repository-url>
cd FinChat
2. Create and activate virtual environment:
Windows (PowerShell):
python -m venv .venv
.venv\Scripts\activate
macOS/Linux:
python -m venv .venv
source .venv/bin/activate
3. Install dependencies:
pip install -r requirements.txt
▶️ Running the MCP Server
python mcp_server.py
The MCP server runs using stdio transport and communicates with MCP-compatible AI clients.
💡 Quick Usage Example
Once the server is running, connect via an MCP client:
# Example: Query spending by category
user_message = "How much did I spend on groceries in July?"
# Agent discovers available tools → selects get_spending_summary
# → executes with filters → returns analysis
🔐 Data Privacy & Security
Current implementation (development only):
- ✓ Synthetic financial data only
- ✗ No real bank connections
- ✗ No personal financial records
- ✗ No external financial APIs
Production requirements:
- Secure authentication (OAuth 2.0)
- Encrypted data storage
- Database-level access control
- Banking API integrations
- Compliance & regulatory review
⚠️ Current Limitations
- Uses local JSON storage (single-user)
- Designed for demonstration purposes
- Does not connect to banking providers
- Does not provide regulated financial advice
- Requires manually provided transaction data
🔮 Future Improvements
- [ ] Replace JSON with SQLite/PostgreSQL
- [ ] Add multi-user support with authentication
- [ ] Integrate real banking APIs (Plaid, etc.)
- [ ] Build automated savings recommendations
- [ ] Add interactive web dashboard
- [ ] Implement advanced financial planning
- [ ] Add budget forecasting
- [ ] Generate monthly financial reports
👨💻 About This Project
Built as a hands-on exploration of:
- Model Context Protocol (MCP) architecture
- LLM tool integration and function calling
- AI agent design patterns
- Structured data interaction with AI systems
Learning Goals:
- Understand how AI agents discover and execute external tools
- Build production-ready MCP servers
- Design AI-ready application architectures
- Implement secure tool orchestration
📝 License
MIT License
Built as a portfolio project to demonstrate AI/ML capabilities and modern LLM application architecture.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。