🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@theyahia/tkassa-mcp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theyahia/tkassa-mcp

MCP server for T-Kassa — payments, refunds, recurring, SBP, receipts (Russia)

latest
Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
45
-25%
Maintainers
1
Weekly downloads
 
Created
Source

@theyahia/tkassa-mcp

MCP server for T-Kassa (T-Bank/Tinkoff) payment API. 14 tools: payments, refunds, recurring charges, customer management, saved cards, SBP (Fast Payments), receipts (54-FZ).

npm license

Part of the Russian API MCP series (50 servers) by @theYahia.

Quick Start

Claude Desktop

{
  "mcpServers": {
    "tkassa": {
      "command": "npx",
      "args": ["-y", "@theyahia/tkassa-mcp"],
      "env": {
        "TKASSA_TERMINAL_KEY": "your-terminal-key",
        "TKASSA_PASSWORD": "your-password"
      }
    }
  }
}

Claude Code

claude mcp add tkassa -e TKASSA_TERMINAL_KEY=your-key -e TKASSA_PASSWORD=your-password -- npx -y @theyahia/tkassa-mcp

Cursor / Windsurf

{
  "tkassa": {
    "command": "npx",
    "args": ["-y", "@theyahia/tkassa-mcp"],
    "env": {
      "TKASSA_TERMINAL_KEY": "your-terminal-key",
      "TKASSA_PASSWORD": "your-password"
    }
  }
}

Environment Variables

VariableRequiredDescription
TKASSA_TERMINAL_KEYYesTerminal key (Dashboard -> Shops -> Terminals)
TKASSA_PASSWORDYesTerminal password (used for SHA-256 token signing)

Get test credentials at T-Kassa Dashboard.

Tools (14)

Payments (5)

ToolDescription
init_paymentCreate a payment. Returns PaymentURL. Supports one-step/two-step, receipts (54-FZ), recurring, DATA fields
get_payment_stateGet payment status by PaymentId (NEW, AUTHORIZED, CONFIRMED, REVERSED, REFUNDED, REJECTED)
confirm_paymentConfirm a two-step payment. Supports partial confirmation
cancel_paymentCancel a payment (before or after confirmation). Supports partial cancellation
charge_paymentCharge a recurring payment using RebillId from a saved card

Refunds (1)

ToolDescription
refund_paymentFull or partial refund. Payment must be in CONFIRMED status

Customers & Cards (5)

ToolDescription
add_customerRegister a customer for saving cards and recurring payments
get_customerGet customer data (Email, Phone) by CustomerKey
remove_customerRemove a customer and all saved cards
get_card_listList saved cards (CardId, Pan, ExpDate, RebillId)
remove_cardRemove a saved card by CardId

SBP - Fast Payments (2)

ToolDescription
create_sbp_qrGenerate QR code for SBP payment (payload link or base64 PNG)
get_sbp_qr_stateCheck SBP QR payment status

Receipts - 54-FZ (1)

ToolDescription
send_closing_receiptSend a closing receipt with Items (Name, Price, Quantity, Tax) for fiscal compliance

Auth

Every request is signed with SHA-256:

Token = SHA-256(concat(sorted values of {Password, TerminalKey, ...params}))

Only scalar values participate in signing. Nested objects (Receipt, DATA) are excluded. Handled automatically.

HTTP Transport

HTTP_PORT=3000 npx @theyahia/tkassa-mcp
# or
npx @theyahia/tkassa-mcp --http 3000

Endpoints: POST /mcp (JSON-RPC), GET /health (status).

Skills

  • skill-create-payment -- create a payment and get a payment URL
  • skill-payment-status -- check payment status by PaymentId

Webhook Notifications

T-Kassa sends POST notifications to your notification_url (set in init_payment) when payment status changes:

{
  "TerminalKey": "your-key",
  "OrderId": "your-order-id",
  "Success": true,
  "Status": "CONFIRMED",
  "PaymentId": 123456789,
  "ErrorCode": "0",
  "Amount": 10000,
  "RebillId": 987654321,
  "CardId": 12345,
  "Pan": "430000******0777",
  "ExpDate": "1230",
  "Token": "sha256-signature"
}

Verify by computing the Token the same way (sorted values concat + SHA-256) and comparing.

Notes

  • Base URL: https://securepay.tinkoff.ru/v2/
  • Amounts are in kopecks internally (server converts rubles automatically)
  • Automatic retry with exponential backoff on 429/5xx
  • API docs: https://www.tbank.ru/kassa/dev/payments/

Demo Prompts

Create a payment with receipt:

Create a payment for 1500 rubles, order "order-42", with a receipt: 1x "Premium subscription" at 1500 RUB, VAT 20%, tax system USN income. Send receipt to user@example.com.

Set up recurring payments:

Register customer "cust-123" with email user@example.com, then create a recurring payment for 990 rubles on order "sub-monthly-1".

Refund and check status:

Refund 500 rubles from payment 777888999, then check its current status.

Series: Russian API MCP

MCPStatusDescription
@metarebalance/dadata-mcpreadyAddresses, companies, banks, phones
@theyahia/cbr-mcpreadyExchange rates, key rate
@theyahia/yookassa-mcpreadyPayments, refunds, receipts 54-FZ
@theyahia/tkassa-mcpv2.014 tools -- payments, refunds, recurring, SBP, receipts
...soon+46 servers -- full list

License

MIT

Keywords

mcp

FAQs

Package last updated on 01 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts