Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

get_all_plaid_accounts

Retrieve all Plaid-linked financial accounts to access transaction data and account balances for personal finance management.

Instructions

Get a list of all Plaid accounts associated with the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler logic for the 'get_all_plaid_accounts' tool. It fetches the Plaid accounts from the LunchMoney API using the configured baseUrl and API token, parses the response, and returns the accounts as a JSON string in the tool's content block, or an error message if the request fails.
    async () => { const { baseUrl, lunchmoneyApiToken } = getConfig(); const response = await fetch(`${baseUrl}/plaid_accounts`, { headers: { Authorization: `Bearer ${lunchmoneyApiToken}`, }, }); if (!response.ok) { return { content: [ { type: "text", text: `Failed to get Plaid accounts: ${response.statusText}`, }, ], }; } const data = await response.json(); const plaidAccounts: PlaidAccount[] = data.plaid_accounts; return { content: [ { type: "text", text: JSON.stringify(plaidAccounts), }, ], }; }
  • Registers the 'get_all_plaid_accounts' tool on the MCP server with its name, description, empty input schema ({}), and inline handler function.
    server.tool( "get_all_plaid_accounts", "Get a list of all Plaid accounts associated with the user", {}, async () => { const { baseUrl, lunchmoneyApiToken } = getConfig(); const response = await fetch(`${baseUrl}/plaid_accounts`, { headers: { Authorization: `Bearer ${lunchmoneyApiToken}`, }, }); if (!response.ok) { return { content: [ { type: "text", text: `Failed to get Plaid accounts: ${response.statusText}`, }, ], }; } const data = await response.json(); const plaidAccounts: PlaidAccount[] = data.plaid_accounts; return { content: [ { type: "text", text: JSON.stringify(plaidAccounts), }, ], }; } );
  • src/index.ts:30-30 (registration)
    Top-level invocation of the registerPlaidAccountTools function, which registers the 'get_all_plaid_accounts' tool (among others) on the main MCP server instance.
    registerPlaidAccountTools(server);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/akutishevsky/lunchmoney-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server