Skip to main content
Glama
OraCool

bepaid-mcp

by OraCool

bepaid-mcp

MCP server for the bePaid payment gateway:

Unofficial. A community project, not affiliated with or endorsed by bePaid. It uses the public bePaid APIs with your own shop credentials.

  • Transactions — list, look up and export transactions of a period (paginated report API) with fees, payouts, payer and card data, and the country of the card-issuing bank (domestic / foreign).

  • Payment links — one-off checkout pages with your own tracking_id and required payer fields.

  • Roster module (optional) — with a groups/payers workbook: payments per group and payer, per-payer payment links whose tracking_id identifies group, meeting and payer.

Tools

Always available:

Tool

Purpose

bepaid_list_transactions

Transactions for a period (compact rows + totals)

bepaid_get_transaction

Lookup by uid or tracking_id; also finds test transactions

bepaid_export_transactions

All transactions of a period to a new XLSX (summary + transactions) or CSV

bepaid_create_payment_link

One-off payment link: amount, description, tracking_id, payer fields

Registered only when ROSTER_XLSX_PATH is set:

Tool

Purpose

roster_list_groups

Groups from the roster workbook

roster_find_payer

Payer lookup by id, email, phone or name

roster_payments_by_group

Payments per group → payer, plus ambiguous / unmatched / otherPrograms

roster_export_group_report

Same report written to a new XLSX/CSV file

roster_create_payment_link

Payment link for a roster payer (prefilled payer, exact matching)

Related MCP server: paystack-mcp-server

Setup

Getting the shop ID / secret key and the first test run: docs/credentials.md.

Requires Node.js 20+. Register with Claude Code (runs the published package via npx):

claude mcp add bepaid --scope user \
  -e BEPAID_SHOP_ID=... -e BEPAID_SECRET_KEY=... \
  -- npx -y bepaid-mcp

Other MCP clients (Claude Desktop, Cursor, ...):

{
  "mcpServers": {
    "bepaid": {
      "command": "npx",
      "args": ["-y", "bepaid-mcp"],
      "env": { "BEPAID_SHOP_ID": "...", "BEPAID_SECRET_KEY": "..." }
    }
  }
}

Variable

Description

BEPAID_SHOP_ID, BEPAID_SECRET_KEY

Shop credentials (HTTP Basic auth for all bePaid APIs)

BEPAID_TEST_MODE

true by default — links are test payments; set false for real payments

BEPAID_TIME_ZONE

Time zone for report periods (default Europe/Minsk)

BEPAID_RETURN_URL

Optional redirect after checkout

ROSTER_XLSX_PATH

Optional roster workbook (read-only); enables the roster_* tools

ROSTER_BEPAID_URL_MARKERS

Comma-separated substrings identifying bePaid payment URLs in the roster

EXPORT_DIR

Output folder for exports (default ./exports)

EXPORT_LANGUAGE

ru (default) or en — headers of bepaid_export_transactions

From a local checkout:

npm install && npm run build
cp .env.example .env   # fill in; npm start / npm run inspect read it
claude mcp add bepaid -- node --env-file=/absolute/path/.env /absolute/path/dist/index.js

Roster workbook format

  • Sheet Groups: columns Группа, Основная локация, Тип, optional Программа — the payment description bePaid shows for the group's payments (e.g. Основы терапии; quotes and case are ignored).

  • One sheet per group: cell B1 holds the group code; a header row (within the first 10 rows) starts with the payer column Плательщик (also accepted: Обучающийся, Payer). Columns are located by header name: First Name + Last Name, Имя Фамилия Отчество, Email, Phone, Телеграм ник, Способ оплаты.

  • Optional sheet Модули — one row per module, header in row 1:

    Группа

    Встреча

    Дата

    Цена

    Валюта

    Альфа-25.1

    1

    14.09.2026

    550

    BYN

    Группа is the group code (as in B1 of the group sheet); Дата a date cell or DD.MM.YYYY; Валюта defaults to BYN. Unreadable rows are listed as warnings by roster_list_groups.

  • Optional sheet Ручные сопоставления — assignments for payments that cannot be matched automatically (ERIP, a relative's card), header in row 1:

    UID транзакции

    Группа

    Плательщик

    Встреча

    Комментарий

    12345-abcdef0123

    Альфа-25.1

    Анна Иванова

    3

    ЕРИП

    Copy UID транзакции from the export. Плательщик accepts a name, email, phone or roster id.

Payment matching

  1. Manual assignment (Ручные сопоставления) by transaction UID.

  2. tracking_id of links created by this server (exact group, meeting and payer).

  3. Payment description → only groups with that Программа. A description no group has (e.g. an individual consultation) goes to «Другие программы»; groups without a Программа value always stay candidates.

  4. Payer email → phone → name (first + last name, any order, Cyrillic or Latin) → name allowing Belarusian passport spellings (Volha = Ольга, Aliaksandra = Александра; reported as name_fuzzy — worth a glance).

  5. If the payer studies in several groups:

    • price — the amount must equal the group's module price or a multiple of it (several modules paid at once). Exactly one fitting group wins; none fitting → left for review.

    • date — if several groups fit the price, the group with a module date nearest to the payment date wins.

    • Otherwise (no data, equal distance) the payment is listed as ambiguous for manual review.

    The report column «Группа выбрана по» shows which rule decided.

Payment origin

Every payment carries the country of the card-issuing bank (issuer_country from bePaid; ERIP is always BY). Reports total domestic / foreign payments, foreign ones per country and per group, and the export has a sheet «Иностранные платежи» with all foreign payments (matched or not) for declaring them to the bank.

Publishing

npm version patch        # or minor / major
npm publish              # prepublishOnly builds and runs the tests

Development

npm test                 # vitest
npx vitest run test/report.test.ts -t "ambiguous"   # single file / test
npm run typecheck
npm run inspect          # MCP Inspector against dist/

Testing payments: in test mode use card 4200000000000000 (success) or 4005550000000019 (failure).

License

MIT

Available Tools

4 tools
bepaid_export_transactionsExport bePaid transactionsA

Writes all transactions of a period to a new XLSX (summary + transactions sheets) or CSV file: amounts, fees, payouts, payer, card, issuing bank country (domestic/foreign). Totals cover successful payments.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesEnd of the period (inclusive), shop time zone
fromYesStart of the period (inclusive), shop time zone
formatNoxlsx
statusNoall
languageNoColumn headers; defaults to EXPORT_LANGUAGE
date_typeNoWhich transaction date the period applies topaid_at
payment_method_typesNoDefaults to all: credit_card, alternative, erip

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=true, so the safety profile is covered. The description adds genuine behavioral detail beyond that — it writes to a NEW file and notes that totals cover only successful payments — but omits auth requirements, where the file lands, and any size/rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence that front-loads the action and output artifact before listing contents. No filler, though the second clause (contents list) could be trimmed without losing decision-relevant meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 parameters, no output schema, and a file-producing tool, the definition should at least say how the generated file is returned or where it is written. The 'totals cover successful payments' caveat is helpful, but the delivery mechanism of the export is left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 71%, and the schema itself documents the date pattern, defaults, and enums. The description restates the output format options and hints at the period (from/to) and the successful-only total, but adds no syntax or semantic detail the schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (writes/exports) plus the resource (all transactions of a period) and the concrete output artifact (new XLSX with summary + transactions sheets, or CSV). This clearly separates it from bepaid_list_transactions and bepaid_get_transaction, which return data rather than producing a file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this is for bulk period exports versus the list/get siblings, but the description never states when to choose it over bepaid_list_transactions or any exclusions (e.g. large ranges, unsupported filters). No explicit when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

bepaid_get_transactionGet bePaid transactionA
Read-only

Looks up a transaction by its uid, or all transactions with a given tracking_id. Also finds test transactions, which the report API does not return. With a roster configured, shows the matched group/payer.

ParametersJSON Schema
NameRequiredDescriptionDefault
uidNo
tracking_idNo

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds non-obvious behavioral context beyond that: it surfaces test transactions that the report API omits, and it notes that a configured roster causes matched group/payer data to be shown — real output-shaping behavior an agent could not infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences, front-loaded with the primary lookup modes and followed by the two edge behaviors. No filler, though the roster sentence is slightly dense and could be more clearly attached to its trigger condition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read lookup with no output schema, the description covers what can be looked up, the special test-transaction behavior, and the roster-dependent enrichment. Return shape is left unspecified, but no output schema exists to define it either, so a small gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does clarify semantics: uid retrieves one transaction while tracking_id retrieves all transactions with that value, which is meaningful given neither parameter is required. It still omits format, expected value shape, and what happens when neither or both are supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (looks up) and resource (transaction), and distinguishes the two lookup modes by uid vs tracking_id. It also notes two distinctive behaviors (test transactions, roster matching). It does not explicitly differentiate itself from the sibling bepaid_list_transactions, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: use it when you have a uid or a tracking_id. The remark that it finds test transactions 'which the report API does not return' hints at when this tool is preferable to a reporting path, but no explicit alternatives (e.g. bepaid_list_transactions or bepaid_export_transactions) or exclusion conditions are named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

bepaid_list_transactionsList bePaid transactionsA
Read-only

Lists bePaid transactions for a period (paginated report API) as compact rows. Test transactions are not included by bePaid.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesEnd of the period (inclusive), shop time zone
fromYesStart of the period (inclusive), shop time zone
limitNoMaximum rows returned
statusNosuccessful
date_typeNoWhich transaction date the period applies topaid_at
payment_method_typesNoDefaults to all: credit_card, alternative, erip

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds real behavioral context beyond that: results are paginated, returned as compact rows, and test transactions are excluded by bePaid. It stops short of noting rate limits or that pagination is via the report API's page mechanism.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, with the core purpose and the period scope front-loaded and the test-transaction exclusion appended as a qualifier.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description is the only source for return-shape information, and 'compact rows' is vague; it also never explains how pagination is performed (page parameter, cursor, or repeated limit-based calls). Adequate for selecting the tool, thin for using it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 83%, so the schema already documents from/to, limit, and date_type. The description only echoes the period concept and adds nothing about the undocumented 'status' parameter or the non-obvious defaults (status=successful, date_type=paid_at) that materially change results.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Lists') and resource ('bePaid transactions') scoped to a period, and adds the nature of the result ('compact rows'). It implicitly contrasts with sibling bepaid_get_transaction (single) and bepaid_export_transactions (export), but never names them, so differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The period framing implies when this tool applies, but there is no explicit when-to-use guidance and no mention of the alternatives (bepaid_export_transactions for bulk export, bepaid_get_transaction for single lookup). An agent must infer the routing decision from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedbepaid_create_payment_link
    • First observedbepaid_export_transactions
    • First observedbepaid_get_transaction
    • First observedbepaid_list_transactions

TDQS

A3.9/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a clearly distinct action: listing a period's transactions, looking up a single transaction (or by tracking_id), exporting to a file, and creating a payment link. The list/get distinction is standard and well-explained, leaving no realistic misselection risk.

Naming Consistency5/5

All four names share the bepaid_ prefix and follow a clean verb_noun pattern (list_transactions, get_transaction, export_transactions, create_payment_link). No style mixing or vague verbs.

Tool Count4/5

Four tools is a tight, focused set for transaction lookup/export plus payment-link creation, with each tool earning its place. It sits at the low end of the ideal 3-15 range, so slightly thin but not mismatched.

Completeness3/5

The read/reporting surface is solid (list, get, export) and creation of a payment link is covered, but there are no write/lifecycle operations such as refunds, payment cancellation, or status/webhook management. Notable gaps exist for an agent handling full payment workflows.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables interaction with the South African PayFast payment gateway to manage transactions, subscriptions, and refunds. It allows users to create payments, query transaction statuses, and check settlement balances through the MCP protocol.
    8
    16 npm
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    Enables MCP tool developers and AI agents to track payments, calculate sales tax liability, and ensure tax compliance across US jurisdictions.
    6
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server that provides tools for retrieving transaction context and recording AI decisions or creating human reviews for payment risk exceptions. Enables LLM agents to handle exception transactions in a hybrid payment-decisioning workflow.
    -