MonarchMoney MCP Server
Enables AI assistants to access and analyze MonarchMoney personal finance data through natural language queries. Provides comprehensive financial insights including account balances, transaction analysis, budget tracking, and spending patterns with enterprise-grade security.
README
MonarchMoney MCP Server
A powerful Model Context Protocol (MCP) server that provides AI assistants with seamless access to MonarchMoney personal finance data. This server dynamically discovers and exposes ALL available methods from the MonarchMoney TypeScript SDK, enabling comprehensive financial data analysis through natural language queries.
🌟 Key Features
🔄 Dynamic Method Discovery
- Automatically discovers ALL functions from the MonarchMoney TypeScript SDK
- 70+ tools available across accounts, transactions, budgets, categories, cashflow, recurring, institutions, and insights
- No hardcoded limitations - if it's in the SDK, it's available as a tool
- Future-proof - automatically includes new methods as the SDK evolves
🚀 Context-Optimized Performance
- 99% size reduction with pre-aggregated summary tools
- Intelligent verbosity levels (brief/summary/detailed)
- Smart natural language parsing for efficient GraphQL queries
- Zero context overflow - maintain long conversations
🎯 One-Click Installation
- MCPB Bundle Format (
.mcpbfiles) for instant deployment - Automated installation with dependency management
- GitHub Releases with ready-to-download bundles
- Zero configuration for standard setups
🔐 Enterprise-Grade Security
- Local credential storage with environment variables
- MFA/TOTP support for two-factor authentication
- Session encryption using AES-256
- No data transmitted to third parties
🎯 Claude Desktop Ready
- Native MCP integration with Claude Desktop
- Real-time data access without API delays
- Natural language queries for complex financial analysis
- Professional query examples and documentation
📦 Quick Install
Option 1: One-Click MCPB Bundle (Recommended)
- Download the latest
.mcpbfile from Releases - Extract and install:
unzip monarchmoney-mcp-v1.0.0.mcpb -d monarchmoney-mcp cd monarchmoney-mcp node install.js - Configure credentials:
cp .env.example .env # Edit .env with your MonarchMoney credentials
Option 2: Manual Installation
git clone https://github.com/keithah/monarchmoney-ts-mcp.git
cd monarchmoney-ts-mcp
npm install
npm run build
⚙️ Claude Desktop Configuration
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\\Claude\\claude_desktop_config.json
Linux: ~/.config/claude-desktop/claude_desktop_config.json
{
"mcpServers": {
"monarchmoney": {
"command": "node",
"args": ["/full/path/to/monarchmoney-ts-mcp/dist/index.js"],
"env": {
"MONARCH_EMAIL": "your-email@example.com",
"MONARCH_PASSWORD": "your-password",
"MONARCH_MFA_SECRET": "your-mfa-secret-key"
}
}
}
}
🛠️ Available Tools (70+ Operations)
The MCP server dynamically exposes ALL methods from the MonarchMoney SDK with intelligent context optimization:
🎯 Context-Optimized Summary Tools (Ultra-compact responses)
insights_getQuickStats- One-line financial overview ("💰 $52,345 • ⬇️ -$3,200 • 📊 14 accounts")spending_getByCategoryMonth- Top spending categories summaryaccounts_getBalanceTrends- Account balance trends summarytransactions_smartQuery- Natural language transaction search ("last 3 Amazon charges")cashflow_getSummaryLine- Income vs expenses one-liner
📊 Account Management (15+ tools)
accounts_getAll- All accounts with verbosity control (brief/detailed)accounts_getById- Specific account detailsaccounts_getBalanceHistory- Balance trends over timeaccounts_getNetWorthHistory- Net worth progressionaccounts_updateAccount- Modify account settingsaccounts_createManualAccount- Add manual accountsaccounts_deleteAccount- Remove accountsaccounts_getAccountGroups- Account groupingsaccounts_setAccountGroup- Organize accountsaccounts_getAccountSubtypes- Account type detailsaccounts_getHoldings- Investment holdingsaccounts_getHoldingDetails- Individual holding infoaccounts_refreshAccount- Force account syncaccounts_getCredentials- Account connection statusaccounts_updateCredentials- Fix connection issues
💳 Transaction Operations (25+ tools)
transactions_getTransactions- Filtered transaction searchtransactions_getTransactionDetails- Complete transaction infotransactions_createTransaction- Add new transactionstransactions_updateTransaction- Edit transactionstransactions_deleteTransaction- Remove transactionstransactions_bulkUpdateTransactions- Batch modificationstransactions_getTransactionRules- Automation rulestransactions_createTransactionRule- Set up auto-categorizationtransactions_updateTransactionRule- Modify rulestransactions_deleteTransactionRule- Remove rulestransactions_getTransactionSplits- Split transaction detailstransactions_createTransactionSplit- Split transactionstransactions_updateTransactionSplit- Modify splitstransactions_deleteTransactionSplit- Remove splitstransactions_getTransactionTags- Transaction tagstransactions_addTransactionTag- Tag transactionstransactions_removeTransactionTag- Remove tagstransactions_getReceipts- Transaction receiptstransactions_uploadReceipt- Add receipt imagestransactions_deleteReceipt- Remove receiptstransactions_categorizeTransaction- Auto-categorizetransactions_getTransactionsByAccount- Account-specific transactionstransactions_getTransactionsByCategory- Category filteringtransactions_getTransactionsByMerchant- Merchant filteringtransactions_searchTransactions- Text search
💰 Budget Management (12+ tools)
budgets_getBudgets- All budget informationbudgets_createBudget- Create new budgetsbudgets_updateBudget- Modify existing budgetsbudgets_deleteBudget- Remove budgetsbudgets_getBudgetSummary- Budget vs actual performancebudgets_getBudgetByCategory- Category-specific budgetsbudgets_setBudgetAmount- Update budget amountsbudgets_getBudgetHistory- Budget changes over timebudgets_getBudgetVariance- Over/under spending analysisbudgets_rolloverBudget- Budget period transitionsbudgets_getBudgetAlerts- Budget notificationsbudgets_setBudgetAlert- Configure budget warnings
🏷️ Category Organization (10+ tools)
categories_getCategories- All transaction categoriescategories_createCategory- Add new categoriescategories_updateCategory- Modify categoriescategories_deleteCategory- Remove categoriescategories_getCategoryGroups- Category hierarchiescategories_setCategoryGroup- Organize categoriescategories_getCategoryRules- Auto-categorization rulescategories_setCategoryIcon- Visual customizationcategories_getCategorySpending- Spending by categorycategories_mergCategories- Combine categories
💸 Cashflow Analysis (8+ tools)
cashflow_getCashflowSummary- Income vs expenses overviewcashflow_getCashflowWidget- Dashboard visualization datacashflow_getIncomeStreams- All income sourcescashflow_getExpenseStreams- All expense categoriescashflow_getCashflowByMonth- Monthly cashflow trendscashflow_getCashflowByCategory- Category breakdowncashflow_getAverageCashflow- Historical averagescashflow_forecastCashflow- Future projections
🔄 Recurring Transactions (7+ tools)
recurring_getRecurringStreams- All recurring itemsrecurring_createRecurringStream- Set up new recurringrecurring_updateRecurringStream- Modify recurring itemsrecurring_deleteRecurringStream- Remove recurringrecurring_getRecurringByCategory- Category-based recurringrecurring_pauseRecurringStream- Temporarily disablerecurring_resumeRecurringStream- Re-enable recurring
🏦 Institution Management (6+ tools)
institutions_getInstitutions- All connected banksinstitutions_getInstitutionAccounts- Institution-specific accountsinstitutions_addInstitution- Connect new banksinstitutions_updateInstitution- Modify connectionsinstitutions_removeInstitution- Disconnect banksinstitutions_refreshInstitution- Force sync
📈 Advanced Insights (8+ tools)
insights_getNetWorthHistory- Wealth tracking over timeinsights_getSpendingByCategory- Detailed spending analysisinsights_getIncomeVsExpenses- Comprehensive income analysisinsights_getSpendingTrends- Spending pattern analysisinsights_getIncomeTrends- Income pattern analysisinsights_getTopMerchants- Most frequent vendorsinsights_getUnusualSpending- Anomaly detectioninsights_getMonthlyComparison- Month-over-month analysis
👤 User & Profile
get_me- Current user information and preferences
🧠 Smart Context Management
Verbosity Levels
Control response detail level to optimize context usage:
brief- Essential info only (account names, balances)summary- Key metrics with some detaildetailed- Complete information (default)
// Example: Get accounts with minimal context usage
{ "verbosity": "brief" }
// Output: "💰 Checking: $5,234 • Savings: $15,678 • Credit: -$1,234"
Natural Language Transaction Queries
Intelligent parsing converts natural language to optimized GraphQL:
- "last 3 Amazon charges" →
{ limit: 3, merchantContains: "amazon" } - "spending over $100 this month" →
{ minAmount: 100, startDate: "2024-01-01" } - "top 5 restaurant expenses" →
{ limit: 5, categoryContains: "restaurant", orderBy: "amount" }
Performance Metrics
- 85% reduction in standard responses through smart formatting
- 99% reduction with pre-aggregated summary tools
- Zero context overflow - maintain conversations indefinitely
- Sub-100 character responses for quick stats
💬 Example Queries
Once configured with Claude Desktop, you can ask:
Ultra-Quick Queries (uses summary tools):
- "Give me a quick financial overview" → One-line summary
- "Where did I spend the most this month?" → Top 5 categories
- "How are my account balances trending?" → Trend summary
Smart Transaction Searches:
- "Show me my last 3 Amazon charges"
- "Find all restaurant spending over $50 this month"
- "What were my largest transactions last week?"
- "Show me all Starbucks purchases this year"
Account Analysis:
- "What's my current net worth across all accounts?"
- "Show me the balance history for my checking account"
- "Which investment accounts have grown the most this year?"
- "Get brief overview of all my accounts"
Transaction Insights:
- "Find all transactions over $500 from last month"
- "Show me my restaurant spending trends over the past 6 months"
- "What are my largest recurring expenses?"
- "Categorize my uncategorized transactions"
Budget Management:
- "How am I performing against my monthly budget?"
- "Which categories am I consistently overspending in?"
- "Show me budget vs actual for each category this quarter"
- "Set up a budget alert for dining expenses"
Financial Planning:
- "What's my average monthly cashflow?"
- "Compare my spending patterns: this year vs last year"
- "Show me my net worth growth over the past 2 years"
- "Forecast my cashflow for next month"
🔧 Development
Build and Test
npm run build # Compile TypeScript
npm test # Run tests
npm run bundle # Create MCPB bundle
npm start # Start MCP server
Project Structure
monarchmoney-ts-mcp/
├── src/
│ └── index.ts # Main MCP server with dynamic discovery
├── scripts/
│ └── create-mcpb.js # MCPB bundle creation
├── .github/workflows/
│ └── release.yml # Automated releases
├── examples/
│ └── query-examples.md # Query examples
├── bundle.json # MCP bundle metadata
├── INSTALLATION.md # Detailed setup guide
└── README.md # This file
🏗️ Architecture
Dynamic Method Discovery
The MCP server uses runtime reflection to discover all available methods:
// Automatically discovers all API modules and methods
const apiModules = [
{ name: 'accounts', client: this.monarchClient.accounts },
{ name: 'transactions', client: this.monarchClient.transactions },
// ... all modules
];
// Dynamically creates MCP tools for each method
apiModules.forEach(({ name: moduleName, client }) => {
const methodNames = Object.getOwnPropertyNames(Object.getPrototypeOf(client))
.filter(name => typeof client[name] === 'function');
// Create tools for each method...
});
Smart Parameter Handling
Automatically generates appropriate input schemas based on method names:
// Transaction methods get comprehensive filtering options
if (methodName.includes('Transactions')) {
return {
properties: {
limit: { type: 'number', description: 'Maximum results' },
startDate: { type: 'string', description: 'Start date (YYYY-MM-DD)' },
accountIds: { type: 'array', description: 'Filter by accounts' },
verbosity: { type: 'string', enum: ['brief', 'summary', 'detailed'] },
// ... more filters
}
};
}
Natural Language Query Processing
Converts human language to efficient API calls:
// "last 3 Amazon charges" becomes:
{
limit: 3,
merchantContains: "amazon",
orderBy: "date",
orderDirection: "desc"
}
// "spending over $100 this month" becomes:
{
minAmount: 100,
startDate: "2024-01-01",
endDate: "2024-01-31"
}
Context Optimization Features
Response Formatting (85% reduction):
// Before: Raw JSON (2000+ chars)
{
"accounts": [
{
"id": "123",
"displayName": "Chase Checking",
"balance": { "amount": 5234.56, "currency": "USD" },
"accountType": { "name": "Checking" },
// ... 50+ more fields
}
]
}
// After: Smart formatting (300 chars)
"💰 Accounts Summary:
• Chase Checking: $5,234.56
• Wells Savings: $15,678.90
• AMEX Credit: -$1,234.00
Total Net Worth: $19,679.46"
Pre-aggregated Tools (99% reduction):
// Ultra-compact responses
"💰 $52,345 • ⬇️ -$3,200 • 📊 14 accounts"
"🍽️ $450 • ⛽ $280 • 🛒 $380 (top 3 this month)"
## 🚀 **Release Process**
Releases are **fully automated** via GitHub Actions:
1. **Create a tag**: `git tag v1.0.0 && git push --tags`
2. **GitHub Action triggers** and:
- Runs tests and builds the project
- Creates MCPB bundle automatically
- Publishes GitHub release with downloadable `.mcpb` file
- Includes comprehensive release notes
## 🔒 **Security & Privacy**
- **Local-only processing** - no data sent to external services
- **Encrypted session storage** using industry-standard AES-256
- **Environment-based credential management**
- **MFA support** for enhanced account security
- **Open source** - fully auditable codebase
## 🌍 **Contributing**
1. **Fork** the repository
2. **Create feature branch**: `git checkout -b feature/amazing-feature`
3. **Commit changes**: `git commit -m 'Add amazing feature'`
4. **Push to branch**: `git push origin feature/amazing-feature`
5. **Open Pull Request**
## 📄 **License**
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
## 🙏 **Acknowledgments**
- **MonarchMoney TypeScript SDK**: Built on the comprehensive [monarchmoney](https://npmjs.com/package/monarchmoney) package
- **Inspired by**: [hammem's MonarchMoney Python library](https://github.com/hammem/monarchmoney) and [keithah's enhanced version](https://github.com/keithah/monarchmoney-enhanced)
- **MCP Protocol**: Powered by Anthropic's Model Context Protocol for seamless AI integration
## 📊 **Project Stats**
- **70+ Dynamic Tools** - Complete MonarchMoney API coverage
- **99% Context Reduction** - Pre-aggregated summary tools
- **Smart Query Parsing** - Natural language to GraphQL optimization
- **3 Verbosity Levels** - Brief/Summary/Detailed responses
- **Zero Context Overflow** - Maintain long conversations
- **Zero Hardcoded Methods** - Future-proof dynamic discovery
- **One-Click Installation** - MCPB bundle system
- **Enterprise Security** - AES-256 encryption, MFA support
- **Production Ready** - Comprehensive error handling, logging
- **Fully Automated** - CI/CD pipeline with automated releases
---
**Made with ❤️ for the MonarchMoney community**
*Transform your financial data into actionable insights through natural language with AI assistants.*
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。