Robokassa Mcp

io.github.artgas1Published by GitHub account artgas1v0.1.2Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

MCP server for the Robokassa payment gateway that lets an assistant build signed checkout links, check payments, issue refunds and handle fiscal receipts.

What you can do
  • Build signed checkout URLs, including optional 54-ФЗ fiscal receipts, and split marketplace invoices
  • Check payment state by invoice ID, list available payment methods and calculate the amount credited to the shop
  • Create and poll refunds, plus an alternative partner refund path
  • Run two-step card pre-authorization (hold init, confirm, cancel) and recurring subscription charges
  • Verify ResultURL and SuccessURL webhook signatures and create or check second fiscal receipts
  • Send paid SMS notifications
When to use it
Useful when you run a Robokassa shop and want an assistant to help with payment operations: generating checkout links, looking up payment status, starting or tracking refunds, handling pre-auth and recurring charges, or validating webhook signatures during integration work.
Requirements
Runs locally as a Python package (uvx robokassa-mcp) over stdio, or optionally over HTTP with transport flags. Needs a Robokassa merchant account and the environment variables ROBOKASSA_LOGIN, ROBOKASSA_PASSWORD1, ROBOKASSA_PASSWORD2 and ROBOKASSA_PASSWORD3. Refund API access must be enabled in the Robokassa cabinet. Network access to Robokassa endpoints is required.
Before you install
Requires the shop's three signing passwords (ROBOKASSA_PASSWORD1, ROBOKASSA_PASSWORD2, ROBOKASSA_PASSWORD3) in the environment, which grant checkout signing, status checks and refunds. Tools can move real money: refunds, recurring charges, holds and paid SMS. Refund creation needs Refund API access enabled in the cabinet. Payment and refund data is sent to Robokassa's servers.

Installation

In SourceWeft

  1. Open Robokassa Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[robokassa-mcp — Robokassa payment gateway exposed to AI agents through MCP]

robokassa-mcp

[CI] [PyPI] [Python] [License] [Docs]

📚 Documentation  ·  PyPI  ·  Docker  ·  MCP Registry


Comprehensive Python client and Model Context Protocol server for Robokassa — the Russian payment gateway.

Covers the full API surface: checkout, XML status interfaces, refunds, holding (pre-auth), recurring subscriptions, 54-ФЗ fiscal receipts, Partner API, and auxiliary endpoints.

Install (once published)

bash
# As an MCP server for Claude Desktop / Claude Code / Cursor / Windsurfuvx robokassa-mcp
# As a Python librarypip install robokassa-mcp

Use as a Python library

python
import asynciofrom decimal import Decimalfrom robokassa import create_invoice, RobokassaClient
# Build a signed checkout URL (no HTTP — just URL construction).invoice = create_invoice(    merchant_login="my-shop",    out_sum=Decimal("599.00"),    inv_id=12345,    password1="...",    description="Premium subscription",    email="[email protected]",)print(invoice.url)  # https://auth.robokassa.ru/Merchant/Index.aspx?...
# Check the state of a payment (hits the OpStateExt XML endpoint).async def check() -> None:    async with RobokassaClient("my-shop", password2="...") as client:        state = await client.check_payment(inv_id=12345)        print(state.is_paid, state.info.op_key)
asyncio.run(check())

Full refund flow

python
from robokassa import RobokassaClient
async def refund_flow(inv_id: int) -> None:    async with RobokassaClient("my-shop", password2="p2", password3="p3") as client:        # 1. Fetch the payment state to get its OpKey.        state = await client.check_payment(inv_id)        assert state.info.op_key, "payment not complete yet"
        # 2. Initiate a refund.        created = await client.refund_create(state.info.op_key)        print("refund requestId:", created.request_id)
        # 3. Poll status until finished / canceled.        while True:            status = await client.refund_status(created.request_id)            if status.is_terminal:                print("final:", status.state)                break

Webhook signature verification (FastAPI example)

python
from fastapi import FastAPI, Request, HTTPException, PlainTextResponsefrom robokassa import verify_result_signature, build_ok_response
app = FastAPI()
@app.post("/robokassa/result")async def result_url(req: Request) -> PlainTextResponse:    form = dict(await req.form())    if not verify_result_signature(form, password2="..."):        raise HTTPException(status_code=403, detail="Bad signature")    # ... persist the notification, mark invoice paid ...    return PlainTextResponse(build_ok_response(form["InvId"]))

Use as an MCP server

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "robokassa": {      "command": "uvx",      "args": ["robokassa-mcp"],      "env": {        "ROBOKASSA_LOGIN": "your-shop-login",        "ROBOKASSA_PASSWORD1": "password1",        "ROBOKASSA_PASSWORD2": "password2",        "ROBOKASSA_PASSWORD3": "password3"      }    }  }}

Claude Code

bash
claude mcp add robokassa \  -e ROBOKASSA_LOGIN=my-shop \  -e ROBOKASSA_PASSWORD1=... \  -e ROBOKASSA_PASSWORD2=... \  -e ROBOKASSA_PASSWORD3=... \  -- uvx robokassa-mcp

Cursor

Edit ~/.cursor/mcp.json:

json
{  "mcpServers": {    "robokassa": {      "command": "uvx",      "args": ["robokassa-mcp"],      "env": {        "ROBOKASSA_LOGIN": "your-shop-login",        "ROBOKASSA_PASSWORD1": "password1",        "ROBOKASSA_PASSWORD2": "password2",        "ROBOKASSA_PASSWORD3": "password3"      }    }  }}

VS Code (GitHub Copilot)

In user or workspace settings.json:

json
{  "github.copilot.chat.mcp.servers": {    "robokassa": {      "command": "uvx",      "args": ["robokassa-mcp"],      "env": {        "ROBOKASSA_LOGIN": "your-shop-login",        "ROBOKASSA_PASSWORD1": "password1",        "ROBOKASSA_PASSWORD2": "password2",        "ROBOKASSA_PASSWORD3": "password3"      }    }  }}

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "robokassa": {      "command": "uvx",      "args": ["robokassa-mcp"],      "env": {        "ROBOKASSA_LOGIN": "your-shop-login",        "ROBOKASSA_PASSWORD1": "password1",        "ROBOKASSA_PASSWORD2": "password2",        "ROBOKASSA_PASSWORD3": "password3"      }    }  }}

HTTP transport (MCP Inspector, remote clients)

bash
uvx robokassa-mcp --transport http --port 8000

Flags: --transport {stdio,http,streamable-http,sse}, --host, --port.

MCP tools exposed to agents

All 18 tools are wrapped as @mcp.tool() and available to any MCP-capable agent (Claude Desktop, Claude Code, Cursor, Windsurf, etc.).

ToolPurposeAuth
create_invoiceBuild a signed checkout URL (optional 54-ФЗ receipt).Password#1
check_paymentGet current state of a payment by InvId (via OpStateExt).Password#2
list_currenciesList payment methods available to the shop.—
calc_out_sumCompute amount credited to shop for a given payment.Password#1
refund_createInitiate a refund (requires Refund API access).Password#3 JWT
refund_statusPoll refund progress by requestId.—
verify_result_signatureValidate a ResultURL webhook.Password#2
verify_success_signatureValidate a SuccessURL redirect.Password#1
hold_init / hold_confirm / hold_cancelTwo-step card pre-authorization.Password#1
init_recurring_parent / recurring_chargeSubscription auto-charges.Password#1
build_split_invoiceMarketplace multi-recipient checkout.—
send_smsPaid SMS service.Password#1
second_receipt_create / second_receipt_status54-ФЗ final receipt after advance.Password#1
partner_refundAlternative refund path for partner integrators.Partner JWT

Low-level signature helpers are available from Python only: compute_signature, op_state_signature, build_checkout_signature, build_refund_jwt, build_sms_signature, compute_result_signature, compute_success_signature, encode_fiscal_body.

API coverage

Mapped against the 8 public Robokassa API groups:

GroupCoverageModule
Merchant Checkout✅ create_invoice (+ 54-ФЗ)robokassa.checkout
XML Interfaces✅ check_payment, list_currencies, calc_out_sumrobokassa.xml_interface
Refund API✅ refund_create, refund_statusrobokassa.refund
Holding / Pre-auth✅ init / confirm / cancelrobokassa.holding
Recurring✅ parent + childrobokassa.recurring
Fiscal 54-ФЗ✅ second receipt create / statusrobokassa.fiscal
Partner API🟡 partner_refund only — see coverage notesrobokassa.partner
Auxiliary✅ send_sms, webhook signatures, split paymentsrobokassa.sms, robokassa.webhooks, robokassa.split

Environment variables

Most high-level entry points fall back to these env vars when credentials aren't passed explicitly:

VariableRequired for
ROBOKASSA_LOGINAll operations
ROBOKASSA_PASSWORD1Checkout, webhook SuccessURL verification, CalcOutSumm, fiscal, SMS
ROBOKASSA_PASSWORD2check_payment (OpStateExt), webhook ResultURL verification
ROBOKASSA_PASSWORD3refund_create

Signature algorithms

All signature-producing helpers accept algorithm= with "md5" / "sha256" / "sha384" / "sha512" — match whatever is configured in your Robokassa cabinet.

Development

bash
git clone https://github.com/artgas1/robokassa-mcp.gitcd robokassa-mcpuv sync --all-extras --devuv run pytest            # 107+ unit testsuv run ruff check .uv run pyright

License

MIT — see LICENSE. Drop-and-forget maintenance; PRs welcome but not guaranteed to be reviewed promptly.

Source: README.md at commit 5f2ae1f

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts