Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

get_all_assets

Retrieve all manually-managed financial assets from your LunchMoney account to track investments, properties, and other holdings.

Instructions

Get a list of all manually-managed assets associated with the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_all_assets' tool. It fetches all assets from the Lunchmoney API endpoint `/assets` using the configured baseUrl and API token, handles errors by returning a text content error message, parses the response, type-annotates as Asset[], and returns the JSON-stringified list as text content.
    async () => { const { baseUrl, lunchmoneyApiToken } = getConfig(); const response = await fetch(`${baseUrl}/assets`, { headers: { Authorization: `Bearer ${lunchmoneyApiToken}`, }, }); if (!response.ok) { return { content: [ { type: "text", text: `Failed to get assets: ${response.statusText}`, }, ], }; } const data = await response.json(); const assets: Asset[] = data.assets; return { content: [ { type: "text", text: JSON.stringify(assets), }, ], }; }
  • Registers the 'get_all_assets' tool on the MCP server with the tool name, description, empty input schema object (no parameters), and the inline handler function.
    server.tool( "get_all_assets", "Get a list of all manually-managed assets associated with the user", {}, async () => { const { baseUrl, lunchmoneyApiToken } = getConfig(); const response = await fetch(`${baseUrl}/assets`, { headers: { Authorization: `Bearer ${lunchmoneyApiToken}`, }, }); if (!response.ok) { return { content: [ { type: "text", text: `Failed to get assets: ${response.statusText}`, }, ], }; } const data = await response.json(); const assets: Asset[] = data.assets; return { content: [ { type: "text", text: JSON.stringify(assets), }, ], }; } );
  • src/index.ts:29-29 (registration)
    Invokes registerAssetTools on the MCP server instance, which in turn registers the 'get_all_assets' tool along with other asset-related tools.
    registerAssetTools(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