Pocketsmith MCP Server
Enables AI assistants to interact with the Pocketsmith personal finance API to manage accounts, budgets, and transactions through natural language. It supports comprehensive financial tasks including spending analysis, category management, and tracking recurring bills.
README
Pocketsmith MCP Server
A comprehensive Model Context Protocol (MCP) server for the Pocketsmith personal finance API. Transform your AI assistant into a powerful financial management tool with access to accounts, budgets, transactions, and more.
β¨ Features
π° Account Management
- View all account balances (checking, savings, credit cards, investments)
- Get detailed account information with transaction history
- Track net worth across multiple accounts
π Budget & Analysis
- Get budget summaries for any time period
- Analyze per-category spending vs. budgets
- View spending trends across categories
- Compare actual vs. forecasted amounts
π³ Transaction Management
- List, search, and filter transactions
- Create new transactions (log cash purchases, manual entries)
- Update transaction details (categorize, add notes, set labels)
- Delete duplicate or incorrect transactions
- Filter by account, category, date range, or review status
π Category Management
- List all categories with hierarchical structure
- Create new categories and subcategories
- Set up automatic categorization rules
- Organize spending into custom categories
π Recurring Transactions
- View upcoming bills and recurring expenses
- Create recurring events (rent, subscriptions, paychecks)
- Forecast future cash flow
- Manage budget scenarios
π·οΈ Labels & Organization
- List and manage transaction labels
- Tag transactions for easy filtering
- Track tax-deductible expenses, business spending, etc.
π¦ Installation
Quick Start with uvx (Recommended)
The fastest way to try it out:
uvx pocketsmith-mcp
Install via pip
pip install pocketsmith-mcp
Install from source
git clone https://github.com/dannyshaw/pocketsmith-mcp.git
cd pocketsmith-mcp
pip install -e .
π Configuration
Get Your API Key
- Log in to Pocketsmith
- Go to Settings β API & Developers
- Click Generate New API Key
- Copy your API key
β οΈ Security: Treat your API key like a password. It has full access to your financial data.
Set Environment Variable
export POCKETSMITH_API_KEY=your_api_key_here
Or create a .env file:
echo "POCKETSMITH_API_KEY=your_api_key_here" > .env
π Usage
With Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"pocketsmith": {
"command": "uvx",
"args": ["pocketsmith-mcp"],
"env": {
"POCKETSMITH_API_KEY": "your_api_key_here"
}
}
}
}
With Claude Code
Add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"pocketsmith": {
"command": "pocketsmith-mcp",
"env": {
"POCKETSMITH_API_KEY": "your_api_key_here"
}
}
}
}
Standalone
Run the server directly:
pocketsmith-mcp
π¬ Example Conversations
Once configured, you can ask your AI assistant:
Account & Budget Queries
- "What are my account balances?"
- "Show me my credit card balance"
- "Am I over budget this month?"
- "What's my spending trend for groceries over the last 3 months?"
Transaction Management
- "List transactions from my checking account this week"
- "Log a $50 cash purchase at the grocery store"
- "Categorize that Amazon transaction as Household"
- "Delete transaction #12345"
Bills & Recurring Expenses
- "What bills are coming up this month?"
- "Create a recurring monthly rent payment of $2000"
- "Show me all my subscriptions"
Categories & Organization
- "Create a new category called 'Pet Expenses'"
- "Show me all transactions in the Dining Out category"
- "Set up a rule to auto-categorize Starbucks as Coffee"
π οΈ Available Tools (23 total)
Account Tools
| Tool | Description |
|---|---|
pocketsmith_list_accounts |
List all accounts with balances |
pocketsmith_get_account |
Get detailed account information |
pocketsmith_list_transaction_accounts |
List transaction accounts with details |
Budget & Analysis Tools
| Tool | Description |
|---|---|
pocketsmith_get_budget_summary |
Get budget summary for a date range |
pocketsmith_list_budget |
Per-category budget analysis |
pocketsmith_get_trend_analysis |
Spending trends across categories |
Transaction Tools
| Tool | Description |
|---|---|
pocketsmith_list_transactions |
List transactions with filters |
pocketsmith_list_transactions_by_account |
Filter transactions by account |
pocketsmith_list_transactions_by_category |
Filter transactions by category |
pocketsmith_get_transaction |
Get transaction details |
pocketsmith_create_transaction |
Create new transaction |
pocketsmith_update_transaction |
Update transaction details |
pocketsmith_delete_transaction |
Delete a transaction |
pocketsmith_search_transactions |
Search by keyword |
pocketsmith_categorize_transaction |
Quick categorization |
Category Tools
| Tool | Description |
|---|---|
pocketsmith_list_categories |
List all categories |
pocketsmith_create_category |
Create new category |
pocketsmith_list_category_rules |
List auto-categorization rules |
pocketsmith_create_category_rule |
Create categorization rule |
Event Tools (Recurring Transactions)
| Tool | Description |
|---|---|
pocketsmith_list_events |
List recurring transactions |
pocketsmith_create_event |
Create recurring transaction |
Other Tools
| Tool | Description |
|---|---|
pocketsmith_list_labels |
List all transaction labels |
pocketsmith_get_status |
Check connection status |
π Security
This Server Can
- β Read all your financial data (transactions, accounts, balances)
- β Create, update, and delete transactions
- β Modify categories and create rules
- β Access budget and forecast data
Security Best Practices
- β Store API keys in environment variables (never in code)
- β Use different API keys for development vs. production
- β Rotate API keys periodically
- β Only use with trusted AI assistants on secure machines
- β Never commit API keys to version control
- β Never share API keys publicly
See SECURITY.md for detailed security information.
π API Coverage
20 out of 44 Pocketsmith API endpoints (45%)
Focused on the most useful endpoints for personal finance management:
- β User & account management
- β Transaction CRUD operations
- β Budget & trend analysis
- β Category management
- β Recurring events/bills
- β Labels & organization
π§ͺ Development
Setup
# Clone repository
git clone https://github.com/dannyshaw/pocketsmith-mcp.git
cd pocketsmith-mcp
# Install dependencies
uv sync
# Run tests
pytest
# Run tests with coverage
pytest --cov=src/pocketsmith_mcp
# Lint and format
ruff check .
ruff format .
# Type check
mypy src
Testing
# Run all tests
pytest -v
# Run specific test file
pytest tests/test_client.py -v
# Run with coverage report
pytest --cov=src/pocketsmith_mcp --cov-report=html
Project Structure
pocketsmith-mcp/
βββ src/pocketsmith_mcp/
β βββ __init__.py # Package initialization
β βββ client.py # Pocketsmith API client
β βββ config.py # Configuration settings
β βββ server.py # MCP server implementation
βββ tests/
β βββ conftest.py # Test fixtures
β βββ test_client.py # Client tests
βββ pyproject.toml # Project configuration
βββ README.md # This file
βββ SECURITY.md # Security documentation
π€ Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Write tests for your changes
- Ensure all tests pass (
pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
π License
MIT License - see LICENSE for details.
π Acknowledgments
- Built with the Model Context Protocol
- Powered by the Pocketsmith API
- Designed for use with Claude
π Support
- Issues: GitHub Issues
- Security: See SECURITY.md
- Discussions: GitHub Discussions
πΊοΈ Roadmap
Future enhancements:
- [ ] Attachment management
- [ ] Institution connections management
- [ ] Budget calendar export
- [ ] Spending analytics and insights
- [ ] Multi-currency support enhancements
- [ ] Batch transaction operations
Made with β€οΈ for personal finance management
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.
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.
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.
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.