Skip to main content
Glama
ferdhika31

Money Lover MCP Server

get_user_info

Retrieve user profile information from Money Lover personal finance app using authentication token to access account details.

Instructions

Retrieve the Money Lover user profile associated with the provided token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoJWT token returned by the login tool or derived from EMAIL/PASSWORD environment variables

Implementation Reference

  • Handler function that resolves the authentication token if not provided, creates a MoneyloverClient instance, calls getUserInfo() on it, and returns a formatted success response or error.
    async ({ token }) => { try { const data = await runWithClient(token, client => client.getUserInfo()); return formatSuccess(data ?? {}); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } }
  • Schema definition for the get_user_info tool including title, description, and inputSchema which requires an optional token (referencing shared tokenArgument).
    { title: 'Get User Info', description: 'Retrieve the Money Lover user profile associated with the provided token.', inputSchema: tokenArgument },
  • src/server.js:323-338 (registration)
    Registration of the 'get_user_info' MCP tool using server.registerTool, specifying schema and handler function.
    server.registerTool( 'get_user_info', { title: 'Get User Info', description: 'Retrieve the Money Lover user profile associated with the provided token.', inputSchema: tokenArgument }, async ({ token }) => { try { const data = await runWithClient(token, client => client.getUserInfo()); return formatSuccess(data ?? {}); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } } );
  • Implementation of getUserInfo in MoneyloverClient class, which sends a POST request to the '/user/info' API endpoint using the private #post method.
    async getUserInfo() { return this.#post('/user/info'); }
  • Shared input schema argument for token, used by get_user_info and other tools. tokenSchema is a Zod schema for optional string token.
    const tokenArgument = { token: tokenSchema.describe( 'JWT token returned by the login tool or derived from EMAIL/PASSWORD environment variables' ) };

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/ferdhika31/moneylover-mcp'

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