Skip to main content
Glama
mottibec

Israeli Bank MCP

by mottibec

fetch-transactions

Retrieve transaction data from Israeli bank accounts using specified credentials. Supports major banks and credit card companies, combining installments as needed for consolidated financial tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bankIdYes
combineInstallmentsNo
credentialsYes
showBrowserNo
startDateNo

Implementation Reference

  • The handler function for the 'fetch-transactions' tool. It validates the bankId, creates a scraper instance with the provided options and credentials, scrapes the transactions, and returns the result as JSON or an error.
    async ({ bankId, credentials, startDate, combineInstallments, showBrowser }) => { try { // Ensure bankId is a valid CompanyTypes value const validBankIds = new Set(Object.values(CompanyTypes)); if (!validBankIds.has(bankId as unknown as CompanyTypes)) { throw new Error(`Invalid bank ID: ${bankId}`); } const options: ScraperOptions = { companyId: bankId as unknown as CompanyTypes, startDate: startDate ? new Date(startDate) : new Date(), combineInstallments: combineInstallments ?? false, showBrowser: showBrowser ?? false }; const scraper = createScraper(options); const scrapeResult = await scraper.scrape(credentials as ScraperCredentials); if (scrapeResult.success) { return { content: [{ type: "text", text: JSON.stringify(scrapeResult) }] }; } else { return { content: [{ type: "text", text: JSON.stringify({ error: scrapeResult.errorType, message: scrapeResult.errorMessage }) }], isError: true }; } } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "UNKNOWN_ERROR", message: error instanceof Error ? error.message : "Unknown error occurred" }) }], isError: true }; } }
  • Zod input schema defining parameters for the 'fetch-transactions' tool: bankId (enum of CompanyTypes), credentials object, optional startDate, combineInstallments, and showBrowser.
    bankId: z.enum(Object.values(CompanyTypes) as [string, ...string[]]), credentials: z.object({ username: z.string().optional(), password: z.string(), userCode: z.string().optional(), id: z.string().optional(), num: z.string().optional(), card6Digits: z.string().optional(), nationalID: z.string().optional(), longTermTwoFactorAuthToken: z.string().optional() }), startDate: z.string().optional(), combineInstallments: z.boolean().optional(), showBrowser: z.boolean().optional() },
  • src/server.ts:35-102 (registration)
    The server.tool call that registers the 'fetch-transactions' tool with the MCP server, providing name, input schema, and handler function.
    "fetch-transactions", { bankId: z.enum(Object.values(CompanyTypes) as [string, ...string[]]), credentials: z.object({ username: z.string().optional(), password: z.string(), userCode: z.string().optional(), id: z.string().optional(), num: z.string().optional(), card6Digits: z.string().optional(), nationalID: z.string().optional(), longTermTwoFactorAuthToken: z.string().optional() }), startDate: z.string().optional(), combineInstallments: z.boolean().optional(), showBrowser: z.boolean().optional() }, async ({ bankId, credentials, startDate, combineInstallments, showBrowser }) => { try { // Ensure bankId is a valid CompanyTypes value const validBankIds = new Set(Object.values(CompanyTypes)); if (!validBankIds.has(bankId as unknown as CompanyTypes)) { throw new Error(`Invalid bank ID: ${bankId}`); } const options: ScraperOptions = { companyId: bankId as unknown as CompanyTypes, startDate: startDate ? new Date(startDate) : new Date(), combineInstallments: combineInstallments ?? false, showBrowser: showBrowser ?? false }; const scraper = createScraper(options); const scrapeResult = await scraper.scrape(credentials as ScraperCredentials); if (scrapeResult.success) { return { content: [{ type: "text", text: JSON.stringify(scrapeResult) }] }; } else { return { content: [{ type: "text", text: JSON.stringify({ error: scrapeResult.errorType, message: scrapeResult.errorMessage }) }], isError: true }; } } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "UNKNOWN_ERROR", message: error instanceof Error ? error.message : "Unknown error occurred" }) }], isError: true }; } } );

Other Tools

Related Tools

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/mottibec/israeli-bank-mcp'

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