# robokassa-mcp [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/artgas1/robokassa-mcp  
**GitHub Stars:** 1  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/robokassa-mcp

## Description
Comprehensive MCP server for the Robokassa payment gateway (18 tools, full API coverage).

## Tools
Capabilities this server exposes over MCP:

- **check_payment** — Check the current state of a Robokassa payment by invoice ID.

Uses the `OpStateExt` XML interface. Returns a structured summary including
the state code (5/10/20/50/60/80/100), the OpKey (required later for
initiating a refund via Refund/Create), sums, payment method, and any
user-defined `Shp_*` parameters attached at checkout.

State codes:
    5   — инициализирована, не оплачена
    10  — отменена (таймаут / пользователь)
    20  — HOLD (предавторизация)
    50  — средства получены, зачисление магазину
    60  — отказ в зачислении, средства возвращены покупателю
          (это НЕ пользовательский refund — для него используйте refund_status)
    80  — приостановлена (security check)
    100 — оплачена ✅

Credentials may be passed explicitly or via ROBOKASSA_LOGIN / ROBOKASSA_PASSWORD2
environment variables.

Note:
    OpStateExt does NOT reflect post-payment refunds initiated through the
    Robokassa cabinet or Refund/Create. For that, store the requestId from
    Refund/Create and poll Refund/GetState.
- **refund_create** — Initiate a refund for a successful Robokassa payment.

Requires `op_key` — obtained from `check_payment` (OpStateExt) or the
`Result2` webhook payload for the original operation.

Refund amount:
    - Omit `refund_sum` for a FULL refund of the original operation.
    - Pass a numeric amount for a partial refund.

Fiscal receipt:
    - Omit `items` to refund without emitting a fiscal receipt (appropriate
      when the original sale was not fiscalized through Robokassa).
    - Pass a list of items to emit a receipt for the refund. Each item:
      `{name, quantity, cost, tax, payment_method, payment_object}` where
      tax ∈ none/vat0/vat5/vat7/vat10/vat20/vat105/vat107/vat110/vat120,
      payment_method ∈ full_payment/advance/..., payment_object ∈
      commodity/service/payment/...

Authentication:
    Uses JWT signed with `Password#3`. This is distinct from Password#1
    (checkout) and Password#2 (XML status). Access to the Refund API must
    be enabled in the Robokassa cabinet separately.

Returns:
    `{success: bool, request_id: str | None, message: str | None}`.
    Store `request_id` to poll refund status via `refund_status`.
    Common failure messages: NotEnoughOperationFunds, OperationNotFound,
    AlreadyRefunded.

Credentials may be passed explicitly or via the ROBOKASSA_PASSWORD3 env var.
- **refund_status** — Check the current state of a previously-created refund request.
- **create_invoice** — Build a signed Robokassa checkout URL + form fields for a new payment.

Does NOT make an HTTP request — produces the URL to redirect the user to.
- **verify_result_signature** — Verify the SignatureValue on a Robokassa ResultURL request.

Robokassa POSTs payment notifications to the merchant's ResultURL after a
successful checkout. The merchant must verify the signature to confirm the
notification is authentic, then respond with the string returned by
`build_ok_response(inv_id)` — otherwise Robokassa retries.
- **verify_success_signature** — Verify the SignatureValue on a Robokassa SuccessURL redirect.

SuccessURL is the browser-side redirect after payment completes. Unlike
ResultURL it does NOT mean the payment is credited — only that the user
returned to the success page. Still, verifying the signature guards against
CSRF / tampering.
- **list_currencies** — List payment methods / currencies available to a Robokassa shop.

Returns the full catalogue grouped by payment family (BankCard, SBP,
SberPay, YandexPay, etc.) with per-method Label, Alias, Name, and
min/max transaction bounds where applicable.

The Label values are what you pass as `IncCurrLabel` when calling
`create_invoice` to restrict the user to a specific payment method.

No password / signature required — GetCurrencies is a public endpoint.
- **calc_out_sum** — Calculate the amount credited to the shop for a given customer payment.

Useful for showing the commission / final sum in checkout UI.

Signature: `<algorithm>(MerchantLogin:IncSum:Password#1)`.
- **hold_init** — Build a checkout URL with StepByStep=true for two-step pre-auth.

Funds are reserved on the card; use `hold_confirm` to capture or
`hold_cancel` to release. Max hold window: 7 days.

Notification for successful hold is delivered to ResultURL2 (not the
standard ResultURL). Requires prior agreement with Robokassa and only
works with card payments.
- **hold_confirm** — Capture previously-reserved funds for a held transaction.

Cart can be reduced (smaller `receipt_items`) before capture, but not
increased. Pass the same OutSum (possibly smaller) as the original hold.
- **hold_cancel** — Release a hold without capturing the reserved funds.
- **init_recurring_parent** — Build a checkout URL marking the payment as a recurring parent.

After the user pays, the shop can silently charge subsequent amounts
via `recurring_charge` citing this invoice's `inv_id`.
- **recurring_charge** — Silently charge a recurring subscription payment.

`previous_inv_id` must be the inv_id of an already-paid parent (created
with `init_recurring_parent`). Response `"OK<InvId>"` means accepted,
NOT captured — verify via `check_payment`.
- **build_split_invoice** — Build a URL for a multi-recipient (marketplace-style) split payment.

Each split: `{merchantLogin, amount, description?}`. Sum of amounts
must equal out_amount.
- **send_sms** — Send an SMS via Robokassa's SMS service.

Paid feature — requires a non-zero SMS balance in the cabinet.
Phone must be in international format (e.g. `79991234567`).
- **second_receipt_create** — Emit a final (second) 54-ФЗ fiscal receipt after an advance/prepayment sale.

For merchants using Robokassa Fiscal. `merchant_id` is the Fiscal
merchantId (e.g. `robokassa_sell`); `origin_id` is the InvId of the
original operation. Max 2 receipts per operation.

items: `[{name, quantity, sum, tax, payment_method, payment_object}]`.
payments: typically `[{type: 2, sum: <total>}]` for offsetting a prepayment.
client: `{email}` or `{phone}`.
- **second_receipt_status** — Check registration status of a 54-ФЗ fiscal receipt.

Use `merchant_id="robokassa_state"` for status lookups.
- **partner_refund** — Alternative refund path via Partner API (for CPA / SaaS integrators).

Merchant-only users should prefer `refund_create` instead (uses Password#3).
Partner API requires `RoboxPartnerId` and partner-specific auth headers —
typically `{"Authorization": "Bearer <partner-jwt>"}`.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "robokassa-mcp": {
    "command": "uvx",
    "args": ["robokassa-mcp"],
    "env": {
      "ROBOKASSA_LOGIN": "",
      "ROBOKASSA_PASSWORD1": "",
      "ROBOKASSA_PASSWORD2": "",
      "ROBOKASSA_PASSWORD3": ""
    }
  }
}
```

**Requires environment variables:** `ROBOKASSA_LOGIN`, `ROBOKASSA_PASSWORD1`, `ROBOKASSA_PASSWORD2`, `ROBOKASSA_PASSWORD3` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What robokassa-mcp MCP server does

The robokassa-mcp MCP server connects MCP-capable agents to the Robokassa Russian payment gateway. It provides 18 tools covering checkout creation, XML status operations, refunds, card holds, recurring billing, fiscal receipts, split payments, SMS, and signature checks.

The server is intended for payment workflows where an agent needs structured access to Robokassa operations rather than direct construction of API requests. It can build a signed checkout URL without making an HTTP request, while other operations call Robokassa interfaces to retrieve or change payment state.

## How it works

The server runs as a Python package through `uvx robokassa-mcp`. Stdio is suitable for local MCP clients; the command also accepts `http`, `streamable-http`, and `sse` transports with configurable host and port values. An HTTP invocation such as `uvx robokassa-mcp --transport http --port 8000` supports MCP Inspector and remote-client scenarios.

Authentication is selected by operation. Checkout and several auxiliary operations use Password #1, payment-state queries and ResultURL verification use Password #2, and refund creation uses Password #3 with JWT authentication. Partner refunds use a Partner JWT. Some tools, including currency listing, refund-status polling, and split-invoice construction, do not require a password according to the tool reference.

## Setup and configuration

Install the package with `uvx robokassa-mcp`, then register the command in the MCP client configuration. The documented examples cover Claude Desktop, Claude Code, Cursor, VS Code with GitHub Copilot, and Windsurf. Each configuration passes the credentials as environment variables.

Set `ROBOKASSA_LOGIN` for the shop. Add `ROBOKASSA_PASSWORD1` for checkout, SuccessURL verification, amount calculations, fiscal operations, and SMS; `ROBOKASSA_PASSWORD2` for payment-state checks and ResultURL verification; and `ROBOKASSA_PASSWORD3` for refund creation. Credentials can also be supplied explicitly when using the Python library.

## Tools and capabilities

The robokassa-mcp MCP server exposes these grouped capabilities:

- Create signed invoices, optionally including a 54-ФЗ receipt.
- Check payment state by invoice ID and list available payment methods.
- Calculate the amount credited to the shop.
- Create refunds and poll them by request ID.
- Initialize, confirm, or cancel card pre-authorizations.
- Create recurring-payment parents and issue recurring charges.
- Build marketplace invoices with multiple recipients.
- Send paid SMS messages.
- Create and check second fiscal receipts after an advance payment.
- Verify ResultURL and SuccessURL signatures.
- Use the alternative Partner API refund path.

The Python library additionally exposes lower-level signature and fiscal-body helpers, including functions for checkout, refund, SMS, webhook, and operation-state signatures. Those helpers are not exposed as MCP tools.

## Limitations and notes

Partner API coverage is limited to `partner_refund`; the repository identifies the remaining Partner API surface as incomplete. Refund creation requires Refund API access, and partner refunds require Partner JWT credentials. Payment webhooks still need to be received by an application endpoint: the server supplies signature verification, but the example application is responsible for parsing the request, persisting the notification, and returning the expected response.

The checkout URL builder itself does not send a payment request. It creates the signed URL that a customer or another application can use. Operations that inspect or mutate Robokassa state depend on the relevant gateway endpoint and credentials being available.

_Full upstream README: https://allmcps.com/mcp/robokassa-mcp/readme_

