Skip to main content
Glama
mottibec

Israeli Bank MCP

by mottibec

two-factor-auth

Enable or retrieve two-factor authentication (2FA) codes for Israeli bank accounts using phone number verification. Supports major banks and card providers for secure account access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
bankIdYes
otpCodeNo
phoneNumberYes

Implementation Reference

  • The handler function for the 'two-factor-auth' tool. It validates the bankId, creates a scraper instance, and either triggers 2FA SMS via triggerTwoFactorAuth(phoneNumber) or retrieves a long-term 2FA token via getLongTermTwoFactorToken(otpCode), returning appropriate JSON responses or errors.
    async ({ bankId, phoneNumber, action, otpCode }) => { try { const validBankIds = new Set(Object.values(CompanyTypes)); if (!validBankIds.has(bankId as unknown as CompanyTypes)) { throw new Error(`Invalid bank ID: ${bankId}`); } const scraper = createScraper({ companyId: bankId as unknown as CompanyTypes, startDate: new Date() }); if (action === "trigger") { await scraper.triggerTwoFactorAuth(phoneNumber); return { content: [{ type: "text", text: JSON.stringify({ success: true, message: "2FA code sent" }) }] }; } else if (action === "get-token" && otpCode) { const result = await scraper.getLongTermTwoFactorToken(otpCode); return { content: [{ type: "text", text: JSON.stringify(result) }] }; } else { throw new Error("Invalid action or missing OTP code"); } } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "UNKNOWN_ERROR", message: error instanceof Error ? error.message : "Unknown error occurred" }) }], isError: true }; } }
  • Zod schema defining input parameters for the two-factor-auth tool: bankId (enum of banks), phoneNumber (string), action (trigger or get-token), otpCode (optional string).
    { bankId: z.enum(Object.values(CompanyTypes) as [string, ...string[]]), phoneNumber: z.string(), action: z.enum(["trigger", "get-token"]), otpCode: z.string().optional() },
  • src/server.ts:105-157 (registration)
    Registration of the 'two-factor-auth' tool on the MCP server using server.tool(name, inputSchema, handlerFunction).
    server.tool( "two-factor-auth", { bankId: z.enum(Object.values(CompanyTypes) as [string, ...string[]]), phoneNumber: z.string(), action: z.enum(["trigger", "get-token"]), otpCode: z.string().optional() }, async ({ bankId, phoneNumber, action, otpCode }) => { try { const validBankIds = new Set(Object.values(CompanyTypes)); if (!validBankIds.has(bankId as unknown as CompanyTypes)) { throw new Error(`Invalid bank ID: ${bankId}`); } const scraper = createScraper({ companyId: bankId as unknown as CompanyTypes, startDate: new Date() }); if (action === "trigger") { await scraper.triggerTwoFactorAuth(phoneNumber); return { content: [{ type: "text", text: JSON.stringify({ success: true, message: "2FA code sent" }) }] }; } else if (action === "get-token" && otpCode) { const result = await scraper.getLongTermTwoFactorToken(otpCode); return { content: [{ type: "text", text: JSON.stringify(result) }] }; } else { throw new Error("Invalid action or missing OTP code"); } } 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