AI tools can connect to your Lunch Money data in two ways: through an MCP server that lets you ask natural-language questions in a chat interface, or through an AI coding assistant that helps you write scripts against the API. This page explains both approaches and how to handle your access token safely in each.
MCP (Model Context Protocol) is a standard that lets AI assistants use external tools. A Lunch Money MCP server acts as a bridge between your AI chat app and the Lunch Money API, letting you ask questions like:
The Lunch Money developers page lists community-built MCP servers. Pick one whose setup instructions and permission model you're comfortable with, and follow its documentation carefully. If you're not sure where to start, lunchmoney-mcp is a popular choice — it works well with Claude Desktop (including a one-click .mcpb bundle install), covers the full v2 API, and has straightforward setup instructions.
With MCP, your access token usually lives in a local configuration file on your computer — not in the chat window — which is safer than pasting it directly into a conversation.
If you're comfortable writing code, another approach is to point an AI coding assistant at the Lunch Money OpenAPI spec and ask it to help you build exactly what you need. For example:
This is a useful middle path: the AI helps write code against the public API docs, while your actual financial data stays between your computer and Lunch Money unless you explicitly share it.
The safest way to supply your access token to a local script is to keep it out of the prompt entirely — let the program read it at runtime instead:
# Set once in your shell or add to your shell config file
export LUNCH_MONEY_ACCESS_TOKEN="your_token_here"
# Scripts and curl commands read it automatically
curl https://api.lunchmoney.dev/v2/me \
-H "Authorization: Bearer $LUNCH_MONEY_ACCESS_TOKEN"
# .env file (add to .gitignore — do not commit to source control)
# LUNCH_MONEY_ACCESS_TOKEN=your_token_here
import os
from dotenv import load_dotenv
load_dotenv()
token = os.environ["LUNCH_MONEY_ACCESS_TOKEN"]
// .env file (add to .gitignore — do not commit to source control)
// LUNCH_MONEY_ACCESS_TOKEN=your_token_here
import 'dotenv/config';
const token = process.env.LUNCH_MONEY_ACCESS_TOKEN;
.env file excluded from source control, or your operating system's secret store.Start with a test budget — API changes are permanent. Use a test budget while you're learning so your real data stays safe. See the Getting Started guide for instructions.
Prefer read-only workflows — A workflow that only reads data is lower risk than one that can create, update, or delete records.
Give tokens descriptive names — Label each token clearly on the Developers page so you can identify and revoke them easily later.
Create one token per tool — That way you can revoke a specific integration without affecting others. You cannot unsend data that has already been shared, but you can always cut off future access.
Understand what you're sharing — The more data you send to a third-party service, the more carefully you should review that service's privacy and data-retention policies.
If you want to experiment, here are a few low-risk starting points:
Start small, and use a test budget while you're learning.