Skip to main content
Glama

Bunq MCP

by WilcoKruijer
getTopCounterparties.ts1.13 kB
import { z } from "zod"; import { BunqClient } from "../bunq/BunqClient"; import { getUniquePersonCounterparties } from "../bunq/transaction-filter"; export default function getTopCounterpartiesTool(bunqClient: BunqClient) { return { name: "getTopCounterparties", description: "Get unique PERSON counterparties (friends) for a specific monetary account." + " This is based on the recent bank transactions.", parameters: { monetaryAccountId: z.number().describe("Monetary Account ID"), }, handler: async ({ monetaryAccountId }: { monetaryAccountId: number }) => { try { const payments = await bunqClient.payment.getPayments({ monetaryAccountId }); const friends = getUniquePersonCounterparties(payments); return { content: [ { type: "text", text: JSON.stringify(friends), }, ], }; } catch (error) { console.error(error); return { content: [{ type: "text", text: `Error fetching friends: ${error}` }], isError: true, }; } }, }; }

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/WilcoKruijer/bunq-mcp'

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