get_user
Get details on the current user
无需输入参数。

io.github.akutishevsky由 GitHub 账号 akutishevsky 发布v4.0.1更新于 Nov 8, 2026
MCP server for managing LunchMoney personal finances: transactions, budgets, categories, and more.
本地 MCP 服务器,让助手读取并管理 LunchMoney 个人财务:交易、预算、分类、标签、账户、加密货币和余额历史。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
[npm version] [npm downloads] [GitHub downloads] [license] [TypeScript] [MCP Badge]
A Model Context Protocol (MCP) server implementation for LunchMoney, providing programmatic access to personal finance management through LunchMoney's API. Also available as an MCP Bundle (.mcpb) for easy installation in Claude Desktop.
Heads up — v4.0.1 validates inputs against the LunchMoney v2 spec. Tool names and parameters are unchanged, and six settings tools are added. Inputs the API would reject are now refused before any request is sent: unknown currency codes,
nullor empty amounts, unpaired date ranges, updates with no fields, and conflicting fields such asmanual_account_idwithplaid_account_id.delete_taganddelete_categorynow report a 422 as an error, and a split child withcategory_id: nullis sent as uncategorized instead of0. See CHANGELOG.md for the full list. If you depend on the old behaviour, pin@akutishevsky/lunchmoney-mcp@^3.0.0.
Heads up — v3.0.0 removes
get_all_crypto. The crypto tools now use LunchMoney's v2 crypto endpoints, which split manual and synced holdings into separate resources and offer no combined equivalent of v1'sGET /crypto. Replaceget_all_cryptowithget_all_manual_cryptoandget_all_synced_crypto, which together return everything it did and more.update_manual_cryptoalso drops itscurrencyparameter. Nothing outside the crypto domain changed; if you don't use the crypto tools, upgrading from 2.x needs no action. See CHANGELOG.md. If you depend onget_all_crypto, pin@akutishevsky/lunchmoney-mcp@^2.2.0.
[LunchMoney Server MCP server]Heads up — v2.0.0 is a breaking release. This server now targets LunchMoney's v2 API (
https://api.lunchmoney.dev/v2, currently in alpha). It is not backwards-compatible with v1.x of this server: tool names, fields, and endpoint shapes have changed (for example,assetsis nowmanual_accounts,tagsarrays are nowtag_ids, transactionasset_idis nowmanual_account_id, thedebit_as_negativetoggle is gone, and the budget summary moved to a new/summaryendpoint). See CHANGELOG.md for the full list. If you depend on v1.x, pin@akutishevsky/lunchmoney-mcp@^1.4.3.
This MCP server enables AI assistants and other MCP clients to interact with LunchMoney data, allowing for automated financial insights, transaction management, budgeting, and more.
The easiest way to install this server is as an MCP Bundle in Claude Desktop:
.mcpb file from the releases page.mcpb file
Add the LunchMoney MCP server to Claude Code:
To enable debug logging:
Verify the server was added:
Add the LunchMoney MCP server to Codex:
To enable debug logging:
Verify the server was added:
To use this MCP server with any MCP-compatible client (such as Claude Desktop), you need to add it to the client's configuration.
The server can be configured in your MCP client's configuration file. The exact location and format may vary by client, but typically follows this pattern:
Note:
LUNCHMONEY_DEBUGis optional. Set it to"true"to enable debug logging of API requests and responses to stderr. Useful for troubleshooting.
Note:
LUNCHMONEY_ATTACHMENTS_DIRis optional.attach_file_to_transactionis the only tool that reads from your filesystem, and it always verifies that a file really is a JPEG, PNG, HEIC, HEIF, or PDF before uploading it. Set this variable to a directory (say, a~/Receiptsfolder) to additionally restrict it to files inside that directory —..and symlinks that point outside are rejected. Leave it unset and any path the server can read is fair game, which is usually fine for a local stdio server but not for remote deployments.
Replace "your-api-token-here" with your actual LunchMoney API token from LunchMoney Developer Settings.
Different MCP clients store their configuration in different locations:
Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonOther MCP Clients: Check your client's documentation for the configuration file location.
mcpServers section.npx available in your system PATHThe bundled stdio binary covers desktop MCP clients, but Claude on mobile and the custom connectors feature in claude.ai only speak HTTP. There are two ways to expose this server remotely.
lunchmoney-mcp-cloudflare wraps this package as a Cloudflare Worker with Google sign-in and an email allowlist in front of the MCP endpoint. The whole stack fits inside Cloudflare's and Google Cloud's free tiers, and a setup.sh wizard handles KV creation, OAuth client setup, secrets, and deploy in one walkthrough. Each authenticated user runs in their own Durable Object, so the config singleton stays per-user.
For a single-user deployment, wire createServer() into StreamableHTTPServerTransport and serve it from any Node HTTP framework. Example with Express:
Swap Express for Hono (via @hono/node-server) or Fastify if you prefer — the transport only needs Node's IncomingMessage and ServerResponse. Add your own auth in front of /mcp — the package ships no transport-level auth.
Set
LUNCHMONEY_ATTACHMENTS_DIRon any remote deployment.attach_file_to_transactionreads a path supplied by the caller off the host's filesystem. On a desktop stdio server the caller and the file owner are the same person, so that is unremarkable. Once the server is reachable over HTTP they are different principals, and an unconfined read is a way for a remote caller — or a prompt-injected model — to pull files off your host. Point the variable at a dedicated directory and keep nothing else in it. The content-type check (only real JPEG/PNG/HEIC/HEIF/PDF files upload) applies either way, but it is a backstop, not a substitute.
Multi-tenant warning. This pattern serves one user from one process with one shared API token. To serve multiple users from a single Node process you'd hit the single-tenant config singleton; fork the process per user or use the Cloudflare option above (each user gets their own isolate).
Here are some example prompts you can use with the LunchMoney MCP server:
get_user - Retrieve current user detailsget_account_settings - Get account-wide settings (currencies, locale, display name, rule automation)update_account_settings - Update account-wide settings (at least one field required)get_user_settings - Get user-wide display and formatting preferencesupdate_user_settings - Update user-wide display and formatting preferences (at least one field required)get_user_account_settings - Get user-specific settings within the budget accountupdate_user_account_settings - Update user-specific account settings, such as the default manual account (at least one field required)get_all_categories - List all categories (supports format and is_group filters)get_single_category - Get details for a specific category or category groupcreate_category - Create a category or category group (set is_group=true plus children)update_category - Update properties; replaces the children list on category groupsdelete_category - Delete a category; pass force=true to override dependency checkget_all_tags - List all tagsget_single_tag - Get a tag by IDcreate_tag - Create a new tagupdate_tag - Update tag propertiesdelete_tag - Delete a tag (with force to override dependents)get_transactions - List transactions with extensive filtering options (date range, account, category, tag, status, pending, metadata, files, etc)get_single_transaction - Get full transaction details (always includes plaid_metadata, custom_metadata, files, and children for split/group parents)create_transactions - Insert 1–500 transactions in one callupdate_transaction - Partial update of one transactiondelete_transaction - Delete one transaction (cannot be split/group)update_transactions_bulk - Bulk update 1–500 transactionsdelete_transactions_bulk - Bulk delete 1–500 transactions by IDcreate_transaction_group - Create a transaction group from existing transactionsdelete_transaction_group - Ungroup a transaction groupsplit_transaction - Split a transaction into 2–500 childrenunsplit_transaction - Undo a previous splitattach_file_to_transaction - Upload a local file (jpeg/png/heic/heif/pdf, ≤10MB), type verified from its contentsget_transaction_attachment_url - Get a signed download URL for a file attachmentdelete_transaction_attachment - Delete a file attachmentget_recurring_items - List recurring items for a date range (include_suggested for system suggestions)get_single_recurring_item - Get a recurring item by IDget_budget_summary - Per-category budget summary (backed by /summary); supports occurrences, totals, rollover-pool togglesget_budget_settings - Account-wide budget period and display settingsupsert_budget - Create or update a budget for a category and periodremove_budget - Remove a budget for a category and periodget_all_manual_accounts - List all manually-managed accounts (formerly "assets")get_single_manual_account - Get a manual account by IDcreate_manual_account - Create a new manually-managed accountupdate_manual_account - Update properties of a manual accountdelete_manual_account - Delete a manual account; optionally also delete its transactions / balance historyget_all_plaid_accounts - List all connected Plaid accountsget_single_plaid_account - Get a Plaid account by IDtrigger_plaid_fetch - Trigger fetch of latest data from Plaid (optionally scoped to a date range or account)get_supported_cryptocurrencies - List the cryptocurrencies supported for manual tracking (optional search filter)add_supported_cryptocurrency - Add a cryptocurrency to the supported list from its CoinGecko coin-page URLget_all_manual_crypto - List all manually-managed crypto balancesget_single_manual_crypto - Get a single manually-managed crypto balance by IDcreate_manual_crypto - Create a manually-managed crypto assetupdate_manual_crypto - Update a manual crypto balance's name, display name, institution name, or balancedelete_manual_crypto - Delete a manual crypto asset (irreversible)get_all_synced_crypto - List synced crypto accounts and their nested per-symbol balancesget_single_synced_crypto - Get a single synced crypto account by IDget_synced_crypto_balance - Get one balance inside a synced crypto account by symbolrefresh_synced_crypto - Trigger a balance refresh for a synced crypto accountget_balance_history - Get monthly balance history across all accounts (powers the Net Worth views); optional start_month/end_month (YYYY-MM) range filterget_account_balance_history - Get monthly balance history for one account (manual, plaid, crypto_manual, or deleted)upsert_account_balance_history - Create or update monthly balance entries for one account (past months only; all-or-nothing)delete_account_balance_history - Delete all historical balance entries for one accountget_crypto_synced_balance_history - Get monthly balance history for a synced crypto holding by account id + ticker symbolupsert_crypto_synced_balance_history - Create or update monthly balance entries for a synced crypto holdingdelete_crypto_synced_balance_history - Delete all historical balance entries for a synced crypto holdingdelete_balance_history_entry - Delete a single historical balance entry by idupdate_deleted_account_details - Update the display details (name, institution, type, subtype, mask) shown for a deleted account's balance historysrc/tools/src/index.tssrc/types.ts if neededThe package exposes subpath entry points so it can be embedded in a custom transport (for example, a Cloudflare Worker that serves the MCP protocol over HTTP) rather than only the bundled stdio binary:
initializeConfig must be called before any tool is invoked, or the first request throws "Configuration not initialized.".
Single-tenant assumption. The config is held in a module-level singleton. That is safe on per-isolate runtimes — each user gets their own isolate, so there is no shared mutable state to race on. It is not safe on shared-process multi-tenant Node hosts (e.g. one Express or Hono process serving multiple users): concurrent
initializeConfigcalls would race and leak tokens between requests. Those consumers need to fork per-user or refactor the singleton before exposing the package.
The server implements the full LunchMoney API v2. For detailed API documentation, see:
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License
来源:README.md,提交 6013953
Get details on the current user
无需输入参数。
Get account-wide settings for the current budget account: primary and supported currencies, display name, locale, and rule/totals preferences. These apply regardless of which user accesses the account.
无需输入参数。
Update account-wide settings for the current budget account. At least one field must be provided; omitted fields are left unchanged. Returns the full account settings.
localedisplay_nameprimary_currencysupported_currenciesinclude_pending_in_totalsauto_create_category_rulesauto_create_suggested_transaction_rulesGet user-wide display and formatting preferences for the authorized user: debit sign display, payee suggestions, date and time formats, week start, and year/weekday display. These apply across every budget account the user can access.
无需输入参数。
Update user-wide display and formatting preferences for the authorized user. At least one field must be provided; omitted fields are left unchanged. show_debits_as_negative only changes display in the Lunch Money app: amounts in API responses always use positive values for debits and negative values for credits. Returns the full user settings.
show_am_pmweek_starts_onmonth_day_formatmonth_year_formatauto_suggest_payeealways_display_yearmonth_day_year_formatalways_display_weekdayshow_debits_as_negativeGet settings specific to the authorized user within the current budget account: transaction review behavior and the default manual account for new manual transactions. These do not affect other users or the user's settings in other budget accounts.
无需输入参数。
Update settings specific to the authorized user within the current budget account. At least one field must be provided; omitted fields are left unchanged. Returns the full user account settings.
default_manual_account_idauto_review_transaction_on_updateauto_review_transaction_on_creationGet a list of all categories associated with the user's account. Categories are sorted by their order; categories without an order are listed alphabetically after those that have one.
formatis_groupGet details on a single category or category group, including the list of children categories for category groups.
categoryId必填Create a new category or a category group. Set is_group=true to create a category group; supply children as an array of existing category IDs, existing category objects, and/or strings (names of new sub-categories to create).
name必填orderarchivedchildrengroup_idis_groupcollapsedis_incomedescriptionexclude_from_budgetexclude_from_totalsUpdate properties for an existing category or category group. Provide at least one updatable property. For category groups, supplying children replaces the group's full child list. Cannot be used to convert between category and category group.
namearchivedchildrengroup_idis_groupcollapsedis_incomecategoryId必填archived_atdescriptionexclude_from_budgetexclude_from_totalsDelete a single category or category group. By default fails (HTTP 422) if dependencies exist, returning a structured `dependents` payload. Set force=true to delete and disassociate from all related budgets, transactions, recurring items, etc. Force delete is irreversible.
forcecategory_id必填Get a list of all tags associated with the user's account.
无需输入参数。
Get details of a single tag by ID.
tagId必填Create a new tag.
name必填archivedtext_colordescriptionbackground_colorUpdate properties for an existing tag. Only the fields provided are changed; at least one field must be provided.
nametagId必填archivedtext_colorarchived_atdescriptionbackground_colorDelete a tag. By default the deletion is refused if the tag is in use by transactions or rules: the result is an error containing a `dependents` payload listing the rules and transactions that still reference the tag. Set force=true to delete the tag and disassociate it from those records (irreversible).
forcetagId必填Retrieve transactions, optionally filtered by date range, account, category, tag, recurring item, status, and more. Returns at most `limit` transactions (default 1000, max 2000); `has_more` is set on the response when more match the filters. Pending and split-parent / group-child transactions are excluded by default.
limitoffsetstatustag_idend_dateis_pendingstart_datecategory_idrecurring_idcreated_sinceinclude_filesupdated_since另有 8 个Get details of a specific transaction. The response always includes plaid_metadata, custom_metadata, files, and (for split or group parents) the children array — none of which are returned by default in get_transactions.
transaction_id必填Insert one or more transactions (1-500 per call). Returns inserted transactions plus any skipped duplicates.
apply_rulestransactions必填skip_duplicatesskip_balance_updateUpdate an existing transaction. Provide any subset of writable fields directly (the v2 API no longer wraps the body in a `transaction` envelope). Cannot modify split or grouped transactions; use the corresponding split/group tools instead.
update必填transaction_id必填update_balanceDelete a single transaction. Fails for split/group transactions and their parents — unsplit/ungroup first. Irreversible.
transaction_id必填Update multiple transactions in a single call (1-500). Each entry must include `id` plus at least one writable field. Cannot be used to modify split or grouped transactions.
transactions必填Bulk-delete transactions by ID (1-500). Fails if any ID is a split or group parent, or part of a split/group; unsplit or ungroup those first. Irreversible.
ids必填Create a transaction group from 2-500 existing transactions. Source transactions are hidden from get_transactions; the new group's `children` are returned by get_single_transaction on the group's ID. Cannot include split or recurring transactions, and transactions that are already grouped must be ungrouped (delete_transaction_group) before being regrouped.
ids必填date必填notespayee必填statustag_idscategory_idDelete (ungroup) a transaction group. The original child transactions remain and revert to normal ungrouped transactions.
transaction_id必填Split an existing transaction into 2-500 child transactions. The sum of child amounts must equal the parent's amount. After splitting, the parent is hidden from get_transactions and accessible via get_single_transaction (returns the parent with `children`).
transaction_id必填child_transactions必填Unsplit a previously split transaction by deleting its children and restoring the parent. Pass the parent (split_parent_id) — not a child — as the path id.
transaction_id必填Attach a local image or PDF receipt (max 10MB) to a transaction. Allowed types: image/jpeg, image/png, image/heic, image/heif, application/pdf. The file is read from the local filesystem of the host running this MCP server, and its type is determined from its actual contents — files that are not a real image or PDF are rejected. If LUNCHMONEY_ATTACHMENTS_DIR is set on the host, only files inside that directory can be attached.
notesfile_path必填content_typetransaction_id必填Get a short-lived signed download URL for a transaction file attachment. The response includes the URL and an `expires_at` timestamp.
file_id必填Delete a transaction file attachment. Irreversible.
file_id必填Retrieve a list of recurring items expected for a specified date range. The `matches` object on each item is populated based on the requested range and is null for suggested items.
end_datestart_dateinclude_suggestedRetrieve a single recurring item by ID. Optional date range populates the `matches` object.
end_datestart_daterecurringId必填Get a summary of the user's budget for a specified date range. Returns per-category totals (other_activity, recurring_activity, budgeted, available, recurring_remaining, recurring_expected). Set include_occurrences=true for a per-period breakdown matching the account's budget periodicity. Ranges that do not align with budget periods return aligned=false, and categories omit the budgeted and available values. (Backed by the v2 GET /summary endpoint.)
end_date必填start_date必填include_totalsinclude_occurrencesinclude_rollover_poolinclude_past_budget_datesinclude_exclude_from_budgetsGet budget period and display settings for the account (granularity, period quantity, anchor date, hide-no-activity preference, last-day-of-month preference, income option, rollover-left-to-budget setting). General preferences such as currency and locale are not included; they live on the account settings endpoint.
无需输入参数。
Create or update a budget for a category and budget period. The start_date must be a valid budget period start for the account (see get_budget_settings).
notesamount必填currencystart_date必填category_id必填Remove the budget for a specific category and period. The request is idempotent — succeeds even if no budget exists for the period.
start_date必填category_id必填Get a list of all manually-managed accounts associated with the user. (Formerly known as `assets` in the v1 API.)
无需输入参数。
Get details of a single manual account by ID.
accountId必填Create a new manually-managed account. (Formerly `create_asset`.)
name必填type必填statusbalance必填subtypecurrencyclosed_onexternal_iddisplay_namebalance_as_ofcustom_metadatainstitution_name另有 1 个Update an existing manually-managed account. Provide at least one field to change. (Formerly `update_asset`.)
nametypestatusbalancesubtypecurrencyaccountId必填closed_onexternal_iddisplay_namebalance_as_ofcustom_metadata另有 2 个Delete a manually-managed account. Optionally also delete its transactions/rules/recurring items (irreversible), and/or its balance history.
accountId必填delete_itemsdelete_balance_historyGet a list of all Plaid (synced) accounts associated with the user.
无需输入参数。
Get details of a single Plaid (synced) account by ID.
accountId必填Trigger a fetch of latest data from Plaid. An account is eligible only if its last_fetch is over 1 minute ago; calling again sooner returns 425 Too Early, so use this sparingly. Optionally scope the fetch to a date range (start_date and end_date must be provided together) and/or a specific Plaid account ID. The fetch runs as a background job, so the results are not immediate.
idend_datestart_dateGet the list of cryptocurrencies supported for manual tracking. The `symbol` of an entry here is what must be passed to create_manual_crypto. The full list has well over a thousand entries, so pass `search` when looking for a specific coin.
searchAdd a new cryptocurrency to the supported manual-crypto list by submitting its CoinGecko coin-page URL. Only needed when get_supported_cryptocurrencies does not already list the symbol you want to track.
coingecko_url必填Get all manually-managed crypto balances associated with the user.
无需输入参数。
Get a single manually-managed crypto balance by ID. Call get_all_manual_crypto first to discover ids.
crypto_id必填Create a manually-managed crypto asset. The symbol must match one returned by get_supported_cryptocurrencies.
name必填symbol必填balance必填display_nameinstitution_nameUpdate a manually-managed crypto balance. Only the supplied fields change. The symbol of an existing balance cannot be changed.
namebalancecrypto_id必填display_nameinstitution_nameDelete a manually-managed crypto asset. If the asset has balance history, keep_history must be set explicitly or the API rejects the request. Irreversible.
crypto_id必填keep_historyGet all synced crypto accounts (Coinbase, Kraken, Ethereum wallets) and their nested per-symbol balances. Synced accounts are connected in the Lunch Money web app and cannot be created or edited through the API.
无需输入参数。
Get a single synced crypto account and all its nested balances by ID.
crypto_id必填Get a single balance held inside a synced crypto account, looked up by its cryptocurrency symbol.
symbol必填crypto_id必填Trigger a balance refresh for a synced crypto account and return the refreshed account. Reaches out to the external crypto provider.
crypto_id必填Get monthly account balance history across all accounts — the data behind the Net Worth views in the LunchMoney app. History is monthly. With no month range, returns all available history plus an ephemeral `current` entry for the current month, which is calculated on demand and may change between requests. Only months with data are included.
end_monthstart_monthGet monthly balance history for a single account. Call get_all_manual_accounts, get_all_plaid_accounts, or get_all_manual_crypto first to discover ids. For deleted accounts, use the deleted_account_id from get_balance_history. For synced crypto holdings use get_crypto_synced_balance_history instead.
end_monthaccount_id必填start_monthaccount_type必填Create or update monthly balance history entries for a single account. Every month must be a past calendar month — the current month is calculated on demand and cannot be written. The request is all-or-nothing: if any entry fails validation, none are applied. The response contains only the entries submitted, not the account's full history.
balances必填account_id必填account_type必填Delete ALL historical balance entries for a single account. This is irreversible and affects the Net Worth views. To remove a single month, use delete_balance_history_entry instead.
account_id必填account_type必填Get monthly balance history for a synced crypto holding, identified by its account id and ticker symbol. Synced crypto is scoped per symbol, so it is not available through get_account_balance_history.
symbol必填end_monthaccount_id必填start_monthCreate or update monthly balance history entries for a synced crypto holding. Every month must be a past calendar month. If an entry sets `symbol`, it must match the symbol argument. The request is all-or-nothing.
symbol必填balances必填account_id必填Delete ALL historical balance entries for a synced crypto holding. This is irreversible and affects the Net Worth views.
symbol必填account_id必填Delete a single historical balance entry by its id. The id must come from an entry with type=historical in a balance history response; ephemeral `current` entries have no id and cannot be deleted.
entry_id必填Update the display details shown for a deleted account in the Net Worth views. Applies to all historical entries for that deleted source. At least one field must be provided; pass null to clear a field.
masknamesubtypeaccount_id必填account_typedisplay_nameinstitution_name已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
claude mcp add lunchmoney --transport stdio -e LUNCHMONEY_API_TOKEN=your-api-token-here -- npx -y @akutishevsky/lunchmoney-mcpclaude mcp add lunchmoney --transport stdio -e LUNCHMONEY_API_TOKEN=your-api-token-here -e LUNCHMONEY_DEBUG=true -- npx -y @akutishevsky/lunchmoney-mcpclaude mcp listclaude mcp get lunchmoneycodex mcp add lunchmoney --env LUNCHMONEY_API_TOKEN=your-api-token-here -- npx -y @akutishevsky/lunchmoney-mcpcodex mcp add lunchmoney --env LUNCHMONEY_API_TOKEN=your-api-token-here --env LUNCHMONEY_DEBUG=true -- npx -y @akutishevsky/lunchmoney-mcpcodex mcp listcodex mcp get lunchmoney{ "mcpServers": { "lunchmoney": { "command": "npx", "args": ["@akutishevsky/lunchmoney-mcp"], "env": { "LUNCHMONEY_API_TOKEN": "your-api-token-here", "LUNCHMONEY_DEBUG": "true" } } }}# Run with npxLUNCHMONEY_API_TOKEN="your-api-token" npx @akutishevsky/lunchmoney-mcpimport express from "express";import { createServer } from "@akutishevsky/lunchmoney-mcp/server";import { initializeConfig } from "@akutishevsky/lunchmoney-mcp/config";import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
initializeConfig(process.env.LUNCHMONEY_API_TOKEN!);const server = createServer("1.0.0");
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: () => crypto.randomUUID(),});await server.connect(transport);
const app = express();app.use(express.json());app.all("/mcp", (req, res) => transport.handleRequest(req, res, req.body));app.listen(3000);lunchmoney-mcp/├── src/│ ├── index.ts # Server entry point│ ├── config.ts # Configuration management│ ├── types.ts # TypeScript type definitions│ └── tools/ # Tool implementations│ ├── user.ts│ ├── categories.ts│ ├── tags.ts│ ├── transactions.ts│ ├── recurring-items.ts│ ├── budgets.ts│ ├── manual-accounts.ts│ ├── plaid-accounts.ts│ ├── crypto.ts│ └── balance-history.ts├── build/ # Compiled JavaScript output├── package.json├── tsconfig.json└── README.md# Build the MCP servernpm run build
# Build MCPB package for distributionnpm run build:mcpbimport { createServer } from "@akutishevsky/lunchmoney-mcp/server";import { initializeConfig } from "@akutishevsky/lunchmoney-mcp/config";
initializeConfig(process.env.LUNCHMONEY_API_TOKEN!);const server = createServer("1.0.0");// connect `server` to whatever transport you need