Lunch Money MCP Server
Enables interacting with the Lunch Money personal finance API through MCP tools for retrieving user info, transactions, and performing calculations, with minimal response sizes.
README
Lunch Money MCP Server
A Model Context Protocol (MCP) server for the Lunch Money API v2, designed with minimal response sizes to prevent context window bloat.
Features
- Optimized responses: Concise, formatted output to minimize token usage
- Simple authentication: Uses environment variable for API token
- Type-safe: Built with modern Python type hints
- Easy to extend: Add more endpoints one at a time
Currently Supported Endpoints
add_numbers- Helper tool for arithmetic operationsget_current_user- Get information about the authenticated user (GET /me)get_transaction- Get details about a specific transaction by ID (GET /transactions/{id})get_transactions- List transactions for a date range (GET /transactions)
Installation
- Clone this repository:
git clone <your-repo-url>
cd lunchmoney-mcp-mini
- Install dependencies using uv:
uv sync
Configuration
Get Your API Token
- Log in to Lunch Money
- Go to the Developers page
- Create a new API token or use an existing one
Set Environment Variable
export LUNCHMONEY_API_TOKEN="your-api-token-here"
Or create a .env file (not committed to git):
LUNCHMONEY_API_TOKEN=your-api-token-here
Usage
With Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"lunchmoney-mini": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/lunchmoney-mcp-mini",
"run",
"lunchmoney_mcp_mini/main.py"
],
"env": {
"LUNCHMONEY_API_TOKEN": "your-api-token-here"
}
}
}
}
Standalone Testing
# Make sure LUNCHMONEY_API_TOKEN is set
uv run lunchmoney_mcp_mini/main.py
Available Tools
add_numbers
Helper tool for performing arithmetic operations with precise decimal handling to avoid floating-point precision issues.
Parameters:
numbers(required): List of numbers to add together. Can include negative values for subtraction.
Returns:
sum: Sum rounded to 2 decimal placesinput_count: Number of values provided
Example output:
{
"sum": 123.45,
"input_count": 3
}
get_current_user
Get details about the authenticated Lunch Money user.
Returns:
name: User's full nameemail: User's email addressuser_id: Unique user identifieraccount_id: Unique account identifierbudget_name: Name of the budgetprimary_currency: Primary currency code (e.g., 'usd')api_key_label: Label for the API key being used
Example output:
{
"name": "John Doe",
"email": "john@example.com",
"user_id": 12345,
"account_id": 67890,
"budget_name": "Family budget",
"primary_currency": "usd",
"api_key_label": "Development key"
}
get_transaction
Get full details about a specific transaction by its ID.
Parameters:
transaction_id(required): ID of the transaction to retrieve
Returns: Complete transaction object with all available fields including:
- Core data: id, date, amount, currency, payee, original_name
- Category/accounts: category_id, manual_account_id, plaid_account_id, recurring_id
- Metadata: plaid_metadata, custom_metadata, files (if any)
- Grouping/splitting: is_split_parent, split_parent_id, is_group_parent, group_parent_id, children
- Timestamps: created_at, updated_at
- Status: status, is_pending, source, external_id, tag_ids, notes
Example output:
{
"id": 2112150655,
"date": "2024-07-28",
"amount": -45.50,
"currency": "USD",
"payee": "Whole Foods",
"original_name": "WHOLE FOODS #1234",
"category_id": 82,
"status": "reviewed",
"is_pending": false,
"created_at": "2024-07-28T12:34:56.789Z",
"updated_at": "2024-07-28T12:34:56.789Z"
}
get_transactions
List transactions within a specified date range.
Parameters:
start_date(required): Start date in YYYY-MM-DD formatend_date(optional): End date in YYYY-MM-DD format. Defaults to last day of start_date's monthcategory_id(optional): Filter by category IDtag_id(optional): Filter by tag IDstatus(optional): Filter by status ("reviewed", "unreviewed", "delete_pending")is_pending(optional): Filter by pending statusmanual_account_id(optional): Filter by manual account IDplaid_account_id(optional): Filter by plaid account IDrecurring_id(optional): Filter by recurring item IDinclude_pending(optional): Include pending transactionslimit(optional): Maximum number of transactions (1-2000, default 100)offset(optional): Pagination offsetinclude_aggregates(optional): If True, calculates totals per category for full date range (respects all filters)
Returns:
transactions: Array of transaction objectshas_more: Boolean indicating if more transactions are availableaggregates(optional): Category totals and counts wheninclude_aggregates=True
Transaction fields:
id: Transaction IDdate: Transaction date (YYYY-MM-DD)amount: Transaction amount (numeric string)payee: Payee namecategory_id: Category IDstatus: Transaction statusis_pending: Pending status
Aggregates fields (when include_aggregates=True):
by_category: Array sorted bytotal_amountdescending, each with:category_id: Category ID (or null for uncategorized)category_name: Category namecount: Number of transactions in this categorytotal_amount: Sum of transaction amounts (numeric string)
total_count: Total number of transactionstotal_amount: Sum of all transaction amounts (numeric string)
Example output (without aggregates):
{
"transactions": [
{
"id": 2112150655,
"date": "2024-07-28",
"amount": "1250.8400",
"payee": "Paycheck",
"category_id": 88,
"status": "reviewed",
"is_pending": false
}
],
"has_more": false
}
Example output (with aggregates):
{
"transactions": [...],
"has_more": false,
"aggregates": {
"by_category": [
{"category_id": 88, "category_name": "Rent", "count": 2, "total_amount": "2500.00"},
{"category_id": 82, "category_name": "Groceries", "count": 5, "total_amount": "245.50"},
{"category_id": null, "category_name": "Uncategorized", "count": 3, "total_amount": "45.00"}
],
"total_count": 10,
"total_amount": "2790.50"
}
}
Design Philosophy
This MCP server is intentionally designed to return minimal, focused responses to avoid filling up the context window. Each tool:
- Returns only essential information
- Uses concise formatting
- Avoids verbose JSON dumps
- Provides human-readable output
Technical Details
This server uses:
- FastMCP: A high-level Python framework for building MCP servers
- requests-openapi: Automatically generates API client from OpenAPI spec
- OpenAPI 3.0 spec: Ensures type safety and accurate API calls
The combination of FastMCP and requests-openapi means:
- Less boilerplate code
- Automatic request/response validation
- Easy to add new endpoints from the spec
- Type-safe API calls
Resources
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.