Skip to main content

As an MCP server

{
  "mcpServers": {
    "robokassa": {
      "command": "uvx",
      "args": ["robokassa-mcp"],
      "env": {
        "ROBOKASSA_LOGIN": "your-shop-login",
        "ROBOKASSA_PASSWORD1": "password1",
        "ROBOKASSA_PASSWORD2": "password2",
        "ROBOKASSA_PASSWORD3": "password3"
      }
    }
  }
}
uvx is from the uv package manager — install via brew install uv or curl -LsSf https://astral.sh/uv/install.sh | sh.

As a Python library

pip install robokassa-mcp
# or
uv add robokassa-mcp
from robokassa import RobokassaClient

async with RobokassaClient("my-shop", password2="...", password3="...") as client:
    state = await client.check_payment(inv_id=12345)
    if state.is_paid and state.info.op_key:
        refund = await client.refund_create(state.info.op_key)

HTTP transport (advanced)

By default the server runs as stdio — what every MCP client expects. For remote setups or the MCP Inspector:
uvx robokassa-mcp --transport http --port 8000
Flags: --transport {stdio,http,streamable-http,sse}, --host, --port.

Credentials

VariableRequired for
ROBOKASSA_LOGINAll tools
ROBOKASSA_PASSWORD1Checkout, SuccessURL verification, CalcOutSumm, fiscal, SMS
ROBOKASSA_PASSWORD2check_payment (OpStateExt), ResultURL verification
ROBOKASSA_PASSWORD3refund_create (requires API Refund access in cabinet)
See Environment for per-tool breakdown. Next: Quickstart →